Package org.jquantlib

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


            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

                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

    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

        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

            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

            //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

        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

        if (date.le(notionalSchedule_.get(index)))
            // no doubt about what to return
            //return notionals_[index-1];
            return notionals_.get(index-1);
        else {
            if (new Settings().isTodaysPayments())
                // We consider today's payment as pending; the bond still
                // has the previous notional
                return notionals_.get(index-1);
            else
                // today's payment has occurred; the bond already changed
View Full Code Here

        return settlementDate(new Date());
    }

    //FIXME: intended to return a copy!!!!!!!!!!!!!!!!!!! review!
    public Date settlementDate(final Date date) {
        final Date d = (date.isNull()) ? new Settings().evaluationDate() : date;

        // usually, the settlement is at T+n...
        final Date settlement = calendar_.advance(d, settlementDays_, TimeUnit.Days);
        // ...but the bond won't be traded until the issue date (if given.)
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.