Examples of PricingEngine


Examples of org.jquantlib.pricingengines.PricingEngine

        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 AnalyticEuropeanEngine(stochProcess);

        VanillaOption option = new EuropeanOption(payoff, exercise);
        option.setPricingEngine(engine);

        calculated = option.delta();
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

                        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 AnalyticEuropeanEngine(stochProcess);

                        if (payoff==null)
                            throw new IllegalArgumentException();

                        final EuropeanOption option = new EuropeanOption(payoff, exercise);
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

        final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
                new Handle<Quote>(u),
                new Handle<YieldTermStructure>(qTS),
                new Handle<YieldTermStructure>(rTS),
                new Handle<BlackVolTermStructure>(volTS));
        final PricingEngine engine = new AnalyticEuropeanEngine(stochProcess);

        final EuropeanOption option1 = new EuropeanOption(payoff, exercise);
        final EuropeanOption option2 = new EuropeanOption(payoff, exercise);
        option1.setPricingEngine(engine);
        option2.setPricingEngine(engine);
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

                new Handle<YieldTermStructure>(rTS),
                new Handle<BlackVolTermStructure>(volTS),
                new Handle<Quote>(jumpIntensity),
                new Handle<Quote>(meanLogJump),
                new Handle<Quote>(jumpVol));
        final PricingEngine engine = new JumpDiffusionEngine(stochProcess);

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

Examples of org.jquantlib.pricingengines.PricingEngine

                new Handle<Quote>(meanLogJump),
                new Handle<Quote>(jumpVol));

        // The jumpdiffusionengine greeks are very sensitive to the convergence level.
        // A tolerance of 1.0e-08 is usually sufficient to get reasonable results
        final PricingEngine engine = new JumpDiffusionEngine(stochProcess, 1e-08);

        for (final Type type : types) {
            for (final double strike : strikes) {
                for (final double element : jInt) {
                    jumpIntensity.setValue(element);
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

            /* @Size */final int binomialSteps,
            /* @Size */final int samples) {

        final GeneralizedBlackScholesProcess stochProcess = makeProcess(u, q, r, vol);

        PricingEngine engine;
        switch (engineType) {
        case Analytic:
            engine = new AnalyticEuropeanEngine(stochProcess);
            break;
        case JR:
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

                  settlementDays, faceAmount, sch,
              new double[] { coupon },
              bondDayCount, paymentConvention,
              redemption, issue);

          final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);
          bond.setPricingEngine(bondEngine);

          for (final double yield : yields) {

            rate.setValue(yield);
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

      final FixedRateBond bond1 = new FixedRateBond(settlementDays, faceAmount, sch1,
                          new double[] {0.025},
                          bondDayCount, BusinessDayConvention.ModifiedFollowing,
                          100.0, new Date(1, Month.November, 2004));

    final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);

      bond1.setPricingEngine(bondEngine);

      final double marketPrice1 = 99.203125;
      final double marketYield1 = 0.02925;
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

                           faceAmount,
                           new Date(30,Month.November,2008),
                           BusinessDayConvention.ModifiedFollowing,
                           100.0, new Date(30,Month.November,2004));

    final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);
      bond1.setPricingEngine(bondEngine);

      final double cachedPrice1 = 88.551726;

      double price = bond1.cleanPrice();
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

                          new double [] { 0.02875 },
                          new ActualActual(ActualActual.Convention.ISMA),
                          BusinessDayConvention.ModifiedFollowing,
                          100.0, new Date(30,Month.November,2004));

      final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve);
      bond1.setPricingEngine(bondEngine);

      final double cachedPrice1 = 99.298100;

      double price = bond1.cleanPrice();
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.