Examples of InterestRate


Examples of org.jquantlib.termstructures.InterestRate

    private double  rebate()  {
        return a.rebate;
    }

    private double /*@Rate*/  riskFreeRate()  {
        final InterestRate rate =  this.process.riskFreeRate().currentLink().zeroRate(residualTime(), Compounding.Continuous,
                Frequency.NoFrequency, false);
        return rate.rate();
    }
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

    private double /*@DiscountFactor*/  riskFreeDiscount()  {
        return this.process.riskFreeRate().currentLink().discount(residualTime());
    }

    private double /*@Rate*/  dividendYield()  {
        final InterestRate yield = this.process.dividendYield().currentLink().zeroRate(
                residualTime(), Compounding.Continuous, Frequency.NoFrequency, false);
        return yield.rate();
    }
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

     * #initializeStepCondition()
     */
    @Override
    protected void initializeStepCondition() {
        final double residualTime = getResidualTime();
        final InterestRate riskFreeRate = process.riskFreeRate().currentLink().zeroRate(
                residualTime, Compounding.Continuous, Frequency.Annual, false);

        stepCondition = new ShoutCondition(intrinsicValues.values(), residualTime, riskFreeRate.rate());
    }
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

            this.settlementDate_ = settlementDate;
        }

        @Override
        public double op(final double guess) {
            final InterestRate rate = new InterestRate(guess, dayCounter_, compounding_, frequency_);
            final double NPV = npv(cashflows_, rate, settlementDate_);
            return marketPrice_ - NPV;
        }
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

        this.notionals_ = notionals; // TODO: clone() ?
        return this;
    }

    public FixedRateLeg withCouponRates(/* @Rate */final double couponRate) {
        couponRates_ = new InterestRate[]{new InterestRate(couponRate, paymentDayCounter_, Compounding.Simple)};

        if (System.getProperty("EXPERIMENTAL") == null)
            throw new UnsupportedOperationException("Work in progress");

        //        couponRates_.clear();
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

    }

    public FixedRateLeg withCouponRates(/* @Rate */final double [] couponRates) {
        couponRates_ = new InterestRate[couponRates.length];
        for (int i = 0; i<couponRates.length; i++) {
            couponRates_[i] = new InterestRate(couponRates[i], paymentDayCounter_, Compounding.Simple);
        }
        return this;
    }
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

        final Calendar calendar = schedule_.calendar();

        // first period might be short or long
        Date start = schedule_.date(0), end = schedule_.date(1);
        Date paymentDate = calendar.adjust(end, paymentAdjustment_);
        InterestRate rate = couponRates_[0];
        /*@Real*/ double nominal = notionals_[0];
        if (schedule_.isRegular(1)) {
            // TODO: code review :: please verify against QL/C++ code
            QL.require(firstPeriodDayCounter_==null || !firstPeriodDayCounter_.equals(paymentDayCounter_) , "regular first coupon does not allow a first-period day count"); // QA:[RG]::verified // TODO: message
            leg.add(new FixedRateCoupon(nominal, paymentDate, rate, paymentDayCounter_, start, end, start, end));
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

      final Date accrualStartDate, final Date accrualEndDate,
      final Date refPeriodStart, final Date refPeriodEnd) {
    super(nominal, paymentDate, accrualStartDate, accrualEndDate,
        refPeriodStart, refPeriodEnd);

    this.rate = new InterestRate(rate, dayCounter, Compounding.Simple);
    this.dayCounter = dayCounter;
  }
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

      final Date accrualStartDate, final Date accrualEndDate,
      final Date refPeriodStart, final Date refPeriodEnd) {
    super(nominal, paymentDate, accrualStartDate, accrualEndDate,
        refPeriodStart, refPeriodEnd);

    this.rate = new InterestRate(rate, dayCounter, Compounding.Simple);
    this.dayCounter = dayCounter;
  }
View Full Code Here

Examples of org.jquantlib.termstructures.InterestRate

            this.settlementDate_ = settlementDate;
        }

        @Override
        public double op(final double guess) {
            final InterestRate rate = new InterestRate(guess, dayCounter_, compounding_, frequency_);
            final double NPV = npv(cashflows_, rate, settlementDate_);
            return marketPrice_ - NPV;
        }
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.