Examples of PricingEngine


Examples of org.jquantlib.pricingengines.PricingEngine

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

        final /* @Size */ int timeSteps = 40;
        final /* @Size */ int gridPoints = 300;

        final PricingEngine engine;
        try {
            final Constructor<T> baseConstructor = engineClass.getConstructor(GeneralizedBlackScholesProcess.class, int.class, int.class);
            engine = baseConstructor.newInstance(process, timeSteps, gridPoints);
        } catch (final Exception e) {
            throw new LibraryException(e);
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

       
         // Common data
         final double faceAmount = 100;
       
         // Pricing engine
        final PricingEngine  bondEngine = new DiscountingBondEngine(discountingTermStructure);
       
         // Zero coupon bond
         final ZeroCouponBond zeroCouponBond = new ZeroCouponBond(
                           settlementDays,
                           new UnitedStates(UnitedStates.Market.GOVERNMENTBOND),
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

        QL.require(!isExpired(), "option expired");
        final SimpleQuote volQuote = new SimpleQuote();
        final GeneralizedBlackScholesProcess newProcess = ImpliedVolatilityHelper.clone(process, volQuote);

        // engines are built-in for the time being
        final PricingEngine engine;
        switch (exercise.type()) {
          case European:
            engine = new AnalyticEuropeanEngine(newProcess);
            break;
          case American:
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

        QL.require(!isExpired(), "option expired");
        final SimpleQuote volQuote = new SimpleQuote();
        final GeneralizedBlackScholesProcess newProcess = ImpliedVolatilityHelper.clone(process, volQuote);

        // engines are built-in for the time being
        final PricingEngine engine;
        switch (exercise.type()) {
            case European:
                engine = new AnalyticDividendEuropeanEngine(newProcess);
                break;
            case American:
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

                americanExercise, conversionRatio, dividends, callability,
                creditSpread, issueDate, settlementDays,
                coupons, bondDayCount, schedule, redemption);

        String method;
        PricingEngine engine;

        method = "Jarrow-Rudd";
        engine = new BinomialConvertibleEngine<JarrowRudd>(JarrowRudd.class, stochasticProcess, timeSteps);
        europeanBond.setPricingEngine(engine);
        americanBond.setPricingEngine(engine);
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

        coupons, dayCounter, paymentConvention, redemption, issueDate);
   
    this.latestDate = this.bond.maturityDate();
    new Settings().evaluationDate().addObserver(this);
   
    final PricingEngine bondEngine = new DiscountingBondEngine(this.termStructureHandle);
    this.bond.setPricingEngine(bondEngine);
          
}
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

    QL.validateExperimentalMode()
   
    this.latestDate = bond.maturityDate();
    new Settings().evaluationDate().addObserver(this);
   
    final PricingEngine bondEngine = new DiscountingBondEngine(this.termStructureHandle);
    this.bond.setPricingEngine(bondEngine);
     
  }
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

            final FixedRateBond bond = new FixedRateBond(vars.bondSettlementDays, 100.0,
                               vars.schedules[i], coupons,
                               vars.bondDayCounter, vars.bondConvention,
                               vars.bondRedemption, issue);

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

            /*@Real*/ final double expectedPrice = bondData[i].price, estimatedPrice = bond.cleanPrice();
            /*@Real*/ final double error = Math.abs(expectedPrice-estimatedPrice);
            if (error > tolerance) {
View Full Code Here

Examples of org.jquantlib.pricingengines.PricingEngine

            final EngineType engineType,
            final int binomialSteps,
            final int samples) {

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

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

Examples of org.jquantlib.pricingengines.PricingEngine

                    new Handle<Quote>(spot),
                    new Handle<YieldTermStructure>(qTS),
                    new Handle<YieldTermStructure>(rTS),
                    new Handle<BlackVolTermStructure>(volTS));

            final PricingEngine engine = new AnalyticEuropeanEngine(stochProcess);

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

            final double calculated = option.NPV();
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.