Examples of HestonCharacteristicExponent


Examples of com.opengamma.analytics.financial.model.option.pricing.fourier.HestonCharacteristicExponent

    return new Function1D<HestonModelData, double[]>() {

      @SuppressWarnings("synthetic-access")
      @Override
      public double[] evaluate(final HestonModelData x) {
        final MartingaleCharacteristicExponent ce = new HestonCharacteristicExponent(x);
        //TODO calculations relating to the FFT setup are made each call, even though they will be very similar (depends on Characteristic
        // Exponent). Maybe worth calculating a typical setup, outside of this function
        final double[][] strikeNPrice = FFT_PRICER.price(forward, 1.0, timeToExpiry, true, ce, lowestStrike, highestStrike, n, _limitSigma, _alpha, _limitTolerance);
        final int m = strikeNPrice.length;
        final double[] k = new double[m];
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.fourier.HestonCharacteristicExponent

    return new Function1D<HestonModelData, double[][]>() {

      @SuppressWarnings("synthetic-access")
      @Override
      public double[][] evaluate(final HestonModelData x) {
        final MartingaleCharacteristicExponent ce = new HestonCharacteristicExponent(x);
        final double[][] greeks = greekCal.getGreeks(forward, 1.0, timeToExpiry, true, ce, lowestStrike, highestStrike, n, _limitSigma, _alpha, _limitTolerance);
        //1st array is strikes and the second is prices (which we don't need)
        final double[] k = greeks[0];
        final double[] prices = greeks[1];
        final int m = k.length;
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.fourier.HestonCharacteristicExponent

    return new Function1D<HestonModelData, double[][]>() {

      @SuppressWarnings("synthetic-access")
      @Override
      public double[][] evaluate(final HestonModelData x) {
        final MartingaleCharacteristicExponent ce = new HestonCharacteristicExponent(x);
        final double[][] greeks = greekCal.getGreeks(forward, 1.0, timeToExpiry, true, ce, lowestStrike, highestStrike, n, _limitSigma, _alpha, _limitTolerance);
        //1st array is strikes and the second is prices (which we don't need)

        final double[] k = greeks[0];
        final double[] prices = greeks[1];
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.fourier.HestonCharacteristicExponent

    // TODO There is no guarantee that F0 and V0 are grid points (it depends on the chosen step sizes), so we should do a surface interpolation (what fun!)
    final double pdfPrice = res[(int) (F0 / deltaX)][(int) (V0 / deltaY)];

    // System.out.print("\n");
    final FFTPricer pricer = new FFTPricer();
    final MartingaleCharacteristicExponent heston = new HestonCharacteristicExponent(KAPPA, THETA, V0, OMEGA, RHO);

    final int n = 51;
    final double alpha = -0.5;
    final double tol = 1e-12;
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.fourier.HestonCharacteristicExponent

      final boolean isCall = option.isCall();
      final InterestRateFutureSecurity irFuture = option.getUnderlyingFuture();
      final double f = 1 - _futurePricer.price(irFuture, _curves);
      final BlackFunctionData blackData = new BlackFunctionData(f, 1, 0);
      final EuropeanVanillaOption vanillaOption = new EuropeanVanillaOption(k, t, isCall);
      final HestonCharacteristicExponent ce = getModelParameters(_target, _inputs, t, k);
      return _fourierPricer.price(blackData, vanillaOption, ce, _alpha, _tolerance, true);
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.fourier.HestonCharacteristicExponent

      final boolean isCall = option.isCall();
      final InterestRateFutureSecurity irFuture = option.getUnderlyingFuture();
      final double f = 1 - _futurePricer.price(irFuture, _curves);
      final BlackFunctionData blackData = new BlackFunctionData(f, 1, 1e-6);
      final EuropeanVanillaOption vanillaOption = new EuropeanVanillaOption(k, t, isCall);
      final HestonCharacteristicExponent ce = getModelParameters(_target, _inputs, t, k);
      return _fourierPricer.price(blackData, vanillaOption, ce, _alpha, _tolerance, true);
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.fourier.HestonCharacteristicExponent

      final InterpolatedDoublesSurface kappaSurface = surfaces.getKappaSurface();
      final InterpolatedDoublesSurface thetaSurface = surfaces.getThetaSurface();
      final InterpolatedDoublesSurface vol0Surface = surfaces.getVol0Surface();
      final InterpolatedDoublesSurface omegaSurface = surfaces.getOmegaSurface();
      final InterpolatedDoublesSurface rhoSurface = surfaces.getRhoSurface();
      return new HestonCharacteristicExponent(kappaSurface.getZValue(t, k), thetaSurface.getZValue(t, k), vol0Surface.getZValue(t, k), omegaSurface.getZValue(t, k), rhoSurface.getZValue(t, k));
    }
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.