Package org.jquantlib.processes

Examples of org.jquantlib.processes.BlackScholesMertonProcess


        for (final BarrierOptionData value : values) {
            volatility.setValue(value.volatility);
            final StrikedTypePayoff callPayoff = new PlainVanillaPayoff(Option.Type.Call, value.strike);

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


      underlying.linkTo(new SimpleQuote(50.0));
      dividendYield.linkTo(Utilities.flatRate(today, 0.02, dayCounter));
      riskFreeRate.linkTo(Utilities.flatRate(today, 0.05, dayCounter));
      volatility.linkTo(Utilities.flatVol(today, 0.15, dayCounter));

      process = new BlackScholesMertonProcess(underlying, dividendYield,
          riskFreeRate, volatility);

      creditSpread.linkTo(new SimpleQuote(0.005));

      // it fails with 1000000
View Full Code Here

        final Handle<YieldTermStructure> rTS = new Handle<YieldTermStructure>(flatRate(referenceDate, rRate, dc));
        final Handle<YieldTermStructure> qTS = new Handle<YieldTermStructure>(flatRate(referenceDate, qRate, dc));
        final Handle<BlackVolTermStructure> volTS = new Handle<BlackVolTermStructure>(flatVol(referenceDate, vol, cal, dc));

        // obtain stochastic process
        this.stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);

        // obtain a pricing engine and assign to this option :: 3 intervals a day
        final int timeSteps = (int) (exercise.lastDate().sub(referenceDate) * 3);
        final PricingEngine engine;
        try {
View Full Code Here

        final SimpleQuote rRate = new SimpleQuote(0.06);
        final YieldTermStructure rTS = Utilities.flatRate(today, rRate.value(), dc);
        final SimpleQuote vol = new SimpleQuote(0.20);
        final BlackVolTermStructure volTS = Utilities.flatVol(today, vol.value(), dc);

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

        final PricingEngine engine = new AnalyticDiscreteGeometricAveragePriceAsianEngine(stochProcess);

        final AverageType averageType = AverageType.Geometric;
View Full Code Here

        final Handle<YieldTermStructure> rTS = new Handle<YieldTermStructure>(flatRate(referenceDate, rRate, dc));
        final Handle<YieldTermStructure> qTS = new Handle<YieldTermStructure>(flatRate(referenceDate, qRate, dc));
        final Handle<BlackVolTermStructure> volTS = new Handle<BlackVolTermStructure>(flatVol(referenceDate, vol, cal, dc));

        // obtain stochastic process
        this.stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);

        // obtain a pricing engine and assign to this option :: 3 intervals a day
        final int timeSteps = (int) (exercise.lastDate().sub(referenceDate) * 3);
        final PricingEngine engine = new BinomialDividendVanillaEngine<CoxRossRubinstein>(CoxRossRubinstein.class, stochProcess, timeSteps) { /* anonymous */ };

View Full Code Here

        final SimpleQuote           rRate = new SimpleQuote(0.0);
        final YieldTermStructure    rTS   = Utilities.flatRate(rRate, dc);
        final SimpleQuote           vol   = new SimpleQuote(0.0);
        final BlackVolTermStructure volTS = Utilities.flatVol(vol, dc);

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

        final SimpleQuote           rRate = new SimpleQuote(0.05);
        final YieldTermStructure    rTS   = Utilities.flatRate(today, rRate, dc);
        final SimpleQuote           vol   = new SimpleQuote(0.20);
        final BlackVolTermStructure volTS = Utilities.flatVol(today, vol, dc);

        final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
                new Handle<Quote>(spot), new Handle<YieldTermStructure>(qTS),
                new Handle<YieldTermStructure>(rTS), new Handle<BlackVolTermStructure>(volTS));
        final PricingEngine engine = new AnalyticContinuousGeometricAveragePriceAsianEngine(stochProcess);

        final AverageType averageType = AverageType.Geometric;
View Full Code Here

        final SimpleQuote           rRate = new SimpleQuote(0.0);
        final YieldTermStructure    rTS   = Utilities.flatRate(rRate, dc);
        final SimpleQuote           vol   = new SimpleQuote(0.0);
        final BlackVolTermStructure volTS = Utilities.flatVol(vol, dc);

        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

            spot.setValue(value.s);
            qRate.setValue(value.q);
            rRate.setValue(value.r);
            vol.setValue(value.v);

            final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
                    new Handle<Quote>(spot),
                    new Handle<YieldTermStructure>(qTS),
                    new Handle<YieldTermStructure>(rTS),
                    new Handle<BlackVolTermStructure>(volTS));
            final PricingEngine engine = new BjerksundStenslandApproximationEngine(stochProcess);
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.