Examples of strike()


Examples of org.apache.taglibs.rdc.sampleapps.musicstore.ProactiveHelp.strike()

        ph.setThreshold(60);
        ph.setUsageWeighted(true);
        msBean.setProactiveHelp(ph);
      }
     
      if (ph.strike()) {
        request.setAttribute("proactiveHelp_hint", ph.nextHint());
      }
     
      //cleanup RDC history
      session.removeAttribute("dialogMap");
View Full Code Here

Examples of org.jquantlib.instruments.AssetOrNothingPayoff.strike()

            final AssetOrNothingPayoff aoo = (AssetOrNothingPayoff) strikedTypePayoff;
            if (inTheMoney) {
                K = spot;
                DKDstrike = 0.0;
            } else {
                K = aoo.strike();
                DKDstrike = 1.0;
            }
        }
    }
View Full Code Here

Examples of org.jquantlib.instruments.AssetOrNothingPayoff.strike()

            final AssetOrNothingPayoff aoo = (AssetOrNothingPayoff) strikedTypePayoff;
            if (inTheMoney) {
                K = spot;
                DKDstrike = 0.0;
            } else {
                K = aoo.strike();
                DKDstrike = 1.0;
            }
        }
    }
View Full Code Here

Examples of org.jquantlib.instruments.PlainVanillaPayoff.strike()

            if (error<=tolerance) {
                QL.info(" error="+error);
            } else {
                fail(exercise + " " + payoff.optionType() + " option with " + payoff + " payoff:\n"
                        + "    spot value:       " + values[i].s + "\n"
                        + "    strike:           " + payoff.strike() + "\n"
                        + "    dividend yield:   " + values[i].q + "\n"
                        + "    risk-free rate:   " + values[i].r + "\n"
                        + "    reference date:   " + today + "\n"
                        + "    maturity:         " + values[i].t + "\n"
                        + "    volatility:       " + values[i].v + "\n\n"
View Full Code Here

Examples of org.jquantlib.instruments.PlainVanillaPayoff.strike()

        final Date exercise = a.exercise.lastDate();

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

        /*@Volatility*/ final double volatility = process.blackVolatility().currentLink().blackVol(exercise, payoff.strike());
        /*@Real*/ final double variance = process.blackVolatility().currentLink().blackVariance(exercise, payoff.strike());
        /*@DiscountFactor*/ final double  riskFreeDiscount = process.riskFreeRate().currentLink().discount(exercise);
        final DayCounter rfdc  = process.riskFreeRate().currentLink().dayCounter();
        final DayCounter divdc = process.dividendYield().currentLink().dayCounter();
        final DayCounter voldc = process.blackVolatility().currentLink().dayCounter();
View Full Code Here

Examples of org.jquantlib.instruments.PlainVanillaPayoff.strike()

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

        /*@Volatility*/ final double volatility = process.blackVolatility().currentLink().blackVol(exercise, payoff.strike());
        /*@Real*/ final double variance = process.blackVolatility().currentLink().blackVariance(exercise, payoff.strike());
        /*@DiscountFactor*/ final double  riskFreeDiscount = process.riskFreeRate().currentLink().discount(exercise);
        final DayCounter rfdc  = process.riskFreeRate().currentLink().dayCounter();
        final DayCounter divdc = process.dividendYield().currentLink().dayCounter();
        final DayCounter voldc = process.blackVolatility().currentLink().dayCounter();

View Full Code Here

Examples of org.jquantlib.instruments.PlainVanillaPayoff.strike()

        // 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);
            tree = clazz.cast( c.newInstance(bs, maturity, timeSteps_, payoff.strike() ));
        } catch (final Exception e) {
            throw new LibraryException(e); // QA:[RG]::verified
        }

        final /*@Real*/ double creditSpread = a.creditSpread.currentLink().value();
View Full Code Here

Examples of org.jquantlib.instruments.PlainVanillaPayoff.strike()

        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);

        option.initialize(lattice, maturity);
View Full Code Here

Examples of org.jquantlib.instruments.PlainVanillaPayoff.strike()

        final AmericanExercise ex = (AmericanExercise)a.exercise;
        QL.require(!ex.payoffAtExpiry() , PAYOFF_AT_EXPIRY_NOT_HANDLED); // QA:[RG]::verified
        QL.require(a.payoff instanceof PlainVanillaPayoff , NON_PLAIN_PAYOFF_GIVEN); // QA:[RG]::verified
        PlainVanillaPayoff payoff = (PlainVanillaPayoff)a.payoff;

        final double /* @Real */variance = process.blackVolatility().currentLink().blackVariance(ex.lastDate(), payoff.strike());
        double /* @DiscountFactor */dividendDiscount = process.dividendYield().currentLink().discount(ex.lastDate());
        double /* @DiscountFactor */riskFreeDiscount = process.riskFreeRate().currentLink().discount(ex.lastDate());
        double /* @Real */spot = process.stateVariable().currentLink().value();
        QL.require(spot > 0.0, "negative or null underlying given"); // QA:[RG]::verified // TODO: message
        double /* @Real */strike = payoff.strike();
View Full Code Here

Examples of org.jquantlib.instruments.PlainVanillaPayoff.strike()

        final double /* @Real */variance = process.blackVolatility().currentLink().blackVariance(ex.lastDate(), payoff.strike());
        double /* @DiscountFactor */dividendDiscount = process.dividendYield().currentLink().discount(ex.lastDate());
        double /* @DiscountFactor */riskFreeDiscount = process.riskFreeRate().currentLink().discount(ex.lastDate());
        double /* @Real */spot = process.stateVariable().currentLink().value();
        QL.require(spot > 0.0, "negative or null underlying given"); // QA:[RG]::verified // TODO: message
        double /* @Real */strike = payoff.strike();

        if (payoff.optionType()==Option.Type.Put) {
            // use put-call symmetry
            // swap spot and strike, has to be done inline
            double tmp = spot; spot = strike; strike = tmp;
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.