Examples of dayCounter()


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

            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 {
                    firstCouponFound = true;
                    nominal = cp.nominal();
View Full Code Here

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

                                "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.dayCounter()

            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;
                    nominal = cp.nominal();
View Full Code Here

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

                                "different coupons on " + paymentDate.toString());
                } else {
                    firstCouponFound = true;
                    nominal = cp.nominal();
                    accrualPeriod = cp.accrualPeriod();
                    dc = cp.dayCounter();
                }
                result += cp.accruedAmount(settlement);
            }
        }
        return result/notional(settlement)*100.0;
 
View Full Code Here

Examples of org.jquantlib.indexes.Euribor.dayCounter()

                instruments[i] = new
                    DepositRateHelper(r, new Period(depositData[i].n,depositData[i].units),
                                      euribor6m.fixingDays(), calendar,
                                      euribor6m.businessDayConvention(),
                                      euribor6m.endOfMonth(),
                                      euribor6m.dayCounter());
            }

            for (int i=0; i<swaps; i++) {
                final Handle<Quote> r = new Handle<Quote>(rates[i+deposits]);
                instruments[i+deposits] = new
View Full Code Here

Examples of org.jquantlib.indexes.Euribor.dayCounter()

                    FraRateHelper(r, fraData[i].n, fraData[i].n + 3,
                                  euribor3m.fixingDays(),
                                  euribor3m.fixingCalendar(),
                                  euribor3m.businessDayConvention(),
                                  euribor3m.endOfMonth(),
                                  euribor3m.dayCounter());
            }

            for (int i=0; i<bonds; i++) {
                final Handle<Quote> p = new Handle<Quote>(prices[i]);
                final Date maturity = calendar.advance(today, bondData[i].n, bondData[i].units);
View Full Code Here

Examples of org.jquantlib.indexes.IborIndex.dayCounter()

                                      .schedule();


            final BMASwap swap = new BMASwap(BMASwap.Type.Payer, 100.0,
                               liborSchedule, 0.75, 0.0,
                               libor3m, libor3m.dayCounter(),
                               bmaSchedule, bma, vars.bmaDayCounter);
            swap.setPricingEngine(new DiscountingSwapEngine(libor3m.termStructure()));

            /*@Real*/ final double expectedFraction = bmaData[i].rate/100;
            /*@Real*/ final double estimatedFraction = swap.fairLiborFraction();
View Full Code Here

Examples of org.jquantlib.indexes.IborIndex.dayCounter()

                instruments[i] = new
                    DepositRateHelper(r, new Period(depositData[i].n,depositData[i].units),
                                      euribor6m.fixingDays(), calendar,
                                      euribor6m.businessDayConvention(),
                                      euribor6m.endOfMonth(),
                                      euribor6m.dayCounter());
            }

            for (int i=0; i<swaps; i++) {
                final Handle<Quote> r = new Handle<Quote>(rates[i+deposits]);
                instruments[i+deposits] = new
View Full Code Here

Examples of org.jquantlib.indexes.ibor.USDLibor.dayCounter()

                                      .schedule();


            final BMASwap swap = new BMASwap(BMASwap.Type.Payer, 100.0,
                               liborSchedule, 0.75, 0.0,
                               libor3m, libor3m.dayCounter(),
                               bmaSchedule, bma, vars.bmaDayCounter);
            swap.setPricingEngine(new DiscountingSwapEngine(libor3m.termStructure()));

            /*@Real*/ final double expectedFraction = bmaData[i].rate/100;
            /*@Real*/ final double estimatedFraction = swap.fairLiborFraction();
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate.dayCounter()

                    new Date(1,Month.January,2007), cashflows);

          final double cachedPrice = prices[bondIndex];

          final double price = faceAmount*bond.dirtyPrice(yield.rate(),
                                                       yield.dayCounter(),
                                                       yield.compounding(),
                                                       yield.frequency(),
                                                       today)/100;
          if (Math.abs(price-cachedPrice) > tolerance) {
              fail("failed to reproduce cached price:\n"
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.