コード例 #1
0
 public Integrand(Payoff payoff, double s0, double drift, double variance)
 {
     payoff_   = payoff;
     s0_       = s0;
     drift_    = drift;
     variance_ = variance;
 }
コード例 #2
0
ファイル: Integralengine.cs プロジェクト: akasolace/qlnet
 public Integrand(Payoff payoff, double s0, double drift, double variance)
 {
     payoff_ = payoff;
     s0_ = s0;
     drift_ = drift;
     variance_ = variance;
 }
コード例 #3
0
ファイル: mcamericanengine.cs プロジェクト: tzhdingli/qlnet
        public AmericanPathPricer(Payoff payoff, int polynomOrder, LsmBasisSystem.PolynomType polynomType)
        {
            scalingValue_ = 1;
            payoff_       = payoff;
            v_            = LsmBasisSystem.pathBasisSystem(polynomOrder, polynomType);

            if (!(polynomType == LsmBasisSystem.PolynomType.Monomial ||
                  polynomType == LsmBasisSystem.PolynomType.Laguerre ||
                  polynomType == LsmBasisSystem.PolynomType.Hermite ||
                  polynomType == LsmBasisSystem.PolynomType.Hyperbolic ||
                  polynomType == LsmBasisSystem.PolynomType.Chebyshev2th))
            {
                throw new ApplicationException("insufficient polynom type");
            }

            // the payoff gives an additional value
            v_.Add(this.payoff);

            StrikedTypePayoff strikePayoff = payoff_ as StrikedTypePayoff;

            if (strikePayoff != null)
            {
                scalingValue_ /= strikePayoff.strike();
            }
        }
コード例 #4
0
        public virtual void setupArguments(IPricingEngineArguments a)
        {
            OneAssetOption.Arguments args = a as OneAssetOption.Arguments;
            Utils.QL_REQUIRE(args != null, () => "incorrect argument type");

            exerciseDate_ = args.exercise.lastDate();
            payoff_       = args.payoff;
        }
コード例 #5
0
 public FdmLogInnerValue(Payoff payoff,
                         FdmMesher mesher,
                         int direction)
 {
     payoff_         = payoff;
     mesher_         = mesher;
     direction_      = direction;
     avgInnerValues_ = new List <double>();
 }
コード例 #6
0
        public virtual void setupArguments(IPricingEngineArguments a)
        {
            OneAssetOption.Arguments args = a as OneAssetOption.Arguments;
            if (args == null)
            {
                throw new ApplicationException("incorrect argument type");
            }

            exerciseDate_ = args.exercise.lastDate();
            payoff_       = args.payoff;
        }
コード例 #7
0
        public virtual void setupArguments(IPricingEngineArguments a)
        {
            OneAssetOption.Arguments args = a as OneAssetOption.Arguments;
            if (args == null)
            {
                throw new ApplicationException("incorrect argument type");
            }

            exerciseDate_      = args.exercise.lastDate();
            payoff_            = args.payoff;
            requiredGridValue_ = ((StrikedTypePayoff)payoff_).strike();
        }
コード例 #8
0
		//protected Forward(DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention,
		//                  int settlementDays, Payoff payoff, Date valueDate, Date maturityDate,
		//                  Handle<YieldTermStructure> discountCurve = Handle<YieldTermStructure>()) {
		protected Forward(DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention,
						  int settlementDays, Payoff payoff, Date valueDate, Date maturityDate,
						  Handle<YieldTermStructure> discountCurve) {
			dayCounter_ = dayCounter;
			calendar_ = calendar;
			businessDayConvention_ = businessDayConvention;
			settlementDays_ = settlementDays;
			payoff_ = payoff;
			valueDate_ = valueDate;
			maturityDate_ = maturityDate;
			discountCurve_ = discountCurve;

			maturityDate_ = calendar_.adjust(maturityDate_, businessDayConvention_);

			Settings.registerWith(update);
			discountCurve_.registerWith(update);
		}
