Examples of DividendSchedule


Examples of org.jquantlib.instruments.DividendSchedule

        public ArgumentsImpl() {
            conversionRatio = Constants.NULL_REAL;
            settlementDays = Constants.NULL_INTEGER;
            redemption = Constants.NULL_REAL;

            dividends = new DividendSchedule();
            dividendDates = new ArrayList<Date>();
            callabilityDates = new ArrayList<Date>();
            callabilityTypes = new ArrayList<Callability.Type>();
            callabilityPrices = new ArrayList<Double>();
            callabilityTriggers = new ArrayList<Double>();
View Full Code Here

Examples of org.jquantlib.instruments.DividendSchedule

                issueDate, exerciseDate,
                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])));
        }

        // Assume dividends are paid every 6 months.
        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);

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.