Package org.jquantlib.processes

Examples of org.jquantlib.processes.BlackScholesMertonProcess


                      dividendDates.add(d.clone());
                      dividends.add(5.0);
                  }

                  final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike);
                  final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);
                  final PricingEngine engine = new AnalyticDividendEuropeanEngine(stochProcess);

                  final DividendVanillaOption option = new DividendVanillaOption(payoff, exercise, dividendDates, dividends);
                  option.setPricingEngine(engine);
View Full Code Here


                      dividendDates.add(d.clone());
                      dividends.add(5.0);
                  }

                  final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike);
                  final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);
                  final PricingEngine engine = new FDDividendEuropeanEngine(stochProcess, timeSteps, gridPoints);
                  final PricingEngine ref_engine = new AnalyticDividendEuropeanEngine(stochProcess);

                  final DividendVanillaOption option = new DividendVanillaOption(payoff, exercise, dividendDates, dividends);
                  option.setPricingEngine(engine);
View Full Code Here

                           d.addAssign(new Period(6, TimeUnit.Months))) {
                    dividendDates.add(d.clone());
                    dividends.add(5.0);
                }

                final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);
                final PricingEngine engine;
                try {
                    final Constructor<T> baseConstructor = engineClass.getConstructor(GeneralizedBlackScholesProcess.class);
                    engine = baseConstructor.newInstance(stochProcess);
                } catch (final Exception e) {
View Full Code Here

        final DayCounter dc = new Actual360();
        final SimpleQuote spot = new SimpleQuote(54.625);
        final Handle<YieldTermStructure> rTS = new Handle<YieldTermStructure>(Utilities.flatRate(0.052706, dc));
        final Handle<YieldTermStructure> qTS = new Handle<YieldTermStructure>(Utilities.flatRate(0.0, dc));
        final Handle<BlackVolTermStructure> volTS = new Handle<BlackVolTermStructure>(Utilities.flatVol(0.282922, dc));
        final BlackScholesMertonProcess process = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);

        final /* @Size */ int timeSteps = 40;
        final /* @Size */ int gridPoints = 300;

        final PricingEngine engine;
View Full Code Here

        final Handle<YieldTermStructure> flatDividendTS = new Handle<YieldTermStructure>(new FlatForward(settlementDate, dividendYield, dayCounter));
        final Handle<YieldTermStructure> flatTermStructure = new Handle<YieldTermStructure>(new FlatForward(settlementDate, riskFreeRate, dayCounter));
        final Handle<BlackVolTermStructure> flatVolTS = new Handle<BlackVolTermStructure>(new BlackConstantVol(settlementDate, calendar, volatility, dayCounter));
        final Payoff payoff = new PlainVanillaPayoff(type, strike);

        final BlackScholesMertonProcess bsmProcess = new BlackScholesMertonProcess(underlyingH, flatDividendTS, flatTermStructure, flatVolTS);

        // European Options
        final VanillaOption europeanOption = new EuropeanOption(payoff, europeanExercise);

        // Bermudan options (can be thought as a collection of European Options)
View Full Code Here

        final Handle<YieldTermStructure> dividendYield = new Handle(new FlatForward(today, 0.0, dayCount));

        final Handle<BlackVolTermStructure> volatility = new Handle(new BlackConstantVol(today, calendar, sigma_.doubleValue(),dayCount));

        final StochasticProcess1D diffusion = new BlackScholesMertonProcess(
                stateVariable, dividendYield, riskFreeRate, volatility);


        // Black Scholes equation rules the path generator:
        // at each step the log of the stock
View Full Code Here

        final Handle<YieldTermStructure> flatDividendTS = new Handle<YieldTermStructure>(
                new FlatForward(settlementDate, dividendYield, dayCounter));
        final Handle<BlackVolTermStructure> flatVolTS = new Handle<BlackVolTermStructure>(
                new BlackConstantVol(settlementDate, calendar, volatility, dayCounter));

        final BlackScholesMertonProcess stochasticProcess = new BlackScholesMertonProcess(
                underlyingH, flatDividendTS, flatTermStructure, flatVolTS);

        final int timeSteps = 801;

        final Handle<Quote> creditSpread = new Handle<Quote>(new SimpleQuote(spreadRate));
View Full Code Here

        Handle<Quote> underlyingH = new Handle<Quote>(new SimpleQuote(underlying));
        Handle<YieldTermStructure> flatDividendTS = new Handle<YieldTermStructure>(new FlatForward(settlementDate, dividendYield, dayCounter));
        Handle<YieldTermStructure> flatTermStructure = new Handle<YieldTermStructure>(new FlatForward(settlementDate, riskFreeRate, dayCounter));
        Handle<BlackVolTermStructure> flatVolTS = new Handle<BlackVolTermStructure>(new BlackConstantVol(settlementDate, calendar, volatility, dayCounter));

        GeneralizedBlackScholesProcess stochasticProcess = new BlackScholesMertonProcess(underlyingH, flatDividendTS, flatTermStructure, flatVolTS);

        VanillaOption europeanOption = new EuropeanOption(payoff, europeanExercise);

        europeanOption.setPricingEngine(new AnalyticEuropeanEngine(stochasticProcess));
View Full Code Here

    private GeneralizedBlackScholesProcess makeProcess(
            final Quote u,
            final YieldTermStructure q,
            final YieldTermStructure r,
            final BlackVolTermStructure vol) {
        return new BlackScholesMertonProcess(
                new Handle<Quote>(u),
                new Handle<YieldTermStructure>(q),
                new Handle<YieldTermStructure>(r),
                new Handle<BlackVolTermStructure>(vol));
    }
View Full Code Here

            qRate.setValue(values[i].q);
            rRate.setValue(values[i].r);
            vol.setValue(values[i].v);


            final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
                    new Handle<Quote>(spot),
                    new Handle<YieldTermStructure>(qTS),
                    new Handle<YieldTermStructure>(rTS),
                    new Handle<BlackVolTermStructure>(volTS));
View Full Code Here

TOP

Related Classes of org.jquantlib.processes.BlackScholesMertonProcess

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.