Package org.jquantlib

Examples of org.jquantlib.Settings


        index.addObserver (this);
    }

    @Override
    public Date settlementDate() {
        return calendar.advance(new Settings().evaluationDate(), settlementDays, TimeUnit.Days);
    }
View Full Code Here


        return calendar.advance(new Settings().evaluationDate(), settlementDays, TimeUnit.Days);
    }

    @Override
    public boolean isExpired() {
        if (new Settings().isTodaysPayments()) {
            return valueDate.lt(settlementDate());
        }
        return valueDate.le(settlementDate());
    }
View Full Code Here

        //
        // private methods
        //

        private boolean extraSafetyChecksX() {
            if (new Settings().isExtraSafetyChecks()) {
                for (int i = 0; i < vx.size() - 1; i++) {
                    if (vx.get(i) > vx.get(i + 1))
                        return false;
                }
            }
View Full Code Here

            }
            return true;
        }

        private boolean extraSafetyChecksY() {
            if (new Settings().isExtraSafetyChecks()) {
                for (int i = 0; i < vy.size() - 1; i++) {
                    if (vy.get(i) > vy.get(i + 1))
                        return false;
                }
            }
View Full Code Here

    // overrides Instrument
    //

    @Override
    public boolean isExpired() /* @ReadOnly */ {
        final Date today = new Settings().evaluationDate();
        for (int i = 0; i < legs.size(); i++) {
            for (final CashFlow item : legs.get(i)) {
                if (!item.hasOccurred(today)) {
                    return false;
                }
View Full Code Here

    public static Date date(final String immCode, final Date refDate) {
        QL.require(isIMMcode(immCode, false) , "not a valid IMM code"); // QA:[RG]::verified // 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

    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

    public ExchangeRate lookup(final Currency source, final Currency target, Date date, final ExchangeRate.Type type) {
        if (source.equals(target))
            return new ExchangeRate(source, target, 1.0);

        if (date.isToday()) {
            date = new Settings().evaluationDate();
        }

        if (type == ExchangeRate.Type.Direct)
            return directLookup(source, target, date);
        else if (!source.triangulationCurrency().empty()) {
View Full Code Here

        spread_ = coupon_.spread();
        final Date paymentDate = coupon_.date();
        final InterestRateIndex index = coupon_.index();
        final Handle<YieldTermStructure> rateCurve = index.termStructure();

        final Date today = new Settings().evaluationDate();

        if(paymentDate.gt(today))
            discount_ = rateCurve.currentLink().discount(paymentDate);
        else
            discount_ = 1.0;
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.