Examples of le()


Examples of org.jquantlib.time.Date.le()

        (coupon_.accrualPeriod()*discount_);
    }

    public double optionletPrice(final Option.Type optionType, final double effStrike)  {
        final Date fixingDate = coupon_.fixingDate();
        if (fixingDate.le(new Settings().evaluationDate())) {
            // the amount is determined
            double a, b;
            if (optionType==Option.Type.Call) {
                a = coupon_.indexFixing();
                b = effStrike;
View Full Code Here

Examples of org.jquantlib.time.Date.le()

     
      if (fixingDates.get(i).ge(endDate) || valueDate.ge(valueDate)) {
        break;
      }
     
      if (fixingDates.get(i+1).lt(startDate) || nextValueDate.le(startDate)) {
        continue;
      }
     
      d2 = Date.min(nextValueDate, endDate);
      avgBMA += (index.fixing(fixingDates.get(i))) * (d2.sub(d1));
 
View Full Code Here

Examples of org.jquantlib.time.Date.le()

    @Override
    public boolean isExpired(){
        Date lastPaymentDate = Date.minDate();
        for (int i=0; i<floatingLeg_.size(); i++) {
            //FIXME: kind of ugly... intention: get the last date of all dates in the floatingdate c++ max syntax.
            lastPaymentDate = lastPaymentDate.le(floatingLeg_.get(i).date())?floatingLeg_.get(i).date():lastPaymentDate;
        }
        return lastPaymentDate.le(termStructure_.currentLink().referenceDate());
    }

    public Date startDate(){
View Full Code Here

Examples of org.jquantlib.time.Date.le()

        Date lastPaymentDate = Date.minDate();
        for (int i=0; i<floatingLeg_.size(); i++) {
            //FIXME: kind of ugly... intention: get the last date of all dates in the floatingdate c++ max syntax.
            lastPaymentDate = lastPaymentDate.le(floatingLeg_.get(i).date())?floatingLeg_.get(i).date():lastPaymentDate;
        }
        return lastPaymentDate.le(termStructure_.currentLink().referenceDate());
    }

    public Date startDate(){
        return CashFlows.getInstance().startDate(floatingLeg_);
    }
View Full Code Here

Examples of org.jquantlib.time.Date.le()

        public void validate() {
            super.validate();
            final Date exerciseDate = exercise.lastDate();
            for (int i = 0; i < cashFlow.size(); i++) {
                final Date d = cashFlow.get(i).date();
                QL.require(d.le(exerciseDate), "dividend date later than the exercise date"); // TODO: message
            }
        }
    }

View Full Code Here

Examples of org.jquantlib.time.Date.le()

        while (counter.le(last)) {

            final Date immDate = IMM.nextDate(counter, false);

            // check that imm is greater than counter
            if (immDate.le(counter)) {
                fail("\n  " + immDate.weekday() + " " + immDate + " is not greater than " + counter.weekday() + " " + counter);
            }

            // check that imm is an IMM date
            if (!IMM.isIMMdate(immDate, false)) {
View Full Code Here

Examples of org.jquantlib.time.Date.le()

                    final List<Date> fixingDates = new ArrayList<Date>();

                    final Date d = today.clone();
                    final Period THREEMONTH = new Period(3, TimeUnit.Months);
                    d.addAssign(new Period(3, TimeUnit.Months));
                    for (d.addAssign(THREEMONTH); d.le(maturity.lastDate()); d.addAssign(THREEMONTH)) {
                        fixingDates.add(d.clone());
                    }

                    final PricingEngine engine = new AnalyticDiscreteGeometricAveragePriceAsianEngine(process);
View Full Code Here

Examples of org.jquantlib.util.Date.le()

            if (isBusinessDay(from) && (includeFirst || includeLast))
                wd = 1;
        } else {
            if (from.lt(to)) {
                Date d = from;
                while (d.le(to)) {
                    if (isBusinessDay(d))
                        wd++;
                    d = d.getDateAfter(1);
                }
            } else if (from.gt(to)) {
View Full Code Here

Examples of org.jquantlib.util.Date.le()

                        wd++;
                    d = d.getDateAfter(1);
                }
            } else if (from.gt(to)) {
                Date d = to;
                while (d.le(from)) {
                    if (isBusinessDay(d))
                        wd++;
                    d = d.getDateAfter(1);
                }
            }
View Full Code Here

Examples of org.jquantlib.util.Date.le()

                y += 1;
            }
        }

        Date result = DateFactory.getFactory().getNthWeekday(3, Weekday.WEDNESDAY, Month.valueOf(m), y);
        if (result.le(refDate))
            result = nextDate(DateFactory.getFactory().getDate(22, Month.valueOf(m), y), mainCycle);
        return result;
    }

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.