Examples of PercentileCalculator


Examples of com.opengamma.analytics.math.statistics.descriptive.PercentileCalculator

    Validate.isTrue(horizon > 0, "horizon");
    Validate.isTrue(periods > 0, "periods");
    if (!ArgumentChecker.isInRangeInclusive(0, 1, quantile)) {
      throw new IllegalArgumentException("Quantile must be between 0 and 1");
    }
    _percentileCalculator = new PercentileCalculator(1 - quantile);
    _horizon = horizon;
    _periods = periods;
    _quantile = quantile;
    _mult = Math.sqrt(horizon / periods);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.statistics.descriptive.PercentileCalculator

    ArgumentChecker.notNull(creditSpreadTermStructures, "Credit spread term structures");
    ArgumentChecker.notNull(creditSpreadTenor, "Credit spread tenor");
    ArgumentChecker.notNegative(q, "Percentile");
    ArgumentChecker.isTrue(q <= 1.0, "Percentile must be less than or equal to 100%");

    PercentileCalculator percentile = new PercentileCalculator(q);

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

    return percentile.evaluate(spreads);
  }
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.