Пример #1
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;
        }
 public FdmLogInnerValue(Payoff payoff,
                         FdmMesher mesher,
                         int direction)
 {
     payoff_         = payoff;
     mesher_         = mesher;
     direction_      = direction;
     avgInnerValues_ = new List <double>();
 }
Пример #3
0
        public AmericanPathPricer(Payoff payoff, int polynomOrder, LsmBasisSystem.PolynomType polynomType)
        {
            scalingValue_ = 1;
            payoff_       = payoff;
            v_            = LsmBasisSystem.pathBasisSystem(polynomOrder, polynomType);

            Utils.QL_REQUIRE((polynomType == LsmBasisSystem.PolynomType.Monomial ||
                              polynomType == LsmBasisSystem.PolynomType.Laguerre ||
                              polynomType == LsmBasisSystem.PolynomType.Hermite ||
                              polynomType == LsmBasisSystem.PolynomType.Hyperbolic ||
                              polynomType == LsmBasisSystem.PolynomType.Chebyshev2th), () => "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 void visit(Payoff p)
 {
     Utils.QL_FAIL("unsupported payoff type: " + p.name());
 }
Пример #5
0
 public StrikedTypePayoff(Payoff p)
     : base((p as StrikedTypePayoff).type_)
 {
     strike_ = (p as StrikedTypePayoff).strike_;
 }
Пример #6
0
 public HestonHullWhitePathPricer(double exerciseTime, Payoff payoff, HybridHestonHullWhiteProcess process)
 {
     exerciseTime_ = exerciseTime;
     payoff_       = payoff;
     process_      = process;
 }
Пример #7
0
 public PayoffWrapper(Payoff p)
 {
     payoff_ = p;
 }
Пример #8
0
 protected CurveDependentStepCondition(Payoff p)
 {
     curveItem_ = new PayoffWrapper(p);
 }
Пример #9
0
 public PayoffWrapper(Option.Type type, double strike)
 {
     payoff_ = new PlainVanillaPayoff(type, strike);
 }