Examples of GeneralizedBlackScholesProcess


Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

            final BlackVolTermStructure vol,
            final EngineType engineType,
            final int binomialSteps,
            final int samples) {

        final GeneralizedBlackScholesProcess stochProcess = makeProcess(u,q,r,vol);
        final PricingEngine engine;

        switch (engineType) {
            case Analytic:
                engine = new AnalyticEuropeanEngine(stochProcess);
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

                    final Date exDate = today.add( length );
                    final Exercise exercise = new EuropeanExercise(exDate);
                    final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike2);
                    final VanillaOption option = makeOption(payoff, exercise, spot, qTS, rTS, volTS, EngineType.Analytic, 0, 0);

                    final GeneralizedBlackScholesProcess process = makeProcess(spot, qTS, rTS,volTS);

                    for (final double u : underlyings) {
                        for (final double q : qRates) {
                            for (final double r : rRates) {
                                for (final double v : vols) {
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

            final BlackVolTermStructure vol,
            final EngineType engineType,
            /* @Size */final int binomialSteps,
            /* @Size */final int samples) {

        final GeneralizedBlackScholesProcess stochProcess = makeProcess(u, q, r, vol);

        PricingEngine engine;
        switch (engineType) {
        case Analytic:
            engine = new AnalyticEuropeanEngine(stochProcess);
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

            /*@Volatility*/ final double minVol,
            /*@Volatility*/ final double maxVol) /* @ReadOnly */ {

        QL.require(!isExpired(), "option expired");
        final SimpleQuote volQuote = new SimpleQuote();
        final GeneralizedBlackScholesProcess newProcess = ImpliedVolatilityHelper.clone(process, volQuote);

        // engines are built-in for the time being
        final PricingEngine engine;
        switch (exercise.type()) {
            case European:
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

            final /*@Volatility*/ double minVol,
            final /*@Volatility*/ double maxVol) /* @ReadOnly */ {

        QL.require(!isExpired(), "option expired");
        final SimpleQuote volQuote = new SimpleQuote();
        final GeneralizedBlackScholesProcess newProcess = ImpliedVolatilityHelper.clone(process, volQuote);

        // engines are built-in for the time being
        final PricingEngine engine;
        switch (exercise.type()) {
          case European:
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

                new BlackConstantVol(referenceDate, volcal, v, voldc));

        QL.require(a.payoff != null, "non-plain payoff given");
        final PlainVanillaPayoff payoff = (PlainVanillaPayoff) a.payoff;
        final /*@Time*/ double maturity = rfdc.yearFraction(a.settlementDate, maturityDate);
        final GeneralizedBlackScholesProcess bs = new GeneralizedBlackScholesProcess(underlying, flatDividends, flatRiskFree, flatVol);

        // final T tree = new T(bs, maturity, timeSteps_, payoff.strike());
        final T tree;
        try {
            final Constructor<T> c = clazz.getConstructor(StochasticProcess1D.class, double.class, int.class, double.class);
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

        final PlainVanillaPayoff payoff = (PlainVanillaPayoff) a.payoff;
        QL.require(payoff!=null , "non-plain payoff given"); // QA:[RG]::verified // TODO: message

        final double maturity = rfdc.yearFraction(referenceDate, maturityDate);

        final StochasticProcess1D bs = new GeneralizedBlackScholesProcess(process.stateVariable(), flatDividends, flatRiskFree, flatVol);
        final TimeGrid grid = new TimeGrid(maturity, timeSteps_);
        final Tree tree = (Tree)getTreeInstance(bs, maturity, timeSteps_, payoff.strike());

        final BlackScholesLattice<Tree> lattice = new BlackScholesLattice<Tree>(tree, rRate, maturity, timeSteps_);
        final DiscretizedVanillaOption option = new DiscretizedVanillaOption(a, process, grid);
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

        final RelinkableHandle<YieldTermStructure> riskFreeTS =
            new RelinkableHandle<YieldTermStructure>(process.riskFreeRate().currentLink());
        final RelinkableHandle<BlackVolTermStructure> volTS =
            new RelinkableHandle<BlackVolTermStructure>(process.blackVolatility().currentLink());

        final GeneralizedBlackScholesProcess bsProcess =
            new GeneralizedBlackScholesProcess(stateVariable, dividendTS, riskFreeTS, volTS);

        final AnalyticEuropeanEngine baseEngine = new AnalyticEuropeanEngine(bsProcess);

        final VanillaOption.ArgumentsImpl baseArguments = (VanillaOption.ArgumentsImpl) baseEngine.getArguments();
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

                        blackVol.currentLink().referenceDate(),
                        blackVol.currentLink().calendar(),
                        new Handle<Quote>(volQuote),
                        blackVol.currentLink().dayCounter()));

        return new GeneralizedBlackScholesProcess(stateVariable, dividendYield, riskFreeRate, volatility);
    }
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess

        final PlainVanillaPayoff payoff = (PlainVanillaPayoff)(this.a.payoff);
        QL.require(payoff != null, "non-plain payoff given");

        final double maturity = rfdc.yearFraction(this.a.settlementDate, maturityDate);

        final GeneralizedBlackScholesProcess bs = new GeneralizedBlackScholesProcess(underlying, flatDividends,
                                                    flatRiskFree, flatVol);
        // final T tree = new T(bs, maturity, timeSteps_, payoff.strike());
        final T tree;
        try {
            final Constructor<T> c = typeT.getConstructor(StochasticProcess1D.class, double.class, int.class, double.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.