Package com.opengamma.analytics.financial.model.option.definition.Barrier

Examples of com.opengamma.analytics.financial.model.option.definition.Barrier.BarrierType


      final double strike = SPOT * (0.8 + i * 0.1);
      for (int j = 0; j < 5; j++) {
        final double h = SPOT * (0.9 + j * 0.05);
        for (int k = 0; k < 2; k++) {
          final boolean isCall = k == 0;
          final BarrierType bt = SPOT > h ? BarrierType.DOWN : BarrierType.UP;
        final double anPrice = ANAL_PRICER.getPrice(new EuropeanVanillaOption(strike, EXPIRY, isCall),
            new Barrier(KnockType.OUT, bt, ObservationType.CONTINUOUS, h), REBATE, SPOT, B, R, SIGMA);
        final double fdPrice = PRICER.outBarrier(SPOT, h, strike, EXPIRY, R, B, SIGMA, isCall, REBATE);

        if (PRINT) {
View Full Code Here


      final double strike = SPOT * (0.9 + i * 0.1);
      for (int j = 0; j < 5; j++) {
        final double h = SPOT * (0.9 + j * 0.05);
        for (int k = 0; k < 2; k++) {
          final boolean isCall = k == 0;
          final BarrierType bt = SPOT > h ? BarrierType.DOWN : BarrierType.UP;
        final double anPrice = ANAL_PRICER.getPrice(new EuropeanVanillaOption(strike, EXPIRY, isCall), new Barrier(KnockType.IN, bt, ObservationType.CONTINUOUS, h), REBATE, SPOT, B, R, SIGMA);
        final double fdPrice = PRICER.inBarrier(SPOT, h, strike, EXPIRY, R, B, SIGMA, isCall, REBATE);

        if (PRINT) {
          final String call = isCall ? "call" : "put ";
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.model.option.definition.Barrier.BarrierType

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.