Examples of covariance()


Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess.covariance()

        //The exact value = intialValue*exp(drift*dt)*exp(volatility*sqrt(dt))-----can be obtained by integrating----->dx/x= drift*dt+volatility*sqrt(dt)
        final Array evolve = process.evolve(process.time(date18.clone()), new Array(1).fill(6.7), .001, new Array(1).fill(new NormalDistribution().op(Math.random()) ));
        System.out.println("Exact value = "+evolve.first());

        //Calculating covariance of the process
        final Matrix covariance = process.covariance(process.time(date18.clone())new Array(1).fill(5.6), 0.01);
        System.out.println("Covariance = "+covariance.get(0, 0));

        clock.stopClock();
        clock.log();
    }
View Full Code Here

Examples of org.jquantlib.processes.StochasticProcess1D.covariance()

        //The exact value = intialValue*exp(drift*dt)*exp(volatility*sqrt(dt))-----can be obtained by integrating----->dx/x= drift*dt+volatility*sqrt(dt)
        final Array evolve = process.evolve(process.time(date18.clone()), new Array(1).fill(6.7), .001, new Array(1).fill(new NormalDistribution().op(Math.random()) ));
        System.out.println("Exact value = "+evolve.first());

        //Calculating covariance of the process
        final Matrix covariance = process.covariance(process.time(date18.clone())new Array(1).fill(5.6), 0.01);
        System.out.println("Covariance = "+covariance.get(0, 0));

        clock.stopClock();
        clock.log();
    }
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.