Examples of nominal()


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

            }
            //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();
View Full Code Here

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

                            dc.getClass()            == cp.dayCounter().getClass()):
                                "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.nominal()

        for (int i=0; i<cashflows_.size(); ++i) {
            final Coupon coupon = (Coupon)cashflows_.get(i);
            if (coupon==null){
                continue;
            }
            /*@Real*/final double notional = coupon.nominal();
            // we add the notional only if it is the first one...
            if (notionals_.isEmpty()) {
                notionals_.add(coupon.nominal());
                lastPaymentDate = coupon.date();
            } else if (!Closeness.isClose(notional, notionals_.get(notionals_.size() -1 ))) {
View Full Code Here

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

                continue;
            }
            /*@Real*/final double notional = coupon.nominal();
            // we add the notional only if it is the first one...
            if (notionals_.isEmpty()) {
                notionals_.add(coupon.nominal());
                lastPaymentDate = coupon.date();
            } else if (!Closeness.isClose(notional, notionals_.get(notionals_.size() -1 ))) {
                // ...or if it has changed.
                assert(notional < notionals_.get(notionals_.size()-1)):("increasing coupon notionals");
                notionals_.add(coupon.nominal());
View Full Code Here

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

                notionals_.add(coupon.nominal());
                lastPaymentDate = coupon.date();
            } else if (!Closeness.isClose(notional, notionals_.get(notionals_.size() -1 ))) {
                // ...or if it has changed.
                assert(notional < notionals_.get(notionals_.size()-1)):("increasing coupon notionals");
                notionals_.add(coupon.nominal());
                // in this case, we also add the last valid date for
                // the previous one...
                notionalSchedule_.add(lastPaymentDate);
                // ...and store the candidate for this one.
                lastPaymentDate = coupon.date();
View Full Code Here

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

                continue; //break;
            }
            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 {
View Full Code Here

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

                            dc.equals(cp.dayCounter()),
                                "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.nominal()

          final Object cfObj = cashflows_.get(i);
          final Coupon coupon = Coupon.class.isAssignableFrom(cfObj.getClass()) ? (Coupon)cfObj : null;
            if (coupon==null){
                continue;
            }
            final double notional = coupon.nominal();
            // we add the notional only if it is the first one...
            if (notionals_.isEmpty()) {
                notionals_.add(coupon.nominal());
                lastPaymentDate = coupon.date().clone();
            } else if (!Closeness.isClose(notional, notionals_.get(notionals_.size() -1 ))) {
View Full Code Here

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

                continue;
            }
            final double notional = coupon.nominal();
            // we add the notional only if it is the first one...
            if (notionals_.isEmpty()) {
                notionals_.add(coupon.nominal());
                lastPaymentDate = coupon.date().clone();
            } else if (!Closeness.isClose(notional, notionals_.get(notionals_.size() -1 ))) {
                // ...or if it has changed.
                QL.require(notional < notionals_.get(notionals_.size()-1), "increasing coupon notionals");
                notionals_.add(coupon.nominal());
View Full Code Here

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

                notionals_.add(coupon.nominal());
                lastPaymentDate = coupon.date().clone();
            } else if (!Closeness.isClose(notional, notionals_.get(notionals_.size() -1 ))) {
                // ...or if it has changed.
                QL.require(notional < notionals_.get(notionals_.size()-1), "increasing coupon notionals");
                notionals_.add(coupon.nominal());
                // in this case, we also add the last valid date for
                // the previous one...
                notionalSchedule_.add(lastPaymentDate);
                // ...and store the candidate for this one.
                lastPaymentDate = coupon.date().clone();
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.