Esempio n. 1
0
        public SwaptionHelper(Period maturity,
                              Period length,
                              Handle <Quote> volatility,
                              IborIndex index,
                              Period fixedLegTenor,
                              DayCounter fixedLegDayCounter,
                              DayCounter floatingLegDayCounter,
                              Handle <YieldTermStructure> termStructure,
                              CalibrationErrorType errorType = CalibrationErrorType.RelativePriceError,
                              double?strike  = null,
                              double nominal = 1.0)
            : base(volatility, termStructure, errorType)
        {
            exerciseDate_          = null;
            endDate_               = null;
            maturity_              = maturity;
            length_                = length;
            fixedLegTenor_         = fixedLegTenor;
            index_                 = index;
            fixedLegDayCounter_    = fixedLegDayCounter;
            floatingLegDayCounter_ = floatingLegDayCounter;
            strike_                = strike;
            nominal_               = nominal;

            index_.registerWith(update);
        }
Esempio n. 2
0
        public SwaptionHelper(Date exerciseDate,
                              Date endDate,
                              Handle <Quote> volatility,
                              IborIndex index,
                              Period fixedLegTenor,
                              DayCounter fixedLegDayCounter,
                              DayCounter floatingLegDayCounter,
                              Handle <YieldTermStructure> termStructure,
                              CalibrationErrorType errorType = CalibrationErrorType.RelativePriceError,
                              double?strike       = null,
                              double nominal      = 1.0,
                              VolatilityType type = VolatilityType.ShiftedLognormal,
                              double shift        = 0.0)
            : base(volatility, termStructure, errorType, type, shift)
        {
            exerciseDate_          = exerciseDate;
            endDate_               = endDate;
            maturity_              = new Period(0, TimeUnit.Days);
            length_                = new Period(0, TimeUnit.Days);
            fixedLegTenor_         = fixedLegTenor;
            index_                 = index;
            fixedLegDayCounter_    = fixedLegDayCounter;
            floatingLegDayCounter_ = floatingLegDayCounter;
            strike_                = strike;
            nominal_               = nominal;

            index_.registerWith(update);
        }
Esempio n. 3
0
        SwaptionHelper( Date exerciseDate,
            Period length,
            Handle<Quote> volatility,
            IborIndex index,
            Period fixedLegTenor,
            DayCounter fixedLegDayCounter,
            DayCounter floatingLegDayCounter,
            Handle<YieldTermStructure> termStructure,
            CalibrationErrorType errorType = CalibrationErrorType.RelativePriceError,
            double? strike = null,
            double nominal = 1.0)
            : base(volatility, termStructure, errorType)
        {
            exerciseDate_ = exerciseDate;
            endDate_ = null;
            maturity_ = new Period(0,TimeUnit.Days);
            length_ = length;
            fixedLegTenor_ = fixedLegTenor;
            index_ = index;
            fixedLegDayCounter_ = fixedLegDayCounter;
            floatingLegDayCounter_ = floatingLegDayCounter;
            strike_ = strike;
            nominal_ = nominal;

            index_.registerWith( update );
        }
Esempio n. 4
0
	   protected CalibrationHelper( Handle<Quote> volatility, 
			Handle<YieldTermStructure> termStructure,
			CalibrationErrorType calibrationErrorType = CalibrationErrorType.RelativePriceError )
		{
			volatility_ = volatility;
			termStructure_ = termStructure;
			calibrationErrorType_ = calibrationErrorType;

			volatility_.registerWith( update );
			termStructure_.registerWith( update );
		}
Esempio n. 5
0
		public CalibrationHelper( Handle<Quote> volatility, 
			Handle<YieldTermStructure> termStructure,
			CalibrationErrorType calibrationErrorType = CalibrationErrorType.RelativePriceError )
		{
			volatility_ = volatility;
			termStructure_ = termStructure;
			calibrationErrorType_ = calibrationErrorType;

			volatility_.registerWith( update );
			termStructure_.registerWith( update );
		}
Esempio n. 6
0
        protected CalibrationHelper(Handle <Quote> volatility,
                                    Handle <YieldTermStructure> termStructure,
                                    CalibrationErrorType calibrationErrorType = CalibrationErrorType.RelativePriceError,
                                    VolatilityType type = VolatilityType.ShiftedLognormal,
                                    double shift        = 0.0)
        {
            volatility_           = volatility;
            termStructure_        = termStructure;
            calibrationErrorType_ = calibrationErrorType;
            volatilityType_       = type;
            shift_ = shift;

            volatility_.registerWith(update);
            termStructure_.registerWith(update);
        }
Esempio n. 7
0
        public CapHelper(Period length,
                         Handle <Quote> volatility,
                         IborIndex index,
                         // data for ATM swap-rate calculation
                         Frequency fixedLegFrequency,
                         DayCounter fixedLegDayCounter,
                         bool includeFirstSwaplet,
                         Handle <YieldTermStructure> termStructure,
                         CalibrationErrorType errorType = CalibrationErrorType.RelativePriceError)
            : base(volatility, termStructure, errorType)
        {
            length_              = length;
            index_               = index;
            fixedLegFrequency_   = fixedLegFrequency;
            fixedLegDayCounter_  = fixedLegDayCounter;
            includeFirstSwaplet_ = includeFirstSwaplet;

            index_.registerWith(update);
        }
Esempio n. 8
0
        public CapHelper( Period length,
            Handle<Quote> volatility,
            IborIndex index,
            // data for ATM swap-rate calculation
            Frequency fixedLegFrequency,
            DayCounter fixedLegDayCounter,
            bool includeFirstSwaplet,
            Handle<YieldTermStructure> termStructure,
            CalibrationErrorType errorType = CalibrationErrorType.RelativePriceError)
            : base(volatility, termStructure, errorType)
        {
            length_ = length;
            index_ = index;
            fixedLegFrequency_ = fixedLegFrequency;
            fixedLegDayCounter_ = fixedLegDayCounter;
            includeFirstSwaplet_ = includeFirstSwaplet;

            index_.registerWith(update);
        }