Examples of accrualPeriod()


Examples of org.jquantlib.cashflow.Coupon.accrualPeriod()

            //TODO: code review: should the last element be excluded?
            final Coupon cp = (Coupon)flow;
            if (cp != null) {
                if (firstCouponFound) {
                    assert(nominal       == cp.nominal() &&
                            accrualPeriod == cp.accrualPeriod() &&
                            //FIXME: implement equals for dayCounters!
                            dc.getClass()            == cp.dayCounter().getClass()):
                                "cannot aggregate accrued amount of two " +
                                "different coupons on "+ paymentDate.toString();
                } else {
View Full Code Here

Examples of org.jquantlib.cashflow.Coupon.accrualPeriod()

                                "cannot aggregate accrued amount of two " +
                                "different coupons on "+ paymentDate.toString();
                } else {
                    firstCouponFound = true;
                    nominal = cp.nominal();
                    accrualPeriod = cp.accrualPeriod();
                    dc = cp.dayCounter();
                }
                result += cp.accruedAmount(settlement);
            }
View Full Code Here

Examples of org.jquantlib.cashflow.Coupon.accrualPeriod()

            }
            final Coupon cp = Coupon.class.isAssignableFrom(flow.getClass()) ? (Coupon)flow : null;
            if (cp != null) {
                if (firstCouponFound) {
                    QL.require(nominal == cp.nominal() &&
                            accrualPeriod == cp.accrualPeriod() &&
                            dc.equals(cp.dayCounter()),
                                "cannot aggregate accrued amount of two " +
                                "different coupons on " + paymentDate.toString());
                } else {
                    firstCouponFound = true;
View Full Code Here

Examples of org.jquantlib.cashflow.Coupon.accrualPeriod()

                                "cannot aggregate accrued amount of two " +
                                "different coupons on " + paymentDate.toString());
                } else {
                    firstCouponFound = true;
                    nominal = cp.nominal();
                    accrualPeriod = cp.accrualPeriod();
                    dc = cp.dayCounter();
                }
                result += cp.accruedAmount(settlement);
            }
        }
View Full Code Here

Examples of org.jquantlib.cashflow.FixedRateCoupon.accrualPeriod()

                a.floatingResetDates.set(i, coupon.accrualStartDate());
                a.floatingPayDates.set(i, coupon.date());

                a.floatingFixingDates.set(i, coupon.fixingDate());
                a.floatingAccrualTimes.set(i, coupon.accrualPeriod());
                a.floatingSpreads.set(i, coupon.spread());
                try {
                    a.floatingCoupons.set(i, coupon.amount());
                } catch (final Exception e) {
                    a.floatingCoupons.set(i, Constants.NULL_REAL);
View Full Code Here

Examples of org.jquantlib.cashflow.FixedRateCoupon.accrualPeriod()

                a.floatingResetDates.set(i, coupon.accrualStartDate());
                a.floatingPayDates.set(i, coupon.date());

                a.floatingFixingDates.set(i, coupon.fixingDate());
                a.floatingAccrualTimes.set(i, coupon.accrualPeriod());
                a.floatingSpreads.set(i, coupon.spread());
                try {
                    a.floatingCoupons.set(i, coupon.amount());
                } catch (final Exception e) {
                    a.floatingCoupons.set(i, Constants.NULL_REAL);
View Full Code Here

Examples of org.jquantlib.cashflow.IborCoupon.accrualPeriod()

        for (int i = 0; i < size_; ++i) {
            final IborCoupon coupon = (IborCoupon) flows.get(i);
            QL.require(coupon.date().eq(coupon.accrualEndDate()) , irregular_coupon_types); // QA:[RG]::verified // TODO: message

            initialValues_.set(i, coupon.rate());
            accrualPeriod_.set(i, coupon.accrualPeriod());

            fixingDates_.set(i, coupon.fixingDate());
            fixingTimes_.set(i, dayCounter.yearFraction(startDate, coupon.fixingDate()));
            accrualStartTimes_.set(i, dayCounter.yearFraction(settlement, coupon.accrualStartDate()));
            accrualEndTimes_.set(i, dayCounter.yearFraction(settlement, coupon.accrualEndDate()));
View Full Code Here

Examples of org.jquantlib.cashflow.IborCoupon.accrualPeriod()

                a.floatingResetDates.set(i, coupon.accrualStartDate());
                a.floatingPayDates.set(i, coupon.date());

                a.floatingFixingDates.set(i, coupon.fixingDate());
                a.floatingAccrualTimes.set(i, coupon.accrualPeriod());
                a.floatingSpreads.set(i, coupon.spread());
                try {
                    a.floatingCoupons.set(i, coupon.amount());
                } catch (final Exception e) {
                    a.floatingCoupons.set(i, Constants.NULL_REAL);
View Full Code Here

Examples of org.jquantlib.cashflow.IborCoupon.accrualPeriod()

        for (int i = 0; i < size_; ++i) {
            final IborCoupon coupon = (IborCoupon) flows.get(i);
            QL.require(coupon.date().eq(coupon.accrualEndDate()) , irregular_coupon_types); // TODO: message

            initialValues_.set(i, coupon.rate());
            accrualPeriod_.set(i, coupon.accrualPeriod());

            fixingDates_.set(i, coupon.fixingDate());
            fixingTimes_.set(i, dayCounter.yearFraction(startDate, coupon.fixingDate()));
            accrualStartTimes_.set(i, dayCounter.yearFraction(settlement, coupon.accrualStartDate()));
            accrualEndTimes_.set(i, dayCounter.yearFraction(settlement, coupon.accrualEndDate()));
View Full Code Here

Examples of org.jquantlib.cashflow.IborCoupon.accrualPeriod()

                a.floatingResetDates.set(i, coupon.accrualStartDate());
                a.floatingPayDates.set(i, coupon.date());

                a.floatingFixingDates.set(i, coupon.fixingDate());
                a.floatingAccrualTimes.set(i, coupon.accrualPeriod());
                a.floatingSpreads.set(i, coupon.spread());
                try {
                    a.floatingCoupons.set(i, coupon.amount());
                } catch (final Exception e) {
                    a.floatingCoupons.set(i, Constants.NULL_REAL);
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.