/// <summary> /// Initializes a new instance of the <see cref="LegDefinition" /> class. /// </summary> /// <param name="conventionName">conventionName.</param> /// <param name="conventions">conventions.</param> /// <param name="indexConvention">indexConvention.</param> /// <param name="indexConventionName">indexConventionName.</param> /// <param name="notionalExchangeType">what type of notional exchange does the leg have Supported string (enumeration) values are: [None, Initial, Final, Both]. (required).</param> /// <param name="payReceive">Is the leg to be paid or received Supported string (enumeration) values are: [NotDefined, Pay, Receive]. (required).</param> /// <param name="rateOrSpread">Is there either a fixed rate (non-zero) or spread to be paid over the value of the leg. (required).</param> /// <param name="resetConvention">Control how resets are generated relative to swap payment convention(s). Supported string (enumeration) values are: [InAdvance, InArrears]..</param> /// <param name="stubType">If a stub is required should it be at the front or back of the leg. Supported string (enumeration) values are: [Front, Back, Both]. (required).</param> public LegDefinition(FlowConventionName conventionName = default(FlowConventionName), FlowConventions conventions = default(FlowConventions), IndexConvention indexConvention = default(IndexConvention), FlowConventionName indexConventionName = default(FlowConventionName), string notionalExchangeType = default(string), string payReceive = default(string), decimal?rateOrSpread = default(decimal?), string resetConvention = default(string), string stubType = default(string)) { // to ensure "notionalExchangeType" is required (not null) if (notionalExchangeType == null) { throw new InvalidDataException("notionalExchangeType is a required property for LegDefinition and cannot be null"); } else { this.NotionalExchangeType = notionalExchangeType; } // to ensure "payReceive" is required (not null) if (payReceive == null) { throw new InvalidDataException("payReceive is a required property for LegDefinition and cannot be null"); } else { this.PayReceive = payReceive; } // to ensure "rateOrSpread" is required (not null) if (rateOrSpread == null) { throw new InvalidDataException("rateOrSpread is a required property for LegDefinition and cannot be null"); } else { this.RateOrSpread = rateOrSpread; } this.ResetConvention = resetConvention; // to ensure "stubType" is required (not null) if (stubType == null) { throw new InvalidDataException("stubType is a required property for LegDefinition and cannot be null"); } else { this.StubType = stubType; } this.ConventionName = conventionName; this.Conventions = conventions; this.IndexConvention = indexConvention; this.IndexConventionName = indexConventionName; this.ResetConvention = resetConvention; }
/// <summary> /// Initializes a new instance of the <see cref="CreditDefaultSwap" /> class. /// </summary> /// <param name="ticker">A ticker to uniquely specify then entity against which the cds is written (required).</param> /// <param name="startDate">The start date of the instrument. This is normally synonymous with the trade-date. (required).</param> /// <param name="maturityDate">The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date (required).</param> /// <param name="flowConventions">flowConventions.</param> /// <param name="couponRate">The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. (required).</param> /// <param name="conventionName">conventionName.</param> /// <param name="protectionDetailSpecification">protectionDetailSpecification (required).</param> public CreditDefaultSwap(string ticker = default(string), DateTimeOffset?startDate = default(DateTimeOffset?), DateTimeOffset?maturityDate = default(DateTimeOffset?), CdsFlowConventions flowConventions = default(CdsFlowConventions), decimal?couponRate = default(decimal?), FlowConventionName conventionName = default(FlowConventionName), CdsProtectionDetailSpecification protectionDetailSpecification = default(CdsProtectionDetailSpecification), InstrumentTypeEnum instrumentType = default(InstrumentTypeEnum)) : base(instrumentType) { // to ensure "ticker" is required (not null) if (ticker == null) { throw new InvalidDataException("ticker is a required property for CreditDefaultSwap and cannot be null"); } else { this.Ticker = ticker; } // to ensure "startDate" is required (not null) if (startDate == null) { throw new InvalidDataException("startDate is a required property for CreditDefaultSwap and cannot be null"); } else { this.StartDate = startDate; } // to ensure "maturityDate" is required (not null) if (maturityDate == null) { throw new InvalidDataException("maturityDate is a required property for CreditDefaultSwap and cannot be null"); } else { this.MaturityDate = maturityDate; } // to ensure "couponRate" is required (not null) if (couponRate == null) { throw new InvalidDataException("couponRate is a required property for CreditDefaultSwap and cannot be null"); } else { this.CouponRate = couponRate; } // to ensure "protectionDetailSpecification" is required (not null) if (protectionDetailSpecification == null) { throw new InvalidDataException("protectionDetailSpecification is a required property for CreditDefaultSwap and cannot be null"); } else { this.ProtectionDetailSpecification = protectionDetailSpecification; } this.FlowConventions = flowConventions; this.ConventionName = conventionName; }
/// <summary> /// Initializes a new instance of the <see cref="CdsIndexAllOf" /> class. /// </summary> /// <param name="startDate">The start date of the instrument. This is normally synonymous with the trade-date. (required).</param> /// <param name="maturityDate">The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date (required).</param> /// <param name="flowConventions">flowConventions.</param> /// <param name="couponRate">The coupon rate paid on each payment date of the premium leg as a fraction of 100 percent, e.g. \"0.05\" meaning 500 basis points or 5%. For a standard corporate CDS (North American) this must be either 100bps or 500bps. (required).</param> /// <param name="identifiers">external market codes and identifiers for the cds index, e.g. a RED code, BBG ID or ICE code. (required).</param> /// <param name="basket">basket (required).</param> /// <param name="conventionName">conventionName.</param> /// <param name="notional">The notional quantity that applies to both the premium and protection legs (required).</param> /// <param name="instrumentType">The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashflowLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CashSettled, CdsIndex, Basket (required).</param> public CdsIndexAllOf(DateTimeOffset?startDate = default(DateTimeOffset?), DateTimeOffset?maturityDate = default(DateTimeOffset?), CdsFlowConventions flowConventions = default(CdsFlowConventions), decimal?couponRate = default(decimal?), Dictionary <string, string> identifiers = default(Dictionary <string, string>), Basket basket = default(Basket), FlowConventionName conventionName = default(FlowConventionName), decimal?notional = default(decimal?), InstrumentTypeEnum instrumentType = default(InstrumentTypeEnum)) { // to ensure "startDate" is required (not null) if (startDate == null) { throw new InvalidDataException("startDate is a required property for CdsIndexAllOf and cannot be null"); } else { this.StartDate = startDate; } // to ensure "maturityDate" is required (not null) if (maturityDate == null) { throw new InvalidDataException("maturityDate is a required property for CdsIndexAllOf and cannot be null"); } else { this.MaturityDate = maturityDate; } // to ensure "couponRate" is required (not null) if (couponRate == null) { throw new InvalidDataException("couponRate is a required property for CdsIndexAllOf and cannot be null"); } else { this.CouponRate = couponRate; } // to ensure "identifiers" is required (not null) if (identifiers == null) { throw new InvalidDataException("identifiers is a required property for CdsIndexAllOf and cannot be null"); } else { this.Identifiers = identifiers; } // to ensure "basket" is required (not null) if (basket == null) { throw new InvalidDataException("basket is a required property for CdsIndexAllOf and cannot be null"); } else { this.Basket = basket; } // to ensure "notional" is required (not null) if (notional == null) { throw new InvalidDataException("notional is a required property for CdsIndexAllOf and cannot be null"); } else { this.Notional = notional; } // to ensure "instrumentType" is required (not null) if (instrumentType == null) { throw new InvalidDataException("instrumentType is a required property for CdsIndexAllOf and cannot be null"); } else { this.InstrumentType = instrumentType; } this.FlowConventions = flowConventions; this.ConventionName = conventionName; }