Package org.jquantlib.math.distributions

Examples of org.jquantlib.math.distributions.MoroInverseCumulativeNormal


                { 0.7, 0.52440051190665249 },
                { 0.8, 0.84162123489799467 },
                { 0.9, 1.2815515632770349 },
                { 0.99, 2.3263478739449690 } };

        final MoroInverseCumulativeNormal icn = new MoroInverseCumulativeNormal();

        // test the normal values
        for (final double[] normalTestvalue : normal_testvalues) {
            final double x_position = normalTestvalue[0];
            final double tolerance = 15.0e-3;//(Math.abs(x_position)<3.01) ? 1.0e-15: 1.0e-10;

            final double normal_expected = normalTestvalue[1];
            final double computed_normal = icn.op(x_position);
            if (Math.abs(normal_expected - computed_normal) > tolerance) {
                fail("x_position " + x_position + " normal_expected: "
                        + normal_expected + " normal_computed: "
                        + computed_normal);
            }
View Full Code Here

TOP

Related Classes of org.jquantlib.math.distributions.MoroInverseCumulativeNormal

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.