Examples of date()


Examples of org.jquantlib.cashflow.CashFlow.date()

        final CashFlow cf = CashFlows.getInstance().nextCashFlow(cashflows_, settlement);

        if (cf==null)
            return 0.0;

        final Date paymentDate = cf.date();
        boolean firstCouponFound = false;
        /*@Real*/double nominal = Constants.NULL_REAL;
        /*@Time*/double accrualPeriod = Constants.NULL_REAL;
        DayCounter dc = null;

View Full Code Here

Examples of org.jquantlib.cashflow.CashFlow.date()

        final Date settlementDate = process.riskFreeRate().currentLink().referenceDate();
        double riskless = 0.0;
        for (int i=0; i<a.cashFlow.size(); i++) {
            final CashFlow cashflow = a.cashFlow.get(i);
            if (cashflow.date().gt(settlementDate)) {
                riskless += cashflow.amount() * process.riskFreeRate().currentLink().discount(cashflow.date());
            }
        }

        final double spot = process.stateVariable().currentLink().value() - riskless;
View Full Code Here

Examples of org.jquantlib.cashflow.CashFlow.date()

        final Date settlementDate = process.riskFreeRate().currentLink().referenceDate();
        double riskless = 0.0;
        for (int i=0; i<a.cashFlow.size(); i++) {
            final CashFlow cashflow = a.cashFlow.get(i);
            if (cashflow.date().gt(settlementDate)) {
                riskless += cashflow.amount() * process.riskFreeRate().currentLink().discount(cashflow.date());
            }
        }

        final double spot = process.stateVariable().currentLink().value() - riskless;
        QL.require(spot > 0.0, "negative or null underlying after subtracting dividends"); // TODO: message
View Full Code Here

Examples of org.jquantlib.cashflow.CashFlow.date()

        greeks.vega = black.vega(t);

        double delta_theta = 0.0, delta_rho = 0.0;
        for (int i = 0; i < a.cashFlow.size(); i++) {
            final CashFlow cashflow = a.cashFlow.get(i);
            final Date d = cashflow.date();
            if (d.gt(settlementDate)) {
                delta_theta -= cashflow.amount()
                * process.riskFreeRate().currentLink().zeroRate(d, rfdc, Compounding.Continuous, Frequency.Annual).rate()
                * process.riskFreeRate().currentLink().discount(d);
                delta_rho += cashflow.amount() * process.time(d) * process.riskFreeRate().currentLink().discount(t);
 
View Full Code Here

Examples of org.jquantlib.cashflow.CashFlow.date()

        final CashFlow cf = CashFlows.getInstance().nextCashFlow(cashflows_, settlement);

        if (cf==null)
            return 0.0;

        final Date paymentDate = cf.date();
        boolean firstCouponFound = false;
        /*@Real*/double nominal = Constants.NULL_REAL;
        /*@Time*/double accrualPeriod = Constants.NULL_REAL;
        DayCounter dc = null;

View Full Code Here

Examples of org.jquantlib.cashflow.CashFlow.date()

        final Date settlementDate = process.riskFreeRate().currentLink().referenceDate();
        double riskless = 0.0;
        for (int i=0; i<a.cashFlow.size(); i++) {
            final CashFlow cashflow = a.cashFlow.get(i);
            if (cashflow.date().gt(settlementDate)) {
                riskless += cashflow.amount() * process.riskFreeRate().currentLink().discount(cashflow.date());
            }
        }

        final double spot = process.stateVariable().currentLink().value() - riskless;
View Full Code Here

Examples of org.jquantlib.cashflow.CashFlow.date()

        final Date settlementDate = process.riskFreeRate().currentLink().referenceDate();
        double riskless = 0.0;
        for (int i=0; i<a.cashFlow.size(); i++) {
            final CashFlow cashflow = a.cashFlow.get(i);
            if (cashflow.date().gt(settlementDate)) {
                riskless += cashflow.amount() * process.riskFreeRate().currentLink().discount(cashflow.date());
            }
        }

        final double spot = process.stateVariable().currentLink().value() - riskless;
        QL.require(spot > 0.0, "negative or null underlying after subtracting dividends"); // TODO: message
View Full Code Here

Examples of org.jquantlib.cashflow.CashFlow.date()

        greeks.vega = black.vega(t);

        double delta_theta = 0.0, delta_rho = 0.0;
        for (int i = 0; i < a.cashFlow.size(); i++) {
            final CashFlow cashflow = a.cashFlow.get(i);
            final Date d = cashflow.date();
            if (d.gt(settlementDate)) {
                delta_theta -= cashflow.amount()
                * process.riskFreeRate().currentLink().zeroRate(d, rfdc, Compounding.Continuous, Frequency.Annual).rate()
                * process.riskFreeRate().currentLink().discount(d);
                delta_rho += cashflow.amount() * process.time(d) * process.riskFreeRate().currentLink().discount(t);
 
View Full Code Here

Examples of org.jquantlib.cashflow.Coupon.date()

            }
            /*@Real*/final double notional = coupon.nominal();
            // we add the notional only if it is the first one...
            if (notionals_.isEmpty()) {
                notionals_.add(coupon.nominal());
                lastPaymentDate = coupon.date();
            } else if (!Closeness.isClose(notional, notionals_.get(notionals_.size() -1 ))) {
                // ...or if it has changed.
                assert(notional < notionals_.get(notionals_.size()-1)):("increasing coupon notionals");
                notionals_.add(coupon.nominal());
                // in this case, we also add the last valid date for
View Full Code Here

Examples of org.jquantlib.cashflow.Coupon.date()

                notionals_.add(coupon.nominal());
                // in this case, we also add the last valid date for
                // the previous one...
                notionalSchedule_.add(lastPaymentDate);
                // ...and store the candidate for this one.
                lastPaymentDate = coupon.date();
            } else {
                // otherwise, we just extend the valid range of dates
                // for the current notional.
                lastPaymentDate = coupon.date();
            }
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.