Package org.jquantlib.daycounters

Examples of org.jquantlib.daycounters.Actual365Fixed.yearFraction()


        for (final Date d = today.add(new Period(6, TimeUnit.Months)); d.lt(exerciseDate); d.addAssign(new Period(6, TimeUnit.Months))) {
            dividends.add(new FixedDividend(1.0, d));
        }

        final DayCounter dayCounter = new Actual365Fixed();
        /*@Time*/ final double maturity = dayCounter.yearFraction(settlementDate,exerciseDate);

        System.out.println("option type = "+type);
        System.out.println("Time to maturity = "+maturity);
        System.out.println("Underlying price = "+underlying);
        System.out.println("Risk-free interest rate = "+riskFreeRate);
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.