Examples of price()


Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
    final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
    final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forwardModified, sabrParam, _cutOffStrike, swaption.getTimeToExpiry(), _mu);
    MulticurveSensitivity result = pvbpModifiedDr.multipliedBy(sabrExtrapolation.price(option));
    final double priceDF = sabrExtrapolation.priceDerivativeForward(option);
    result = result.plus(forwardModifiedDr.multipliedBy(pvbpModified * priceDF));
    if (!swaption.isLong()) {
      result = result.multipliedBy(-1);
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

      final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
      final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
      final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
      final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
      final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, _cutOffStrike, swaption.getTimeToExpiry(), _mu);
      pv = discountFactorSettle * pvbp * sabrExtrapolation.price(swaption) * (swaption.isLong() ? 1.0 : -1.0);
    }
    return MultipleCurrencyAmount.of(ccy, pv);
  }

  /**
 
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
    final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
    final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, _cutOffStrike, swaption.getTimeToExpiry(), _mu);
    final double price = sabrExtrapolation.price(swaption);
    result = result.multipliedBy(pvbp * price);
    result = result.plus(forwardDr.multipliedBy(discountFactorSettle * (pvbpDf * price + pvbp * sabrExtrapolation.priceDerivativeForward(swaption))));
    if (!swaption.isLong()) {
      result = result.multipliedBy(-1);
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

      final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
      final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
      final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
      final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
      sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, _cutOffStrike, cap.getFixingTime(), _mu);
      price = df * sabrExtrapolation.price(option) * cap.getNotional() * cap.getPaymentYearFraction();
    }
    return CurrencyAmount.of(cap.getCurrency(), price);
  }

  @Override
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

      final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
      final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
      final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
      final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
      final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, _cutOffStrike, cap.getFixingTime(), _mu);
      bsPrice = sabrExtrapolation.price(option);
      bsDforward = sabrExtrapolation.priceDerivativeForward(option);
    }
    result = result.multipliedBy(bsPrice);
    result = result.plus(forwardDr.multipliedBy(bsDforward));
    result = result.multipliedBy(cap.getNotional() * cap.getPaymentYearFraction());
 
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

      final double beta = sabr.getSABRParameter().getBeta(expiryMaturity);
      final double rho = sabr.getSABRParameter().getRho(expiryMaturity);
      final double nu = sabr.getSABRParameter().getNu(expiryMaturity);
      final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
      sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, _cutOffStrike, cap.getFixingTime(), _mu);
      price = df * sabrExtrapolation.price(option) * cap.getNotional() * cap.getPaymentYearFraction();
    }
    return MultipleCurrencyAmount.of(cap.getCurrency(), price);
  }

  /**
 
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

      final double beta = sabr.getSABRParameter().getBeta(expiryMaturity);
      final double rho = sabr.getSABRParameter().getRho(expiryMaturity);
      final double nu = sabr.getSABRParameter().getNu(expiryMaturity);
      final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
      final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, _cutOffStrike, cap.getFixingTime(), _mu);
      bsPrice = sabrExtrapolation.price(option);
      bsDforward = sabrExtrapolation.priceDerivativeForward(option);
    }
    result = result.multipliedBy(bsPrice);
    result = result.plus(forwardDr.multipliedBy(bsDforward));
    result = result.multipliedBy(cap.getNotional() * cap.getPaymentYearFraction());
 
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double rho = SABR_PARAMETERS.getRho(expiryMaturity);
    final double nu = SABR_PARAMETERS.getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, CUT_OFF_STRIKE, CAP_LONG.getFixingTime(), MU);
    final EuropeanVanillaOption option = new EuropeanVanillaOption(CAP_LONG.getStrike(), CAP_LONG.getFixingTime(), CAP_LONG.isCap());
    final double expectedPrice = sabrExtrapolation.price(option) * CAP_LONG.getNotional() * CAP_LONG.getPaymentYearFraction() * df;
    assertEquals("Cap/floor: SABR with extrapolation pricing", expectedPrice, methodPrice.getAmount(EUR), TOLERANCE_PV);
  }

  @Test
  /**
 
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double rho = SABR_PARAMETERS.getRho(expiryMaturity);
    final double nu = SABR_PARAMETERS.getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, CUT_OFF_STRIKE, CAP_HIGH_LONG.getFixingTime(), MU);
    final EuropeanVanillaOption option = new EuropeanVanillaOption(CAP_HIGH_LONG.getStrike(), CAP_HIGH_LONG.getFixingTime(), CAP_HIGH_LONG.isCap());
    final double expectedPrice = sabrExtrapolation.price(option) * CAP_HIGH_LONG.getNotional() * CAP_HIGH_LONG.getPaymentYearFraction() * df;
    assertEquals("Cap/floor: SABR with extrapolation pricing", expectedPrice, methodPrice.getAmount(EUR), TOLERANCE_PV);
  }

  @Test
  /**
 
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double rho = SABR_PARAMETERS.getRho(expiryMaturity);
    final double nu = SABR_PARAMETERS.getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forward, sabrParam, CUT_OFF_STRIKE, CAP_LONG.getFixingTime(), MU);
    final EuropeanVanillaOption option = new EuropeanVanillaOption(CAP_LONG.getStrike(), CAP_LONG.getFixingTime(), CAP_LONG.isCap());
    final double expectedPrice = sabrExtrapolation.price(option) * CAP_LONG.getNotional() * CAP_LONG.getPaymentYearFraction() * df;
    assertEquals("Cap/floor: SABR with extrapolation pricing", expectedPrice, methodPrice.getAmount(), 1E-2);
  }

  @Test
  /**
 
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.