Examples of TruePredicate


Examples of org.jquantlib.math.functions.TruePredicate

        final List<Ops.DoubleOp> functions = new ArrayList<Ops.DoubleOp>();
        functions.add(new Cube());
        functions.add(new Bind2nd(new Minus(), mean()));
        final Expression comp = new Expression(functions);

        final double x = expectationValue(comp, new TruePredicate()).getFirst();
        final double sigma = standardDeviation();
        final double _n = n;
        return (_n / ((_n - 1) * (_n - 2))) * x / (Math.pow(sigma, 3));
    }
View Full Code Here

Examples of org.jquantlib.math.functions.TruePredicate

        final List<DoubleOp> functions = new ArrayList<DoubleOp>();
        functions.add(new Fourth());
        functions.add(new Bind2nd(new Minus(), mean()));
        final Expression comp = new Expression(functions);

        final double x = expectationValue(comp, new TruePredicate()).getFirst();

        final double _N = n;
        final double sigma2 = standardDeviation();
        final double c1 = (_N/(_N-1.0)) * (_N/(_N-2.0)) * ((n+1.0)/(_N-3.0));
        final double c2 = 3.0 * ((_N-1.0)/(_N-2.0)) * ((_N-1.0)/(_N-3.0));
 
View Full Code Here

Examples of org.jquantlib.math.functions.TruePredicate

    public double shortfall(final double target){
        if (statistics.getSampleSize()==0)
            throw new IllegalArgumentException(empty_sample_set);

        final Ops.DoublePredicate less = new Bind2ndPredicate(new LessThanPredicate(), target);
        return statistics.expectationValue(new Clipped(less, new Constant(1.0)), new TruePredicate()).getFirst();
    }
View Full Code Here

Examples of org.jquantlib.math.functions.TruePredicate

   */
  public /*@Real*/ double shortfall(final /*@Real*/ double target) /*@ReadOnly*/ {
    QL.ensure(samples() != 0, EMPTY_SAMPLE_SET);

    final Ops.DoublePredicate less = new Bind2ndPredicate(new LessThanPredicate(), target);
    return expectationValue(new Clipped(less, new Constant(1.0)), new TruePredicate()).first();
  }
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.