/// <summary> /// Gets and sets the required pricing structures to value this leg. /// </summary> public override List <string> GetRequiredPricingStructures()//TODO Need to add the case of floaters where there is a forecast curve. { var result = new List <string>(); if (equity.currency != null) { var bondCurve = CurveNameHelpers.GetEquityCurveName(equity.currency.Value, equity.id); result.Add(bondCurve); } if (equity.currency != null) { var discountCurve = CurveNameHelpers.GetDiscountCurveName(equity.currency.Value, true); result.Add(discountCurve); if (unitPrice.currency != null && unitPrice.currency.Value != equity.currency.Value) { var discountCurve2 = CurveNameHelpers.GetDiscountCurveName(unitPrice.currency, true); result.Add(discountCurve2); } } return(result); }
/// <summary> /// Gets and sets the required pricing structures to value this leg. /// </summary> public List<String> GetRequiredPricingStructures() { var result = new List<String>(); if (forecastPaymentAmount != null) { var currency = forecastPaymentAmount.currency; var discountCurve = CurveNameHelpers.GetDiscountCurveName(currency, true); result.Add(discountCurve); } if(Items != null) { result.AddRange(Items.Select(calculationPeriod => ((CalculationPeriod)calculationPeriod).forecastAmount).Select(forecastAmount => CurveNameHelpers.GetDiscountCurveName(forecastAmount.currency, true))); } return result; }