Package org.jquantlib.time.calendars

Examples of org.jquantlib.time.calendars.Target$Impl


  @Test
  public void testCachedZero() {

      QL.info("Testing zero-coupon bond prices against cached values...");

        final Calendar calendar = new Target();
        final Date today = calendar.adjust(Date.todaysDate());
        // final Date today = calendar.adjust(new Date(6,Month.June,2007));
      // final Date today = new Date(22,Month.November,2004);
      final Settings settings = new Settings();
      settings.setEvaluationDate(today);
View Full Code Here


  @Test
  public void testCachedFixed() {

      QL.info("Testing fixed-coupon bond prices against cached values...");

        final Calendar calendar = new Target();
        final Date today = calendar.adjust(Date.todaysDate());
        // final Date today = calendar.adjust(new Date(6,Month.June,2007));
        // final Date today = new Date(22,Month.November,2004);
        final Settings settings = new Settings();
        settings.setEvaluationDate(today);
View Full Code Here

  @Test
  public void testBrazilianCached() {

      QL.info("Testing Brazilian public bond prices against cached values...");

        final Calendar calendar = new Target();
        // final Date today = calendar.adjust(Date.todaysDate());
      final Date today = calendar.adjust(new Date(6,Month.June,2007));
      final Settings settings = new Settings();
      settings.setEvaluationDate(today);

        //final double faceAmount = 1000000.0;
        final double faceAmount = 1000.0;
View Full Code Here

     * @param referenceDate
     * @param dc
     * @see YieldTermStructure#YieldTermStructure(Date, Calendar, DayCounter)
     */
    protected AbstractYieldTermStructure(final Date referenceDate, final DayCounter dc) {
        super(referenceDate, new Target(), dc);
    }
View Full Code Here

     *
     * @param referenceDate
     * @see YieldTermStructure#YieldTermStructure(Date, Calendar, DayCounter)
     */
    protected AbstractYieldTermStructure(final Date referenceDate) {
        super(referenceDate, new Target(), new Actual365Fixed());
    }
View Full Code Here

     * @param settlementDays
     * @param dc
     * @see YieldTermStructure#YieldTermStructure(int, Calendar, DayCounter)
     */
    protected AbstractYieldTermStructure(final int settlementDays, final DayCounter dc) {
        super(settlementDays, new Target(), dc);
    }
View Full Code Here

     *
     * @param settlementDays
     * @see YieldTermStructure#YieldTermStructure(int, Calendar, DayCounter)
     */
    protected AbstractYieldTermStructure(final int settlementDays) {
        super(settlementDays, new Target(), new Actual365Fixed());
    }
View Full Code Here

    public Euribor(final Period tenor, final Handle<YieldTermStructure> h) {
        super("Euribor",
                tenor,
                2, // settlement days
                new EURCurrency(),
                new Target(),
                euriborConvention(tenor),
                euriborEOM(tenor),
                new Actual360(),
                h);
        QL.require(tenor().units() != TimeUnit.Days , "for daily tenors dedicated DailyTenor constructor must be used"); // QA:[RG]::verified // TODO: message
View Full Code Here

    @Test
    public void testEndOfMonth() {
        QL.info("Testing end-of-month calculation...");

        final Calendar c = new Target(); // any calendar would be OK

        Date eom;
        final Date counter = Date.minDate();
        final Date last = Date.maxDate().sub(new Period(2, TimeUnit.Months));

        while (counter.le(last)) {
            eom = c.endOfMonth(counter);
            // check that eom is eom
            if (!c.isEndOfMonth(eom)) {
                Assert.fail(String.format("%s %s %s is not the last business day in %s according to %s",
                        eom.weekday(), eom.dayOfMonth(), eom.month(), eom.year(), c.name() ));
            }
            // check that eom is in the same month as counter
            if (eom.month()!=counter.month()) {
                Assert.fail(String.format("%s is not the same month as %s", eom, counter ));
            }
View Full Code Here


    public TermStructuresTest() {
        QL.info("::::: "+this.getClass().getSimpleName()+" :::::");

        this.calendar = new Target();
        this.settlementDays = 2;
        this.termStructure = null;
        this.dummyTermStructure = null;

        //FIXME: remove comments when PiecewiseYieldCurve becomes available
View Full Code Here

TOP

Related Classes of org.jquantlib.time.calendars.Target$Impl

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.