Examples of YieldTermStructure


Examples of org.jquantlib.termstructures.YieldTermStructure

        QL.info("Today: " + today);

        final SimpleQuote spot = new SimpleQuote(100.0);
        final SimpleQuote qRate = new SimpleQuote(0.03);
        final YieldTermStructure qTS = Utilities.flatRate(today, qRate.value(), dc);
        final SimpleQuote rRate = new SimpleQuote(0.06);
        final YieldTermStructure rTS = Utilities.flatRate(today, rRate.value(), dc);
        final SimpleQuote vol = new SimpleQuote(0.20);
        final BlackVolTermStructure volTS = Utilities.flatVol(today, vol.value(), dc);

        final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot),
                new Handle<YieldTermStructure>(qTS), new Handle<YieldTermStructure>(rTS), new Handle<BlackVolTermStructure>(volTS));

        final PricingEngine engine = new AnalyticDiscreteGeometricAveragePriceAsianEngine(stochProcess);

        final AverageType averageType = AverageType.Geometric;
        /* @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);
        QL.info("Df: " + rTS.discount(exerciseDate));
        QL.info("DivDf: " + qTS.discount(exerciseDate));

        final List<Date> fixingDates = new ArrayList<Date>(futureFixings);
        final int dt = (int) (360.0 / (futureFixings) + 0.5);
        fixingDates.add(today.clone().addAssign(dt));
View Full Code Here

Examples of org.jquantlib.termstructures.YieldTermStructure

        final DayCounter dc = new Actual360();

        final SimpleQuote           spot  = new SimpleQuote(0.0);
        final SimpleQuote           qRate = new SimpleQuote(0.0);
        final YieldTermStructure    qTS   = Utilities.flatRate(qRate, dc);
        final SimpleQuote           rRate = new SimpleQuote(0.0);
        final YieldTermStructure    rTS   = Utilities.flatRate(rRate, dc);
        final SimpleQuote           vol   = new SimpleQuote(0.0);
        final BlackVolTermStructure volTS = Utilities.flatVol(vol, dc);

        final BlackScholesMertonProcess process = new BlackScholesMertonProcess(
                new Handle<Quote>(spot),
View Full Code Here

Examples of org.jquantlib.termstructures.YieldTermStructure

        QL.info("Today: " + today);

        final SimpleQuote           spot  = new SimpleQuote(80.0);
        final SimpleQuote           qRate = new SimpleQuote(-0.03);
        final YieldTermStructure    qTS   = Utilities.flatRate(today, qRate, dc);
        final SimpleQuote           rRate = new SimpleQuote(0.05);
        final YieldTermStructure    rTS   = Utilities.flatRate(today, rRate, dc);
        final SimpleQuote           vol   = new SimpleQuote(0.20);
        final BlackVolTermStructure volTS = Utilities.flatVol(today, vol, dc);

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

Examples of org.jquantlib.termstructures.YieldTermStructure

        final DayCounter dc = new Actual360();

        final SimpleQuote           spot  = new SimpleQuote(0.0);
        final SimpleQuote           qRate = new SimpleQuote(0.0);
        final YieldTermStructure    qTS   = Utilities.flatRate(qRate, dc);
        final SimpleQuote           rRate = new SimpleQuote(0.0);
        final YieldTermStructure    rTS   = Utilities.flatRate(rRate, dc);
        final SimpleQuote           vol   = new SimpleQuote(0.0);
        final BlackVolTermStructure volTS = Utilities.flatVol(vol, dc);

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

Examples of org.jquantlib.termstructures.YieldTermStructure


        final double residualTime = dc.yearFraction(today, exercise);

        final SimpleQuote spot = new SimpleQuote(0.0);
        final YieldTermStructure qTS = Utilities.flatRate(today, q, dc);
        final YieldTermStructure rTS = Utilities.flatRate(today, r, dc);

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

        final GeneralizedBlackScholesProcess stochProcess = new GeneralizedBlackScholesProcess(
                new Handle<Quote>(spot),
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.