public FixedFloatSwapCurveInstrument(Tenor tenor, FloatRateIndex index, double spread, double fixedRate, DiscountingSourceDescription discountCurveDescription, CurveToStrip curveToStrip) { _tenor = tenor; _index = index; _spread = spread; _fixedRate = fixedRate; _discountCurveDescription = discountCurveDescription; switch (curveToStrip) { case CurveToStrip.Forecast: { _nameOfCurveToStrip = new FloatingRateSourceDescription(index).Name; break; } case CurveToStrip.Discount: { _nameOfCurveToStrip = _discountCurveDescription.Name; break; } default: throw new ArgumentOutOfRangeException(nameof(curveToStrip), curveToStrip, null); } }
public BasisSwapCurveInstrument(Tenor tenor, FloatRateIndex leg1Index, FloatRateIndex leg2Index, double leg1Spread, double leg2Spread, DiscountingSourceDescription discountCurveDescription, CurveToStrip curveToStrip) { _tenor = tenor; _leg1Index = leg1Index; _leg2Index = leg2Index; _leg1Spread = leg1Spread; _leg2Spread = leg2Spread; _discountCurveDescription = discountCurveDescription; switch (curveToStrip) { case CurveToStrip.Leg1Forecast: { _curveName = new FloatingRateSourceDescription(leg1Index).Name; break; } case CurveToStrip.Leg2Forecast: { _curveName = new FloatingRateSourceDescription(leg2Index).Name; break; } case CurveToStrip.DiscountCurve: { _curveName = _discountCurveDescription.Name; break; } default: throw new ArgumentOutOfRangeException(nameof(curveToStrip), curveToStrip, null); } }