Package org.jquantlib.instruments

Examples of org.jquantlib.instruments.PlainVanillaPayoff


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

            final StrikedTypePayoff payoff = new PlainVanillaPayoff(value.type, value.strike);

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


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

        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),
View Full Code Here

        final Exercise exercise = new EuropeanExercise(exDate);

        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),
View Full Code Here

    final PricingEngine vanillaEngine = new BinomialVanillaEngine<CoxRossRubinstein>(CoxRossRubinstein.class, vars.process, timeSteps);

    vars.creditSpread.linkTo(new SimpleQuote(0.0));

    final double conversionStrike = vars.redemption / vars.conversionRatio;
    final StrikedTypePayoff payoff = new PlainVanillaPayoff(Option.Type.Call,
        conversionStrike);

    final Schedule schedule = new MakeSchedule(vars.issueDate, vars.maturityDate,
        new Period(Frequency.Once), vars.calendar,
        BusinessDayConvention.Following).backwards().schedule();
View Full Code Here

            final List<Date> dates,
            final List<Double> dividends,
            final Calendar cal,
            final DayCounter dc) {

        super(new PlainVanillaPayoff(type, strike), exercise, dates, dividends);

        this.cal = cal;
        this.dc = dc;

        final SimpleQuote spot = new SimpleQuote(0.0);
View Full Code Here

        /* @Real */final double runningAccumulator = 1.0;
        /* @Size */final int pastFixings = 0;
        /* @Size */final int futureFixings = 10;
        final Option.Type type = Option.Type.Call;
        /* @Real */final double strike = 100.0;
        final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike);

        final Date exerciseDate = today.clone().addAssign(360);
        final Exercise exercise = new EuropeanExercise(exerciseDate);

        QL.info("Exercise: " + exerciseDate);
View Full Code Here

                for (final int length : lengths) {

                    final Date exerciseDate = new Date(today.dayOfMonth(), today.month(), today.year() + length);
                    final EuropeanExercise maturity = new EuropeanExercise(exerciseDate);

                    final PlainVanillaPayoff payoff = new PlainVanillaPayoff(type, strike);

                    final double runningAverage = 120;
                    final int pastFixings = 1;

                    final List<Date> fixingDates = new ArrayList<Date>();
View Full Code Here

        final Date exerciseDate = today.clone().addAssign(90);

        /* @Size */int pastFixings = Integer.MAX_VALUE;
        /* @Real */double runningAccumulator = Double.NaN;

        final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike);
        final Exercise exercise = new EuropeanExercise(exerciseDate);

        final ContinuousAveragingAsianOption option = new ContinuousAveragingAsianOption(averageType, payoff, exercise);
        option.setPricingEngine(engine);

View Full Code Here

            for (final double strike : strikes) {
                for (final int length : lengths) {

                    final Date exerciseDate = new Date(today.dayOfMonth(), today.month(), today.year() + length);
                    final EuropeanExercise maturity = new EuropeanExercise(exerciseDate);
                    final PlainVanillaPayoff payoff = new PlainVanillaPayoff(type, strike);

                    final ContinuousAveragingAsianOption option = new ContinuousAveragingAsianOption(
                            AverageType.Geometric, payoff, maturity);
                    option.setPricingEngine(engine);
View Full Code Here

            final List<Date> dates,
            final List<Double> dividends,
            final Calendar cal,
            final DayCounter dc) {

        super(new PlainVanillaPayoff(type, strike), exercise, dates, dividends);

        this.cal = cal;
        this.dc = dc;

        final SimpleQuote spot = new SimpleQuote(0.0);
View Full Code Here

TOP

Related Classes of org.jquantlib.instruments.PlainVanillaPayoff

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.