public Integrand(Payoff payoff, double s0, double drift, double variance) { payoff_ = payoff; s0_ = s0; drift_ = drift; variance_ = variance; }
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(); } }
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; }
public FdmLogInnerValue(Payoff payoff, FdmMesher mesher, int direction) { payoff_ = payoff; mesher_ = mesher; direction_ = direction; avgInnerValues_ = new List <double>(); }
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; }
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(); }
//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); }
//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); }
public void visit(Payoff p) { throw new NotSupportedException("unsupported payoff type: " + p.name()); }
public Option(Payoff payoff, Exercise exercise) { payoff_ = payoff; exercise_ = exercise; }
public PayoffWrapper(Option.Type type, double strike) { payoff_ = new PlainVanillaPayoff(type, strike); }
public void visit(Payoff p) { Utils.QL_FAIL("unsupported payoff type: " + p.name()); }
public AverageBasketPayoff(Payoff p, Vector a) : base(p) { weights_ = a; }
public MinBasketPayoff(Payoff p) : base(p) { }
public SpreadBasketPayoff(Payoff p) : base(p) { }
public StrikedTypePayoff(Payoff p) : base((p as StrikedTypePayoff).type_) { strike_ = (p as StrikedTypePayoff).strike_; }
public HestonHullWhitePathPricer(double exerciseTime, Payoff payoff, HybridHestonHullWhiteProcess process) { exerciseTime_ = exerciseTime; payoff_ = payoff; process_ = process; }
protected BasketPayoff(Payoff p) { basePayoff_ = p; }
public BasketPayoff(Payoff p) { basePayoff_ = p; }
public MaxBasketPayoff(Payoff p) : base(p) { }
public AverageBasketPayoff(Payoff p, int n) : base(p) { weights_ = new Vector(n, 1.0 / n); }
protected CurveDependentStepCondition(Payoff p) { curveItem_ = new PayoffWrapper(p); }
public MultiAssetOption(Payoff payoff, Exercise exercise) : base(payoff, exercise) { }
public PayoffWrapper(Payoff p) { payoff_ = p; }