Examples of Exercise


Examples of org.jquantlib.exercise.Exercise

            QL.debug(values[i].toString());

            final StrikedTypePayoff payoff = new PlainVanillaPayoff(values[i].type, values[i].strike);
            final Date exDate = today.add( timeToDays(values[i].t) );
            final Exercise exercise = new EuropeanExercise(exDate);

            spot.setValue(values[i].s);
            qRate.setValue(values[i].q);
            rRate.setValue(values[i].r);
            vol.setValue(values[i].v);
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

        final BlackVolTermStructure volTS = Utilities.flatVol(today, vol, dc);


        StrikedTypePayoff payoff;
        Date exDate;
        Exercise exercise;
        double calculated;
        double error;

        int i = -1;
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

        for (final Type type : types) {
            for (final double strike : strikes) {
                for (final double residualTime : residualTimes) {

                    final Date exDate = today.add( timeToDays(residualTime) ); //TODO: code review
                    final Exercise exercise = new EuropeanExercise(exDate);

                    for (int kk=0; kk<4; kk++) {
                        StrikedTypePayoff payoff = null;
                        // option to check
                        if (kk==0) {
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

        for (final Type type : types) {
            for (final double strike2 : strikes) {
                for (final int length : lengths) {
                    // option to check
                    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);
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

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

        final Date exerciseDate = today.add(Period.ONE_YEAR_FORWARD);
        final Exercise exercise = new EuropeanExercise(exerciseDate);
        final StrikedTypePayoff payoff = new PlainVanillaPayoff(Option.Type.Call, 100);

        final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
                new Handle<Quote>(u),
                new Handle<YieldTermStructure>(qTS),
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

        for (final Type type : types) {
            for (final double strike3 : strikes) {
                for (final int length2 : lengths) {

                    final Date exDate = today.add(timeToDays(length2));
                    final Exercise exercise = new EuropeanExercise(exDate);

                    final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike3);

                    // reference option
                    final VanillaOption refOption = makeOption(payoff, exercise, spot, qTS, rTS, volTS, EngineType.Analytic, 0, 0);
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

        for (final HaugMertonData value : values) {
            final StrikedTypePayoff payoff = new PlainVanillaPayoff(value.type, value.strike);

            final Date exDate = today.add((int) (value.t * 360 + 0.5));
            final Exercise exercise = new EuropeanExercise(exDate);

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

View Full Code Here

Examples of org.jquantlib.exercise.Exercise

                        meanLogJump.setValue(element2);
                        for (final double element3 : jV) {
                            jumpVol.setValue(element3);
                            for (final double residualTime : residualTimes) {
                                final Date exDate = today.add((int) (residualTime * 360 + 0.5));
                                final Exercise exercise = new EuropeanExercise(exDate);

                                for (int kk = 0; kk < 1; kk++) {
                                    StrikedTypePayoff payoff = null;
                                    // option to check
                                    if (kk == 0) {
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

        for (final Type type : types)
            for (final double strike : strikes)
                for (final int length : lengths) {
                    final Date exDate = today.add(length * 360);
                    final Exercise exercise = new EuropeanExercise(exDate);
                    final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike);

                    // reference option
                    final VanillaOption refOption = makeOption(payoff, exercise, spot, qTS, rTS, volTS, EngineType.Analytic,
                            Constants.NULL_INTEGER, Constants.NULL_INTEGER);
View Full Code Here

Examples of org.jquantlib.exercise.Exercise

        final SimpleQuote           vol   = new SimpleQuote(0.0);
        final BlackVolTermStructure volTS = Utilities.flatVol(today, vol, dc);

        for (final NewBarrierOptionData value : values) {
            final Date exDate = today.add( timeToDays(value.t) );
            final Exercise exercise = new EuropeanExercise(exDate);

            spot.setValue(value.s);
            qRate.setValue(value.q);
            rRate.setValue(value.r);
            vol.setValue(value.v);
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.