Examples of drift()


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

        //Creating the process
        final StochasticProcess1D process = new GeneralizedBlackScholesProcess(handleToStockQuote,new RelinkableHandle<YieldTermStructure>(dividendTermStructure),new RelinkableHandle<YieldTermStructure>(riskFreeTermStructure),new RelinkableHandle<BlackVolTermStructure>(varianceCurve),new EulerDiscretization());

        //Calculating the drift of the stochastic process after time = 18th day from today with value of the stock as specified from the quote
        //The drift = (riskFreeForwardRate - dividendForwardRate) - (Variance/2)
        System.out.println("The drift of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.drift(process.time(date18.clone()), handleToStockQuote.currentLink().value()));

        //Calculating the diffusion of the process after time = 18th day from today with value of the stock as specified from the quote
        //The diffusion = volatiltiy of the stochastic process
        System.out.println("The diffusion of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.diffusion(process.time(date18.clone()), handleToStockQuote.currentLink().value()));
View Full Code Here

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

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

        //Calculating the drift of the stochastic process after time = 18th day from today with value of the stock as specified from the quote
        //The drift = (riskFreeForwardRate - dividendForwardRate) - (Variance/2)
        final Array drift = process.drift(process.time(date18.clone()), new Array(1).fill(5.6));
        System.out.println("The drift of the process after time = 18th day from today with value of the stock as specified from the quote");

        //Calculating the diffusion of the process after time = 18th day from today with value of the stock as specified from the quote
        //The diffusion = volatiltiy of the stochastic process
        final Matrix diffusion = process.diffusion(process.time(date18.clone()), new Array(1).fill(5.6));
View Full Code Here

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

        //Creating the process
        final StochasticProcess1D process = new GeneralizedBlackScholesProcess(handleToStockQuote,new RelinkableHandle<YieldTermStructure>(dividendTermStructure),new RelinkableHandle<YieldTermStructure>(riskFreeTermStructure),new RelinkableHandle<BlackVolTermStructure>(varianceCurve),new EulerDiscretization());

        //Calculating the drift of the stochastic process after time = 18th day from today with value of the stock as specified from the quote
        //The drift = (riskFreeForwardRate - dividendForwardRate) - (Variance/2)
        System.out.println("The drift of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.drift(process.time(date18.clone()), handleToStockQuote.currentLink().value()));

        //Calculating the diffusion of the process after time = 18th day from today with value of the stock as specified from the quote
        //The diffusion = volatiltiy of the stochastic process
        System.out.println("The diffusion of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.diffusion(process.time(date18.clone()), handleToStockQuote.currentLink().value()));
View Full Code Here

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

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

        //Calculating the drift of the stochastic process after time = 18th day from today with value of the stock as specified from the quote
        //The drift = (riskFreeForwardRate - dividendForwardRate) - (Variance/2)
        final Array drift = process.drift(process.time(date18.clone()), new Array(1).fill(5.6));
        System.out.println("The drift of the process after time = 18th day from today with value of the stock as specified from the quote");

        //Calculating the diffusion of the process after time = 18th day from today with value of the stock as specified from the quote
        //The diffusion = volatiltiy of the stochastic process
        final Matrix diffusion = process.diffusion(process.time(date18.clone()), new Array(1).fill(5.6));
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.