Package org.jquantlib.termstructures.volatilities

Examples of org.jquantlib.termstructures.volatilities.BlackVarianceCurve.blackForwardVariance()


        //Calculating blackVariance using maturity as 12 days after today and strike as 20
        System.out.println("Interpolated BlackVariance on BlackVarianceCurve = "+varianceCurve.blackVariance(date12.clone(), 20));

        //Calculating blackForwardVariance between 12 days after today and 16 days after today with strike as 20
        System.out.println("Interpolated BlackForwardVariance on BlackVarianceCurve = "+varianceCurve.blackForwardVariance(date12.clone(), date16.clone(), 20, true));

        System.out.println("//===============================BlackVarianceSurface================================");

        //Let's create black variance surface and calculate volatilities/variances by interpolating on
        //the created curve for a given strike.
View Full Code Here


        if(variance == impliedVariance){
            System.out.println("Interpolated BlackVariance on BlackVarianceCurve is same for varianceCurve and ImpliedVolTermStructure derived on it and = "+varianceCurve.blackVariance(date12.clone(), 20));
        }

        //Calculating blackForwardVariance between 12 days after today and 16 days after today with strike as 20
        final double forwardVariance = varianceCurve.blackForwardVariance(date12.clone(), date16.clone(), 20, true);
        final double impliedForwardVariance = impliedVolTermStructure.blackForwardVariance(date12.clone(), date16.clone(), 20, true);
        if(forwardVariance == impliedForwardVariance){
            System.out.println("Interpolated BlackForwardVariance on BlackVarianceCurve is same for varianceCurve and ImpliedVolTermStructure derived on it and = "+varianceCurve.blackForwardVariance(date12.clone(), date16.clone(), 20, true));
        }
View Full Code Here

        //Calculating blackForwardVariance between 12 days after today and 16 days after today with strike as 20
        final double forwardVariance = varianceCurve.blackForwardVariance(date12.clone(), date16.clone(), 20, true);
        final double impliedForwardVariance = impliedVolTermStructure.blackForwardVariance(date12.clone(), date16.clone(), 20, true);
        if(forwardVariance == impliedForwardVariance){
            System.out.println("Interpolated BlackForwardVariance on BlackVarianceCurve is same for varianceCurve and ImpliedVolTermStructure derived on it and = "+varianceCurve.blackForwardVariance(date12.clone(), date16.clone(), 20, true));
        }

        System.out.println("//================================LocalConstantVol=======================================");

        //LocalConstantVolatility is essentially same as BlackConstantVol and is a local volatility version of BlackConstantVol
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.