Package org.jquantlib.indexes

Examples of org.jquantlib.indexes.Euribor


        final RelinkableHandle<YieldTermStructure> curveHandle = new RelinkableHandle<YieldTermStructure>();
        curveHandle.linkTo(vars.termStructure);

        // check deposits
        for (int i=0; i<vars.deposits; i++) {
            final Euribor index = new Euribor(new Period(depositData[i].n, depositData[i].units), curveHandle);
            /*@Rate*/ final double expectedRate  = depositData[i].rate/100;
            /*@Rate*/ final double estimatedRate = index.fixing(vars.today);
            if (Math.abs(expectedRate-estimatedRate) > tolerance) {
              throw new RuntimeException(
                  String.format("%d %s %s %s %f %s %f",
                      depositData[i].n,
                      depositData[i].units == TimeUnit.Weeks ? "week(s)" : "month(s)",
View Full Code Here


            fraHelpers  = new RateHelper[fras];
            bondHelpers = new RateHelper[bonds];
            schedules   = new Schedule[bonds];
            bmaHelpers  = new RateHelper[bmas];
           
            final IborIndex euribor6m = new Euribor(new Period(6, TimeUnit.Months), new Handle<YieldTermStructure>());
            for (int i=0; i<deposits; i++) {
                final Handle<Quote> r = new Handle<Quote>(rates[i]);
                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
                    SwapRateHelper(r, new Period(swapData[i].n, swapData[i].units),
                                   calendar,
                                   fixedLegFrequency, fixedLegConvention,
                                   fixedLegDayCounter, euribor6m);
            }

            final Euribor euribor3m = new Euribor(new Period(3, TimeUnit.Months), new Handle<YieldTermStructure>());
            for (int i=0; i<fras; i++) {
                final Handle<Quote> r = new Handle<Quote>(fraRates[i]);
                fraHelpers[i] = new
                    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

TOP

Related Classes of org.jquantlib.indexes.Euribor

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.