コード例 #9
0
        //protected Forward(DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention,
        //                  int settlementDays, Payoff payoff, Date valueDate, Date maturityDate,
        //                  Handle<YieldTermStructure> discountCurve = Handle<YieldTermStructure>()) {
        protected Forward(DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention,
                          int settlementDays, Payoff payoff, Date valueDate, Date maturityDate,
                          Handle <YieldTermStructure> discountCurve)
        {
            dayCounter_            = dayCounter;
            calendar_              = calendar;
            businessDayConvention_ = businessDayConvention;
            settlementDays_        = settlementDays;
            payoff_        = payoff;
            valueDate_     = valueDate;
            maturityDate_  = maturityDate;
            discountCurve_ = discountCurve;

            maturityDate_ = calendar_.adjust(maturityDate_, businessDayConvention_);

            Settings.registerWith(update);
            discountCurve_.registerWith(update);
        }
コード例 #10
0
ファイル: BlackCalculator.cs プロジェクト: akasolace/qlnet
 public void visit(Payoff p) {
     throw new NotSupportedException("unsupported payoff type: " + p.name());
 }
コード例 #11
0
 public Option(Payoff payoff, Exercise exercise)
 {
     payoff_   = payoff;
     exercise_ = exercise;
 }
コード例 #12
0
ファイル: StepCondition.cs プロジェクト: sandboxorg/QLNet
 public PayoffWrapper(Option.Type type, double strike)
 {
     payoff_ = new PlainVanillaPayoff(type, strike);
 }
コード例 #13
0
 public void visit(Payoff p)
 {
     Utils.QL_FAIL("unsupported payoff type: " + p.name());
 }
コード例 #14
0
 public void visit(Payoff p)
 {
     throw new NotSupportedException("unsupported payoff type: " + p.name());
 }
コード例 #15
0
ファイル: BasketOption.cs プロジェクト: igitur/qlnet
 public AverageBasketPayoff(Payoff p, Vector a) : base(p)
 {
     weights_ = a;
 }
コード例 #16
0
ファイル: BasketOption.cs プロジェクト: igitur/qlnet
 public MinBasketPayoff(Payoff p) : base(p)
 {
 }
コード例 #17
0
ファイル: BasketOption.cs プロジェクト: igitur/qlnet
 public SpreadBasketPayoff(Payoff p)
     : base(p)
 {
 }
コード例 #18
0
ファイル: Payoffs.cs プロジェクト: igitur/qlnet
 public StrikedTypePayoff(Payoff p)
     : base((p as StrikedTypePayoff).type_)
 {
     strike_ = (p as StrikedTypePayoff).strike_;
 }
コード例 #19
0
 public HestonHullWhitePathPricer(double exerciseTime, Payoff payoff, HybridHestonHullWhiteProcess process)
 {
     exerciseTime_ = exerciseTime;
     payoff_       = payoff;
     process_      = process;
 }
コード例 #20
0
ファイル: BasketOption.cs プロジェクト: igitur/qlnet
 protected BasketPayoff(Payoff p)
 {
     basePayoff_ = p;
 }
コード例 #21
0
 public BasketPayoff(Payoff p)
 {
     basePayoff_ = p;
 }
コード例 #22
0
ファイル: BasketOption.cs プロジェクト: igitur/qlnet
 public MaxBasketPayoff(Payoff p) : base(p)
 {
 }
コード例 #23
0
ファイル: Option.cs プロジェクト: Yenyenx/qlnet
 public Option(Payoff payoff, Exercise exercise)
 {
     payoff_ = payoff;
     exercise_ = exercise;
 }
コード例 #24
0
ファイル: BasketOption.cs プロジェクト: igitur/qlnet
 public AverageBasketPayoff(Payoff p, int n) : base(p)
 {
     weights_ = new Vector(n, 1.0 / n);
 }
コード例 #25
0
ファイル: StepCondition.cs プロジェクト: sandboxorg/QLNet
 protected CurveDependentStepCondition(Payoff p)
 {
     curveItem_ = new PayoffWrapper(p);
 }
コード例 #26
0
 public MultiAssetOption(Payoff payoff, Exercise exercise) : base(payoff, exercise)
 {
 }
コード例 #27
0
ファイル: StepCondition.cs プロジェクト: sandboxorg/QLNet
 public PayoffWrapper(Payoff p)
 {
     payoff_ = p;
 }