Examples of zeroRate()


Examples of org.jquantlib.termstructures.YieldTermStructure.zeroRate()

        //Calculating parRate for the dates as shown below-
        final Date[] dates = { date10.clone(), date20.clone(), date30.clone(), date40.clone(), date50.clone() };
        System.out.println("The par rate for the bond having coupon dates as shown above is = "+flatforward.parRate(dates, Frequency.Semiannual, false));

        //Calculating zero rate
        System.out.println("The zero rate for the bond having coupon date as 10 days from today = "+flatforward.zeroRate(date10.clone(), new Actual365Fixed(), Compounding.Continuous).rate());

        System.out.println("//==========================================ForwardSpreadedTermStructure==================");
        //As the name suggests this termstructure adds a spread to the forward rates it calculates by getting the spread rate
        //from the spread rate quote
        final SimpleQuote spreadRateQuote = new SimpleQuote(0.2);
View Full Code Here

Examples of org.jquantlib.termstructures.yieldcurves.FlatForward.zeroRate()

        //Calculating parRate for the dates as shown below-
        final Date[] dates = { date10.clone(), date20.clone(), date30.clone(), date40.clone(), date50.clone() };
        System.out.println("The par rate for the bond having coupon dates as shown above is = "+flatforward.parRate(dates, Frequency.Semiannual, false));

        //Calculating zero rate
        System.out.println("The zero rate for the bond having coupon date as 10 days from today = "+flatforward.zeroRate(date10.clone(), new Actual365Fixed(), Compounding.Continuous).rate());

        System.out.println("//==========================================ForwardSpreadedTermStructure==================");
        //As the name suggests this termstructure adds a spread to the forward rates it calculates by getting the spread rate
        //from the spread rate quote
        final SimpleQuote spreadRateQuote = new SimpleQuote(0.2);
View Full Code Here

Examples of org.jquantlib.termstructures.yieldcurves.ForwardRateStructure.zeroRate()

        //Calculating parRate for the dates(as used in the FlatForward case) as shown below-
        System.out.println("The par rate for the bond having coupon dates as shown above is = "+forwardSpreadedTermStructure.parRate(dates, Frequency.Semiannual, false));

        //Calculating zero rate.This termstructure adds the spread as specified by the spread quote and then calculates the discount.
        System.out.println("The zero rate for the bond having coupon date as 10 days from today = "+forwardSpreadedTermStructure.zeroRate(date10.clone(), new Actual365Fixed(), Compounding.Continuous).rate());

        //===========================================ImpliedTermStructure============================

        //As the name suggests the implied termstructure holds a reference to an underlying tremstructure and gives the same calulated values
        //as the underlying termstructure.Here the FlatForward termstructure instantiated right at the top has been taken as an underlying.
View Full Code Here

Examples of org.jquantlib.termstructures.yieldcurves.ForwardSpreadedTermStructure.zeroRate()

        //Calculating parRate for the dates(as used in the FlatForward case) as shown below-
        System.out.println("The par rate for the bond having coupon dates as shown above is = "+forwardSpreadedTermStructure.parRate(dates, Frequency.Semiannual, false));

        //Calculating zero rate.This termstructure adds the spread as specified by the spread quote and then calculates the discount.
        System.out.println("The zero rate for the bond having coupon date as 10 days from today = "+forwardSpreadedTermStructure.zeroRate(date10.clone(), new Actual365Fixed(), Compounding.Continuous).rate());

        //===========================================ImpliedTermStructure============================

        //As the name suggests the implied termstructure holds a reference to an underlying tremstructure and gives the same calulated values
        //as the underlying termstructure.Here the FlatForward termstructure instantiated right at the top has been taken as an underlying.
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.