Package com.opengamma.analytics.financial.model.option.pricing.fourier

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


    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


    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

    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

    // 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

TOP

Related Classes of com.opengamma.analytics.financial.model.option.pricing.fourier.MartingaleCharacteristicExponent

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.