Package org.jquantlib.cashflow

Examples of org.jquantlib.cashflow.Leg


        this.maturityDate_ = maturityDate.clone();
        this.issueDate_ = issueDate.clone();
       
        this.notionalSchedule_ = new ArrayList<Date>();
        this.notionals_ = new ArrayList<Double>();
        this.redemptions_ = new Leg();

        if (!cashflows.isEmpty()) {
            notionalSchedule_.add(new Date());
            notionals_.add(faceAmount);
View Full Code Here


    protected Bond(final /* @Natural */int settlementDays,
                 final Calendar calendar,
                 final /* @Real */double faceAmount,
                 final Date maturityDate) {
        this(settlementDays, calendar, faceAmount, maturityDate, new Date(), new Leg());
    }
View Full Code Here

    protected Bond(final /* @Natural */int settlementDays,
                 final Calendar calendar,
                 final /* @Real */double faceAmount,
                 final Date maturityDate,
                 final Date issueDate) {
        this(settlementDays, calendar, faceAmount, maturityDate, issueDate, new Leg());
    }
View Full Code Here

        // QL.require(Bond.Results.class.isAssignableFrom(results.getClass()), ReflectConstants.WRONG_ARGUMENT_TYPE); // QA:[RG]::verified

        final Bond.ArgumentsImpl a = (Bond.ArgumentsImpl)arguments_;
        final Bond.ResultsImpl   r = (Bond.ResultsImpl)results_;

      final Leg cashflows = a.cashflows;
      final Date settlementDate = a.settlementDate;
      final Date valuationDate = discountCurve.currentLink().referenceDate();
        QL.require(! discountCurve.empty() , "no discounting term structure set"); //// TODO: message

        r.value           = CashFlows.getInstance().npv(cashflows, discountCurve, valuationDate,  valuationDate);
View Full Code Here

                            new Brazil(Brazil.Market.SETTLEMENT),
                            BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted,
                            DateGeneration.Rule.Backward, false);

          // fixed coupons
          final Leg cashflows =
              new FixedRateLeg(schedule, new Actual360())
              .withNotionals(faceAmount)
              .withCouponRates(couponRates)
              .withPaymentAdjustment(BusinessDayConvention.ModifiedFollowing).Leg();
          // redemption
          cashflows.add(new SimpleCashFlow(faceAmount, cashflows.last().date()));

          final Bond bond = new Bond(settlementDays, new Brazil(Brazil.Market.SETTLEMENT),
                    faceAmount, cashflows.last().date(),
                    new Date(1,Month.January,2007), cashflows);

          final double cachedPrice = prices[bondIndex];

          final double price = faceAmount*bond.dirtyPrice(yield.rate(),
 
View Full Code Here

TOP

Related Classes of org.jquantlib.cashflow.Leg

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.