Examples of Settings


Examples of org.jquantlib.Settings

    @Override
    // TODO: code review :: please verify against QL/C++ code
    public double fixing(final Date fixingDate, final boolean forecastTodaysFixing) {
        // TODO: code review :: please verify against QL/C++ code
        QL.require(isValidFixingDate(fixingDate) , "Fixing date is not valid"); // QA:[RG]::verified // TODO: message
        final Date today = new Settings().evaluationDate();
        final boolean enforceTodaysHistoricFixings = new Settings().isEnforcesTodaysHistoricFixings();

        if (fixingDate.lt(today) || (fixingDate.equals(today) && enforceTodaysHistoricFixings && !forecastTodaysFixing)) {
            // must have been fixed
            try {
                return IndexManager.getInstance().get(name()).get(fixingDate);
View Full Code Here

Examples of org.jquantlib.Settings

        //
        // private methods
        //

        private boolean extraSafetyChecks() {
            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

Examples of org.jquantlib.Settings

    // overrides Instrument
    //

    @Override
    public boolean isExpired() /* @ReadOnly */ {
        final Date evaluationDate = new Settings().evaluationDate();
        return exercise.lastDate().le( evaluationDate );
    }
View Full Code Here

Examples of org.jquantlib.Settings

            while (floorRates_.size() < floatingLeg_.size()) {
                floorRates_.add(floorRates_.get(floorRates_.size() - 1));
            }
        }

        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

Examples of org.jquantlib.Settings

                floorRates_.add(floorRates_.get(floorRates_.size()-1));
            }
        } else
            throw new LibraryException("only Cap/Floor types allowed in this constructor"); // QA:[RG]::verified // 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

Examples of org.jquantlib.Settings

    public InverseCumulativeNormal(final double average, final double sigma) {
        QL.require(sigma > 0.0 , SIGMA_MUST_BE_POSITIVE); // QA:[RG]::verified // TODO: message
        this.average = average;
        this.sigma = sigma;
        this.highPrecision = new Settings().isRefineHighPrecisionUsingHalleysMethod();
    }
View Full Code Here

Examples of org.jquantlib.Settings

        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_);
        }

//XXX: remove this block
View Full Code Here

Examples of org.jquantlib.Settings

            Collections.sort(cashflows_, new EarlierThanCashFlowComparator());
            maturityDate_ = coupons.get(coupons.size() - 1).date();
            addRedemptionsToCashflows();
        }

        final Date evaluationDate = new Settings().evaluationDate();
        evaluationDate.addObserver(this);
    }
View Full Code Here

Examples of org.jquantlib.Settings

            //now add last cashflow back to the last position
            cashflows.add(last);
        }

        final Date evaluationDate = new Settings().evaluationDate();
        evaluationDate.addObserver(this);
    }
View Full Code Here

Examples of org.jquantlib.Settings

        this.notionals_ = new ArrayList<Double>();
        this.notionalSchedule_ = new ArrayList<Date>();
        this.redemptions_ = new Leg();

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

        evaluationDate.addObserver(this);
        this.discountCurve.addObserver(this);
    }
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.