Package org.jquantlib

Examples of org.jquantlib.Settings


                floorRates_.add(floorRates_.get(floorRates_.size()-1));
            }
        } else
            throw new LibraryException("only Cap/Floor types allowed in this constructor"); // TODO: message

        final Date evaluationDate = new Settings().evaluationDate();
        for (final CashFlow cashFlow : floatingLeg_) {
            cashFlow.addObserver(this);
        }

        // TODO: code review :: please verify against QL/C++ code
View Full Code Here


    public static Date date(final String immCode, final Date refDate) {
        QL.require(isIMMcode(immCode, false) , "not a valid IMM code"); // TODO: message

        Date referenceDate;
        if (refDate.isNull()) {
            referenceDate = new Settings().evaluationDate();
        } else {
            referenceDate = refDate;
        }

        final char code = immCode.charAt(0);
View Full Code Here

     *   Exchange.
     */
    public static Date nextDate(final Date date, final boolean mainCycle) {
        Date refDate;
        if (date.isNull()) {
            refDate = new Settings().evaluationDate();
        } else {
            refDate = date;
        }

        int y = refDate.year();
View Full Code Here

        final RelinkableHandle<YieldTermStructure> euriborTermStructure = new RelinkableHandle<YieldTermStructure>();
        final Handle<IborIndex> euribor3m = new Handle<IborIndex>(new Euribor365_3M(euriborTermStructure));

        final Date todaysDate = new Date(23, Month.May, 2006);
        new Settings().setEvaluationDate(todaysDate);

        final Calendar calendar = euribor3m.currentLink().fixingCalendar();
        final int fixingDays = euribor3m.currentLink().fixingDays();
        final Date settlementDate = calendar.advance(todaysDate, fixingDays, TimeUnit.Months );
View Full Code Here

      return this.fixing(fixingDate, false);
   
   
    @Override
    public double fixing(Date fixingDate, boolean forecastTodaysFixing) {
      Date today = new Settings().evaluationDate();
      Date todayMinusLag = today.sub(availabilityLag);
     
      Pair<Date,Date> lim = InflationTermStructure.inflationPeriod(todayMinusLag, frequency);
      todayMinusLag = lim.second().inc();
     
View Full Code Here

    public int lowerBound() /* @ReadOnly */ {
        return lowerBound( new Date() );
     }

    public int lowerBound(final Date refDate) /* @ReadOnly */{
        final Date d = (refDate.isNull() ? new Settings().evaluationDate() : refDate);
        return Date.lowerBound(dates_, d.clone());
    }
View Full Code Here

      return this.fixing(fixingDate, false);
   
   
    @Override
    public double fixing(Date fixingDate, boolean forecastTodaysFixing) {
      Date today = new Settings().evaluationDate();
      Date todayMinusLag = today.sub(availabilityLag);
     
      Pair<Date,Date> lim = InflationTermStructure.inflationPeriod(todayMinusLag, frequency);
      todayMinusLag = lim.second().inc();
     
View Full Code Here

                throw new UnsupportedOperationException();
            }
        };

        final Date settlementDate = new Date(19, February, 2002);
        new Settings().setEvaluationDate(todaysDate);

        // TODO: code review :: please verify against QL/C++ code

        clock.stopClock();
        clock.log();
View Full Code Here

        // set up dates
        final Calendar calendar = new Target();
        final Date todaysDate = new Date(15, Month.May, 1998);
        final Date settlementDate = new Date(17, Month.May, 1998);
        new Settings().setEvaluationDate(todaysDate);

        // our options
        final Option.Type type = Option.Type.Put;
        final double strike = 40.0;
        final double underlying = 36.0;
View Full Code Here

        Date startDate;
        if (!effectiveDate.isNull()) {
            startDate = effectiveDate;
        } else {
            /*@Natural*/ final int fixingDays = iborIndex.fixingDays();
            final Date referenceDate = new Settings().evaluationDate();
            final Date spotDate = floatCalendar.advance(referenceDate, fixingDays, TimeUnit.Days);
            startDate = spotDate.add(forwardStart);
        }

        Date endDate;
View Full Code Here

TOP

Related Classes of org.jquantlib.Settings

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.