Наследование: FloatingRateCouponPricer
Пример #1
0
        public void visit(CappedFlooredIborCoupon c)
        {
            IborCouponPricer iborCouponPricer = pricer_ as IborCouponPricer;

            Utils.QL_REQUIRE(iborCouponPricer != null, () => "pricer not compatible with Ibor coupon");
            c.setPricer(iborCouponPricer);
        }
Пример #2
0
        public void visit(DigitalIborCoupon c)
        {
            IborCouponPricer pricer = pricer_ as IborCouponPricer;

            if (pricer == null)
            {
                throw new ApplicationException("pricer not compatible with Ibor coupon");
            }
            c.setPricer(pricer);
        }
Пример #3
0
            //public IndexHistoryCleaner indexCleaner;
            // initial setup
            public CommonVars()
            {
                backup = new SavedSettings();
                //indexCleaner = new IndexHistoryCleaner();
                termStructure = new RelinkableHandle<YieldTermStructure>();
                int swapSettlementDays = 2;
                faceAmount = 100.0;
                BusinessDayConvention fixedConvention = BusinessDayConvention.Unadjusted;
                compounding = Compounding.Continuous;
                Frequency fixedFrequency = Frequency.Annual;
                Frequency floatingFrequency = Frequency.Semiannual;
                iborIndex = new Euribor(new Period(floatingFrequency), termStructure);
                Calendar calendar = iborIndex.fixingCalendar();
                swapIndex=  new SwapIndex("EuriborSwapIsdaFixA", new Period(10,TimeUnit.Years), swapSettlementDays,
                                      iborIndex.currency(), calendar,
                                      new Period(fixedFrequency), fixedConvention,
                                      iborIndex.dayCounter(), iborIndex);
                spread = 0.0;
                nonnullspread = 0.003;
                Date today = new Date(24,Month.April,2007);
                Settings.setEvaluationDate(today);

                //Date today = Settings::instance().evaluationDate();
                termStructure.linkTo(Utilities.flatRate(today, 0.05, new Actual365Fixed()));

                pricer = new BlackIborCouponPricer();
                Handle<SwaptionVolatilityStructure> swaptionVolatilityStructure =
                   new Handle<SwaptionVolatilityStructure>(new ConstantSwaptionVolatility(today,
                   new NullCalendar(),BusinessDayConvention.Following, 0.2, new Actual365Fixed()));

                Handle<Quote> meanReversionQuote = new Handle<Quote>(new SimpleQuote(0.01));
                cmspricer = new AnalyticHaganPricer(swaptionVolatilityStructure, GFunctionFactory.YieldCurveModel.Standard, meanReversionQuote);
            }
Пример #4
0
 public MakeCms withFloatingCouponPricer(IborCouponPricer couponPricer)
 {
     iborCouponPricer_ = couponPricer;
     return(this);
 }