Examples of evaluate()


Examples of com.opengamma.analytics.math.linearalgebra.LUDecompositionCommons.evaluate()

        res[j][i] = _pricer.parSpreadCreditSensitivity(bucketCDSs[i], yieldCurve, creditCurve, j);
      }
    }
    final DoubleMatrix1D vLambda = new DoubleMatrix1D(temp);
    final DoubleMatrix2D jacT = new DoubleMatrix2D(res);
    final LUDecompositionResult luRes = decomp.evaluate(jacT);
    final DoubleMatrix1D vS = luRes.solve(vLambda);
    return vS.getData();
  }

  public double[][] analyticCS01FromCreditCurve(final CDSAnalytic[] cds, final double[] cdsCoupon, final CDSAnalytic[] bucketCDSs, final ISDACompliantYieldCurve yieldCurve,

Examples of com.opengamma.analytics.math.linearalgebra.QRDecompositionCommons.evaluate()

   */
  private LeastSquaresRegressionResult regress(final DoubleMatrix2D xDataMatrix, final DoubleMatrix1D yDataVector, final int nData, final int degree) {

    final Decomposition<QRDecompositionResult> qrComm = new QRDecompositionCommons();

    final DecompositionResult decompResult = qrComm.evaluate(xDataMatrix);
    _qrResult = (QRDecompositionResult) decompResult;

    final DoubleMatrix2D qMatrix = _qrResult.getQ();
    final DoubleMatrix2D rMatrix = _qrResult.getR();

Examples of com.opengamma.analytics.math.linearalgebra.SVDecompositionCommons.evaluate()

            }
          }
        }
        final DoubleMatrix2D newAlpha = (DoubleMatrix2D) _algebra.add(alpha0, new DoubleMatrix2D(temp));

        final SVDecompositionResult svdRes = svd.evaluate(newAlpha);
        final double[] w = svdRes.getSingularValues();
        final DoubleMatrix2D u = svdRes.getU();
        final DoubleMatrix2D v = svdRes.getV();

        final double[] p = new double[nParms];

Examples of com.opengamma.analytics.math.statistics.descriptive.MeanCalculator.evaluate()

   * @param nu Computed by getShiftedDrift method
   * @return space step
   */
  public double getSpaceStep(final double timeToExpiry, final double[] volatility, final int nSteps, final double[] nu) {
    final Function1D<double[], Double> calculator = new MeanCalculator();
    final double meanNu = calculator.evaluate(nu);
    final double meanVol = calculator.evaluate(volatility);
    final double dt = timeToExpiry / nSteps;

    return Math.sqrt(meanVol * meanVol * dt + meanNu * meanNu * dt * dt);
  }

Examples of com.opengamma.analytics.math.statistics.descriptive.MedianCalculator.evaluate()

    }
    final double mean = MU + SIGMA / (1 - KSI);
    final double median = MU + SIGMA * (Math.pow(2, KSI) - 1) / KSI;
    final double variance = SIGMA * SIGMA / ((1 - KSI) * (1 - KSI) * (1 - 2 * KSI));
    assertEquals(meanCalculator.evaluate(data), mean, eps);
    assertEquals(medianCalculator.evaluate(data), median, eps);
    assertEquals(varianceCalculator.evaluate(data), variance, eps);
  }

  private void assertLimit(final ProbabilityDistribution<Double> dist, final double limit) {
    try {

Examples of com.opengamma.analytics.math.statistics.descriptive.ModeCalculator.evaluate()

    ModeCalculator mode = new ModeCalculator();

    double[] spreads = getSpreads(underlyingPool, creditSpreadTenors, creditSpreadTermStructures, creditSpreadTenor);

    return mode.evaluate(spreads);
  }

  // ----------------------------------------------------------------------------------------------------------------------------------------

  // Calculate the variance of the spread of the obligors in the underlying pool for a given tenor

Examples of com.opengamma.analytics.math.statistics.descriptive.PercentileCalculator.evaluate()

    PercentileCalculator percentile = new PercentileCalculator(q);

    double[] spreads = getSpreads(underlyingPool, creditSpreadTenors, creditSpreadTermStructures, creditSpreadTenor);

    return percentile.evaluate(spreads);
  }

  // ----------------------------------------------------------------------------------------------------------------------------------------

  // Method to extract out the creditSpreadTenor spreads for the names in the underlying pool

Examples of com.opengamma.analytics.math.statistics.descriptive.PopulationVarianceCalculator.evaluate()

    final double mean = MU + SIGMA / (1 - KSI);
    final double median = MU + SIGMA * (Math.pow(2, KSI) - 1) / KSI;
    final double variance = SIGMA * SIGMA / ((1 - KSI) * (1 - KSI) * (1 - 2 * KSI));
    assertEquals(meanCalculator.evaluate(data), mean, eps);
    assertEquals(medianCalculator.evaluate(data), median, eps);
    assertEquals(varianceCalculator.evaluate(data), variance, eps);
  }

  private void assertLimit(final ProbabilityDistribution<Double> dist, final double limit) {
    try {
      dist.getCDF(limit);

Examples of com.opengamma.analytics.math.statistics.descriptive.SampleFisherKurtosisCalculator.evaluate()

    SampleFisherKurtosisCalculator excessKurtosis = new SampleFisherKurtosisCalculator();

    double[] spreads = getSpreads(underlyingPool, creditSpreadTenors, creditSpreadTermStructures, creditSpreadTenor);

    return excessKurtosis.evaluate(spreads);
  }

  // ----------------------------------------------------------------------------------------------------------------------------------------

  // Calculate the q'th percentile of the spread distribution of the obligors in the underlying pool for a given tenor

Examples of com.opengamma.analytics.math.statistics.descriptive.SampleSkewnessCalculator.evaluate()

    SampleSkewnessCalculator skewness = new SampleSkewnessCalculator();

    double[] spreads = getSpreads(underlyingPool, creditSpreadTenors, creditSpreadTermStructures, creditSpreadTenor);

    return skewness.evaluate(spreads);
  }

  // ----------------------------------------------------------------------------------------------------------------------------------------

  // Calculate the excess kurtosis of the spread of the obligors in the underlying pool for a given tenor
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.