/// <summary> /// Gets and sets the required pricing structures to value this leg. /// </summary> public List <String> GetRequiredPricingStructures() { var result = new List <String>(); if (paymentAmount.currency != null) { var discountCurve = Helpers.GetDiscountCurveName(paymentAmount.currency); result.Add(discountCurve); } return(result); }
/// <summary> /// Gets and sets the required pricing structures to value this leg. /// </summary> public List <String> GetRequiredPricingStructures() { var result = new List <String>(); var amount = calculationPeriodAmount.Item as Calculation; if (amount != null) { var currency = XsdClassesFieldResolver.CalculationGetNotionalSchedule(amount); if (currency != null && currency.notionalStepSchedule != null) { var discountCurve = Helpers.GetDiscountCurveName(currency.notionalStepSchedule.currency); result.Add(discountCurve); } var floatingRateCalculation = amount.Items[0] as FloatingRateCalculation; if (floatingRateCalculation != null) { result.Add(Helpers.GetForecastCurveName(floatingRateCalculation.floatingRateIndex, floatingRateCalculation.indexTenor)); } } //TODO if (stubCalculationPeriodAmount != null) { if (stubCalculationPeriodAmount.Items != null) { foreach (var item in stubCalculationPeriodAmount.Items) { if (item.Items != null) { result.AddRange(from value in item.Items where value as Money != null select Helpers.GetDiscountCurveName(((Money)value).currency)); } } } //if (stubCalculationPeriodAmount != null) //{ // if (stubCalculationPeriodAmount.initialStub != null && stubCalculationPeriodAmount.initialStub.Items != null) // { // result.AddRange(from value in stubCalculationPeriodAmount.initialStub.Items // where value as Money != null // select Helpers.GetDiscountCurveName(((Money)value).currency)); // } // if (stubCalculationPeriodAmount.finalStub != null && stubCalculationPeriodAmount.finalStub.Items != null) // { // result.AddRange(from value in stubCalculationPeriodAmount.finalStub.Items // where value as Money != null // select Helpers.GetDiscountCurveName(((Money)value).currency)); // } } return(result); }
/// <summary> /// Gets and sets the required pricing structures to value this leg. /// </summary> public override List <String> GetRequiredPricingStructures() { var result = new List <String>(); if (notional.currency != null) { var discountCurve = Helpers.GetDiscountCurveName(notional.currency); result.Add(discountCurve); } if (floatingRateIndex != null && indexTenor != null) { result.Add(Helpers.GetForecastCurveName(floatingRateIndex, indexTenor[0])); } 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 = Helpers.GetDiscountCurveName(currency); result.Add(discountCurve); } if (Items != null) { result.AddRange(Items.Select(calculationPeriod => ((CalculationPeriod)calculationPeriod).forecastAmount).Select(forecastAmount => Helpers.GetDiscountCurveName(forecastAmount.currency))); } return(result); }