// private constructor private SabrIborCapletFloorletVolatilityBootstrapper(VolatilityIborCapFloorLegPricer pricer, SabrIborCapletFloorletPeriodPricer sabrPeriodPricer, NonLinearLeastSquare solver, ReferenceData referenceData) : base(pricer, referenceData) { this.sabrPeriodPricer = ArgChecker.notNull(sabrPeriodPricer, "sabrPeriodPricer"); 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 VolatilityIborCapFloorProductPricer(VolatilityIborCapFloorLegPricer capFloorLegPricer, DiscountingSwapLegPricer payLegPricer) { this.capFloorLegPricer = ArgChecker.notNull(capFloorLegPricer, "capFloorLegPricer"); this.payLegPricer = ArgChecker.notNull(payLegPricer, "payLegPricer"); }
//------------------------------------------------------------------------- /// <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/floor pricer to convert quoted volatilities to prices </param> /// <param name="sabrPeriodPricer"> the SABR pricer </param> /// <param name="epsilon"> the epsilon parameter </param> /// <param name="referenceData"> the reference data </param> /// <returns> the instance </returns> public static SabrIborCapletFloorletVolatilityBootstrapper of(VolatilityIborCapFloorLegPricer pricer, SabrIborCapletFloorletPeriodPricer sabrPeriodPricer, double epsilon, ReferenceData referenceData) { NonLinearLeastSquare solver = new NonLinearLeastSquare(SV_COMMONS, OG_ALGEBRA, epsilon); return(new SabrIborCapletFloorletVolatilityBootstrapper(pricer, sabrPeriodPricer, solver, referenceData)); }
// private constructor private DirectIborCapletFloorletVolatilityCalibrator(VolatilityIborCapFloorLegPricer pricer, double epsilon, ReferenceData referenceData) : base(pricer, referenceData) { this.solver = new NonLinearLeastSquareWithPenalty(new CholeskyDecompositionCommons(), epsilon); }
/// <summary> /// Obtains an instance. /// <para> /// The epsilon is the parameter used in <seealso cref="NonLinearLeastSquareWithPenalty"/>, /// where the iteration stops when certain quantities are smaller than this parameter. /// /// </para> /// </summary> /// <param name="pricer"> the cap pricer </param> /// <param name="epsilon"> the epsilon parameter </param> /// <param name="referenceData"> the reference data </param> /// <returns> the instance </returns> public static DirectIborCapletFloorletVolatilityCalibrator of(VolatilityIborCapFloorLegPricer pricer, double epsilon, ReferenceData referenceData) { return(new DirectIborCapletFloorletVolatilityCalibrator(pricer, epsilon, referenceData)); }
/// <summary> /// Constructor with cap pricer and reference data. /// </summary> /// <param name="pricer"> the cap pricer </param> /// <param name="referenceData"> the reference data </param> public IborCapletFloorletVolatilityCalibrator(VolatilityIborCapFloorLegPricer pricer, ReferenceData referenceData) { this.pricer = ArgChecker.notNull(pricer, "pricer"); this.referenceData = ArgChecker.notNull(referenceData, "referenceData"); }
// private constructor private SurfaceIborCapletFloorletVolatilityBootstrapper(VolatilityIborCapFloorLegPricer pricer, ReferenceData referenceData) : base(pricer, referenceData) { }
//------------------------------------------------------------------------- /// <summary> /// Creates an instance. /// </summary> /// <param name="pricer"> the cap pricer </param> /// <param name="referenceData"> the reference data </param> /// <returns> the instance </returns> public static SurfaceIborCapletFloorletVolatilityBootstrapper of(VolatilityIborCapFloorLegPricer pricer, ReferenceData referenceData) { return(new SurfaceIborCapletFloorletVolatilityBootstrapper(pricer, referenceData)); }