Package org.jquantlib.time

Examples of org.jquantlib.time.Calendar


        final Date[] dates,
      final double[] yields,
      final DayCounter dc,
      final Calendar calendar,
      final Interpolator interpolator) {
    super(dates[0], calendar==null ? new Calendar() : calendar, dc);
   
    QL.validateExperimentalMode();
    QL.require(classI!=null, "Generic type for Interpolation is null");
        this.classI = classI;
   
View Full Code Here


    protected InterpolatedZeroCurve(
            final Class<I> classI,
            final Date referenceDate,
            final DayCounter dc,
            final Interpolator interpolator) {
        super(referenceDate, new Calendar(), dc);
        QL.validateExperimentalMode();
        this.classI = classI;
        this.interpolator = interpolator==null ? constructInterpolator(classI) : interpolator;
    }
View Full Code Here

            final Class<I> classI,
        final /*@Natural*/ int settlementDays,
            final Calendar calendar,
            final DayCounter dc,
            final Interpolator interpolator) {
        super(settlementDays, new Calendar(), dc);
        QL.validateExperimentalMode();

    QL.require(classI!=null, "Generic type for Interpolation is null");
        this.classI = classI;
        this.interpolator = interpolator==null ? constructInterpolator(classI) : interpolator;
View Full Code Here

        this.convAdj = new Handle<Quote>(new SimpleQuote(convAdj));
       
        QL.require(new IMM().isIMMdate(immDate, false) , NOT_A_VALID_IMM_DATE);
       
        earliestDate = immDate;
        final Calendar cal = i.fixingCalendar();
        latestDate = cal.advance(immDate, i.tenor(), i.businessDayConvention());
        yearFraction = i.dayCounter().yearFraction(earliestDate, latestDate);
    }
View Full Code Here

        final StopClock clock = new StopClock();
        clock.startClock();

        // set up dates
        final Calendar calendar = new Target();
        final Date todaysDate = new Date(15, Month.May, 1998);
        final Date settlementDate = new Date(17, Month.May, 1998);
        new Settings().setEvaluationDate(todaysDate);

        // our options
View Full Code Here

  private final static Switzerland SETTLEMENT_CALENDAR = new Switzerland(
      Market.SETTLEMENT);
  private final static Switzerland SWX_CALENDAR = new Switzerland(Market.SWX);

  private Switzerland(Market market) {
    Calendar delegate;
    switch (market) {
    case SETTLEMENT:
      delegate = new SwisSettlementCalendar();
      break;
    case SWX:
View Full Code Here

  private final static Indonesia BEJ_CALENDAR = new Indonesia(
      Market.BEJ);
 

  private Indonesia(Market market) {
    Calendar delegate;
    switch (market) {
    case BEJ:
    case JSX:
      delegate = new IndonesiaBEJCalendar();
      break;
View Full Code Here

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

        final StopClock clock = new StopClock();
        clock.startClock();
        QL.info("Started calculation at: " + clock.getElapsedTime());
        /*********************
         *** MARKET DATA ***
         *********************/

        final Calendar calendar = new Target();

        // FIXME: outdated...
        Date settlementDate = new Date(18, Month.September, 2008);
        // must be a business day
        settlementDate = calendar.adjust(settlementDate);

        final int fixingDays = 3;
        final int settlementDays = 3;

        final Date todaysDate = calendar.advance(settlementDate, -fixingDays, TimeUnit.Days);
        new Settings().setEvaluationDate(todaysDate);

        QL.info("Evaluation date: " + todaysDate.weekday() + ", " + todaysDate);
        QL.info("Settlement date: " + settlementDate.weekday() + ", " + settlementDate);

View Full Code Here

  //Sweden Stock Exchange Calendar
  private final static Sweden SSE_CALENDAR = new Sweden(
      Market.SSE);

  private Sweden(Market market) {
    Calendar delegate;
    switch (market) {
    case SSE:
      delegate = new SwedenSECalendar();
      break;
    default:
View Full Code Here

        final Handle<IborIndex> euribor3m = new Handle<IborIndex>(new Euribor365_3M(euriborTermStructure));

        final Date todaysDate = new Date(23, Month.May, 2006);
        new Settings().setEvaluationDate(todaysDate);

        final Calendar calendar = euribor3m.currentLink().fixingCalendar();
        final int fixingDays = euribor3m.currentLink().fixingDays();
        final Date settlementDate = calendar.advance(todaysDate, fixingDays, TimeUnit.Months );

        System.out.println("Today: "+ todaysDate.weekday() + "," + todaysDate);

        System.out.println("Settlement date: " + settlementDate.weekday() + "," + settlementDate);
View Full Code Here

TOP

Related Classes of org.jquantlib.time.Calendar

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.