// private constructor private SabrIborCapletFloorletVolatilityCalibrator(VolatilityIborCapFloorLegPricer pricer, SabrIborCapFloorLegPricer sabrPricer, NonLinearLeastSquare solver, ReferenceData referenceData) : base(pricer, referenceData) { this.sabrPricer = ArgChecker.notNull(sabrPricer, "sabrPricer"); this.solver = ArgChecker.notNull(solver, "solver"); }
/// <summary> /// Creates an instance. /// </summary> /// <param name="capFloorLegPricer"> the pricer for <seealso cref="IborCapFloorLeg"/> </param> /// <param name="payLegPricer"> the pricer for <seealso cref="SwapLeg"/> </param> public SabrIborCapFloorProductPricer(SabrIborCapFloorLegPricer capFloorLegPricer, DiscountingSwapLegPricer payLegPricer) : base(capFloorLegPricer, payLegPricer) { this.capFloorLegPricer = capFloorLegPricer; }
//------------------------------------------------------------------------- /// <summary> /// Creates an instance. /// <para> /// The epsilon is the parameter used in <seealso cref="NonLinearLeastSquare"/>, where the iteration stops when certain /// quantities are smaller than this parameter. /// /// </para> /// </summary> /// <param name="pricer"> the cap pricer </param> /// <param name="sabrPricer"> the SABR cap pricer </param> /// <param name="epsilon"> the epsilon parameter </param> /// <param name="referenceData"> the reference data </param> /// <returns> the instance </returns> public static SabrIborCapletFloorletVolatilityCalibrator of(VolatilityIborCapFloorLegPricer pricer, SabrIborCapFloorLegPricer sabrPricer, double epsilon, ReferenceData referenceData) { NonLinearLeastSquare solver = new NonLinearLeastSquare(SV_COMMONS, OG_ALGEBRA, epsilon); return(new SabrIborCapletFloorletVolatilityCalibrator(pricer, sabrPricer, solver, referenceData)); }