Package org.jquantlib.instruments

Examples of org.jquantlib.instruments.CallabilitySchedule


                new Period(frequency), calendar,
                convention, convention,
                DateGeneration.Rule.Backward, false);

        final DividendSchedule dividends = new DividendSchedule();
        final CallabilitySchedule callability = new CallabilitySchedule();

        final double[] coupons = new double[] { 1.0, 0.05 };

        final DayCounter bondDayCount = new Thirty360();

        // Call dates, years 2, 4
        final int[] callLength = { 2, 4 };
        // Put dates year 3
        final int[] putLength = { 3 };

        final double[] callPrices = {101.5, 100.85};
        final double[] putPrices = { 105.0 };

        for(int i=0; i<callLength.length; i++){
            callability.add(
                    new SoftCallability(
                        new Callability.Price(callPrices[i], Callability.Price.Type.Clean),
                        schedule.date(callLength[i]),
                        1.20));
        }

        for (int j=0; j<putLength.length; j++) {
            callability.add(
                    new Callability(
                            new Callability.Price(putPrices[j],Callability.Price.Type.Clean),
                            Callability.Type.Put,
                            schedule.date(putLength[j])));
        }
View Full Code Here

TOP

Related Classes of org.jquantlib.instruments.CallabilitySchedule

Copyright © 2018 www.massapicom. 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.