Package org.jquantlib.exercise

Examples of org.jquantlib.exercise.EuropeanExercise


        final YieldTermStructure    rTS        = Utilities.flatRate(today, rH_SME, dc);
        final SimpleQuote           volatility = new SimpleQuote(0.10);
        final BlackVolTermStructure volTS      = Utilities.flatVol(today, volatility, dc);

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


        final SimpleQuote           volatility = new SimpleQuote(0.10);
        final BlackVolTermStructure volTS      = Utilities.flatVol(today, volatility, dc);

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

    final CommonVars vars = new CommonVars();

    vars.conversionRatio = 1.0e-16;

    final Exercise euExercise = new EuropeanExercise(vars.maturityDate);
    final Exercise amExercise = new AmericanExercise(vars.issueDate,
        vars.maturityDate);

    final int timeSteps = 1001;
    final PricingEngine engine = new BinomialConvertibleEngine<CoxRossRubinstein>(
View Full Code Here

    QL.info("Testing zero-coupon convertible bonds against vanilla option...");

    final CommonVars vars = new CommonVars();

    final Exercise euExercise = new EuropeanExercise(vars.maturityDate);

    vars.settlementDays = 0;

    final int timeSteps = 1001;
    final PricingEngine engine = new BinomialConvertibleEngine<CoxRossRubinstein>(CoxRossRubinstein.class, vars.process, timeSteps);
View Full Code Here

        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);
        QL.info("Df: " + rTS.discount(exerciseDate));
        QL.info("DivDf: " + qTS.discount(exerciseDate));

View Full Code Here

        for (final Type type : types) {
            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 double runningAverage = 120;
                    final int pastFixings = 1;

                    final List<Date> fixingDates = new ArrayList<Date>();

                    final Date d = today.clone();
                    final Period THREEMONTH = new Period(3, TimeUnit.Months);
                    d.addAssign(new Period(3, TimeUnit.Months));
                    for (d.addAssign(THREEMONTH); d.le(maturity.lastDate()); d.addAssign(THREEMONTH)) {
                        fixingDates.add(d.clone());
                    }

                    final PricingEngine engine = new AnalyticDiscreteGeometricAveragePriceAsianEngine(process);
View Full Code Here

        /* @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);

        /* @Real */double calculated = option.NPV();
View Full Code Here

        for (final Type type : types) {
            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 Date expirationDate,
            final List<Date> dates,
            final List<Double> dividends) {

        super(type, underlying, strike, r, q, vol,
              settlementDate, new EuropeanExercise(expirationDate),
              dates, dividends);
    }
View Full Code Here

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

        super(type, u, strike, r, q, vol,
              settlementDate, new EuropeanExercise(expirationDate),
              dates, dividends, cal);
    }
View Full Code Here

TOP

Related Classes of org.jquantlib.exercise.EuropeanExercise

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.