/// <summary>
 /// Initializes a new instance of the <see cref="PriceableFxRateCashflow"/> class.
 /// </summary>
 /// <param name="cashlfowId">The stream id.</param>
 /// <param name="payerIsBase">The payer is base flag.</param>
 /// <param name="accrualStartDate">The accrual start date. If adjusted, the adjustCalculationDatesIndicator should be false.</param>
 /// <param name="accrualEndDate">The accrual end date. If adjusted, the adjustCalculationDatesIndicator should be false.</param>
 /// <param name="adjustAccrualDatesIndicator">if set to <c>true</c> [adjust calculation dates indicator].</param>
 /// <param name="accrualBusinessCenters">The accrual business centers.</param>
 /// <param name="margin">The margin.</param>
 /// <param name="baseRate">The base rate for a nettable fixed/floating cash flow. </param>
 /// <param name="observedRate">The observed Rate.</param>
 /// <param name="notionalAmount">The notional amount.</param>
 /// <param name="dayCountfraction">Type of day Countfraction.</param>
 /// <param name="paymentDate">The payment date.</param>
 /// <param name="accrualRollConvention">The accrual roll convention.</param>
 /// <param name="resetRelativeTo">reset relative to?</param>
 /// <param name="fixingDateRelativeOffset">The fixing date offset.</param>
 /// <param name="forecastRateIndex">The forecastrateindex.</param>
 /// <param name="discountingType">The swap discounting type.</param>
 /// <param name="discountRate">The discount rate.</param>
 /// <param name="fraDiscounting">Determines whether the coupon is discounted or not. If this parameter is null,
 /// then it is assumed that there is no fradiscounting</param>
 /// <param name="fixingCalendar">The fixingCalendar.</param>
 /// <param name="paymentCalendar">The paymentCalendar.</param>
 public PriceableFloatingRateCoupon
 (
     string cashlfowId
     , bool payerIsBase
     , DateTime accrualStartDate
     , DateTime accrualEndDate
     , Boolean adjustAccrualDatesIndicator
     , BusinessCenters accrualBusinessCenters
     , BusinessDayConventionEnum accrualRollConvention
     , DayCountFraction dayCountfraction
     , ResetRelativeToEnum resetRelativeTo
     , RelativeDateOffset fixingDateRelativeOffset
     , Decimal margin
     , Decimal baseRate
     , Decimal?observedRate
     , Money notionalAmount
     , AdjustableOrAdjustedDate paymentDate
     , ForecastRateIndex forecastRateIndex
     , DiscountingTypeEnum?discountingType
     , Decimal?discountRate
     , FraDiscountingEnum?fraDiscounting
     , IBusinessCalendar fixingCalendar
     , IBusinessCalendar paymentCalendar)
     : base(
         cashlfowId
         , CouponType.FloatingRate
         , payerIsBase
         , accrualStartDate
         , accrualEndDate
         , adjustAccrualDatesIndicator
         , accrualBusinessCenters
         , accrualRollConvention
         , dayCountfraction
         , observedRate
         , notionalAmount
         , paymentDate
         , discountingType
         , discountRate
         , fraDiscounting
         , paymentCalendar)
 {
     BaseRate        = baseRate;
     FixingCalendar  = fixingCalendar;
     ModelIdentifier = "DualCurveCouponModel";
     Id = cashlfowId;
     ForwardStartDate         = AccrualStartDate;
     ForecastRateIndex        = forecastRateIndex;
     FixingDateRelativeOffset = fixingDateRelativeOffset;
     ResetRelativeTo          = resetRelativeTo;
     Margin             = margin;
     AdjustedFixingDate = GetResetDate(resetRelativeTo, fixingDateRelativeOffset);
     if (observedRate != null)
     {
         RateObservation = RateObservationHelper.Parse(AdjustedFixingDate, (decimal)observedRate, "1");
     }
     SetRateObservation(RateObservation, ResetDate);
     ForecastCurveName = CurveNameHelpers.GetForecastCurveName(forecastRateIndex);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PriceableFxRateCashflow"/> class.
 /// </summary>
 /// <param name="cashlfowId">The stream id.</param>
 /// <param name="payerIsBase">The payer is base flag.</param>
 /// <param name="accrualStartDate">The accrual start date. If adjusted, the adjustCalculationDatesIndicator should be false.</param>
 /// <param name="accrualEndDate">The accrual end date. If adjusted, the adjustCalculationDatesIndicator should be false.</param>
 /// <param name="margin">The margin.</param>
 /// <param name="baseRate">The base rate for a nettable fixed/floating cash flow. </param>
 /// <param name="observedRate">The observed Rate. If this is not null, then it is used.</param>
 /// <param name="notionalAmount">The notional amount.</param>
 /// <param name="adjustedFixingDate">The adjusted fixing date.</param>
 /// <param name="dayCountfraction">Type of day Countfraction.</param>
 /// <param name="paymentDate">The payment date.</param>
 /// <param name="forecastRateIndex">The forecastrate index.</param>
 /// <param name="discountingType">The swap discounting type.</param>
 /// <param name="discountRate">The discount rate.</param>
 /// <param name="fraDiscounting">Determines whether the coupon is discounted or not. If this parameter is null,
 /// then it is assumed that there is no fradiscounting</param>
 /// <param name="fixingCalendar">The fixingCalendar.</param>
 /// <param name="paymentCalendar">The paymentCalendar.</param>
 public PriceableFloatingRateCoupon
 (
     string cashlfowId
     , bool payerIsBase
     , DateTime accrualStartDate
     , DateTime accrualEndDate
     , DateTime adjustedFixingDate
     , DayCountFraction dayCountfraction
     , Decimal margin
     , Decimal baseRate
     , Decimal?observedRate
     , Money notionalAmount
     , DateTime paymentDate
     , ForecastRateIndex forecastRateIndex
     , DiscountingTypeEnum?discountingType
     , Decimal?discountRate
     , FraDiscountingEnum?fraDiscounting
     , IBusinessCalendar fixingCalendar
     , IBusinessCalendar paymentCalendar)
     : base(
         cashlfowId
         , CouponType.FloatingRate
         , payerIsBase
         , accrualStartDate
         , accrualEndDate
         , notionalAmount
         , dayCountfraction
         , observedRate
         , paymentDate
         , discountingType
         , discountRate
         , fraDiscounting
         , paymentCalendar)
 {
     BaseRate        = baseRate;
     FixingCalendar  = fixingCalendar;
     ModelIdentifier = "DualCurveCouponModel";
     Id = cashlfowId;
     ForecastRateIndex  = forecastRateIndex;
     Margin             = margin;
     AdjustedFixingDate = adjustedFixingDate;
     RateObservation    = RateObservationHelper.Parse(AdjustedFixingDate, observedRate, "1");
     SetRateObservation(RateObservation, ResetDate);
     ForecastCurveName = CurveNameHelpers.GetForecastCurveName(forecastRateIndex);
 }