Package org.jquantlib.math.functions

Examples of org.jquantlib.math.functions.Bind1stPredicate


        \f[ \mathrm{E}\left[ t-x \;|\; x<t \right] \f]
     */
    public double averageShortfall(final double target) {

        final Ops.DoubleOp minus = new Bind1st(target, new Minus());
        final Ops.DoublePredicate less = new Bind1stPredicate(target, new LessThanPredicate());
        final Pair<Double, Integer> result = statistics.expectationValue(minus, less);

        final double x = result.getFirst();
        //mmhh somewhere we have to change N to int
        final Integer N = result.getSecond();
View Full Code Here


   * {@latex[ \mathrm{E}\left[ t-x \;|\; x<t \right] }
   */
  public /*@Real*/ double averageShortfall(final /*@Real*/ double target) /*@ReadOnly*/ {

    final Ops.DoubleOp minus = new Bind1st(target, new Minus());
    final Ops.DoublePredicate less = new Bind1stPredicate(target, new LessThanPredicate());
    final Pair<Double, Integer> result = expectationValue(minus, less);

    final double x = result.first();
    final Integer N = result.second();
    QL.ensure(N != 0, NO_DATA_BELOW_THE_TARGET);
View Full Code Here

TOP

Related Classes of org.jquantlib.math.functions.Bind1stPredicate

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.