Пример #1
0
        public LinearTsrPricer(Handle <SwaptionVolatilityStructure> swaptionVol,
                               Handle <Quote> meanReversion,
                               Handle <YieldTermStructure> couponDiscountCurve = null,
                               Settings settings     = null,
                               Integrator integrator = null)
            : base(swaptionVol)
        {
            meanReversion_       = meanReversion;
            couponDiscountCurve_ = couponDiscountCurve ?? new Handle <YieldTermStructure>();
            settings_            = settings ?? new Settings();
            volDayCounter_       = swaptionVol.link.dayCounter();
            integrator_          = integrator;

            if (!couponDiscountCurve_.empty())
            {
                couponDiscountCurve_.registerWith(update);
            }

            if (integrator_ == null)
            {
                integrator_ = new  GaussKronrodNonAdaptive(1E-10, 5000, 1E-10);
            }
        }
Пример #2
0
 private Integration(Algorithm intAlgo, Integrator integrator)
 {
     intAlgo_    = intAlgo;
     integrator_ = integrator;
 }