Examples of BusinessDayConvention


Examples of org.jquantlib.time.BusinessDayConvention

    final int lengths[] = { 3, 5, 10, 15, 20 };
    final int settlementDays = 3;
    final double coupons[] = { 0.02, 0.05, 0.08 };
    final Frequency frequencies[] = { Frequency.Semiannual, Frequency.Annual };
    final DayCounter bondDayCount = new Thirty360();
    final BusinessDayConvention accrualConvention = BusinessDayConvention.Unadjusted;
    final BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing;
    final double redemption = 100.0;

    final double yields[] = { 0.03, 0.04, 0.05, 0.06, 0.07 };
    final Compounding compounding[] = { Compounding.Compounded, Compounding.Continuous };
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

    final int lengths[] = { 3, 5, 10, 15, 20 };
    final int settlementDays = 3;
    final double coupons[] = { 0.02, 0.05, 0.08 };
    final Frequency frequencies[] = { Frequency.Semiannual, Frequency.Annual };
    final DayCounter bondDayCount = new Actual360();
    final BusinessDayConvention accrualConvention = BusinessDayConvention.Unadjusted;
    final BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing;
    final double redemption = 100.0;

    final double yields[] = { 0.03, 0.04, 0.05, 0.06, 0.07 };

    for (final int length : lengths) {
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

    public void testSchedule() {
        final Calendar calendar = new Target();
        final Period maturity = new Period(30, TimeUnit.Years);
        final Date maturityDate = startDate.add(maturity);
        final Period accPeriodTenor = new Period(6, TimeUnit.Months);
        final BusinessDayConvention modFollow = BusinessDayConvention.ModifiedFollowing;
        final DateGeneration.Rule dateRule = DateGeneration.Rule.Backward;

        final Schedule firstConstrSchedule = new Schedule(
                startDate, maturityDate, accPeriodTenor,
                calendar, modFollow, modFollow,
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

        this.type = type;
        this.nominal = nominal;
        this.liborFraction = liborFraction;
        this.liborSpread = liborSpread;

        final BusinessDayConvention convention = liborSchedule.businessDayConvention();
       
        final Leg iborLeg = new IborLeg(liborSchedule, liborIndex)
                      .withNotionals(nominal)
                      .withPaymentDayCounter(liborDayCount)
                      .withPaymentAdjustment(convention)
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

            refStart = start = schedule.date(i);
            refEnd   =   end = schedule.date(i+1);
            final Date paymentDate =
                isZero ? lastPaymentDate : calendar.adjust(end, paymentAdj);
            if (i==0   && !schedule.isRegular(i+1)) {
                final BusinessDayConvention bdc = schedule.businessDayConvention();
                refStart = calendar.adjust(end.sub(schedule.tenor()), bdc);
            }
            if (i==n-1 && !schedule.isRegular(i+1)) {
                final BusinessDayConvention bdc = schedule.businessDayConvention();
                refEnd = calendar.adjust(start.add(schedule.tenor()), bdc);
            }
            if (get(gearings, i, 1.0) == 0.0) { // fixed coupon
                add(new FixedRateCoupon(get(nominals, i, 1.0),
                                    paymentDate,
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

                BusinessDayConvention.ModifiedFollowing,
                true, depositDayCounter);

        // setup swaps
        final Frequency swFixedLegFrequency = Frequency.Annual;
        final BusinessDayConvention swFixedLegConvention = BusinessDayConvention.Unadjusted;
        final DayCounter swFixedLegDayCounter = new Thirty360(Convention.European);
        final IborIndex  swFloatingLegIndex = new Euribor6M(new Handle<YieldTermStructure>());

        // TODO and FIXME: not sure whether the class stuff works properly
        // final IborIndex swFloatingLegIndex = Euribor.getEuribor6M(new Handle<YieldTermStructure>(YieldTermStructure.class)); //FIXME::RG::Handle
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

        // other instrument dependant infos.  Quotes are passed in
        // relinkable handles which could be relinked to some other
        // data source later.

        final DayCounter fraDayCounter = euribor3m.currentLink().dayCounter();
        final BusinessDayConvention convention = euribor3m.currentLink().businessDayConvention();
        final boolean endOfMonth = euribor3m.currentLink().endOfMonth();

        final RateHelper fra1x4  = new FraRateHelper(h1x4,  14, fixingDays, calendar, convention, endOfMonth, fraDayCounter);
        final RateHelper fra2x5  = new FraRateHelper(h2x5,  25, fixingDays, calendar, convention, endOfMonth, fraDayCounter);
        final RateHelper fra3x6  = new FraRateHelper(h3x6,  36, fixingDays, calendar, convention, endOfMonth, fraDayCounter);
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

        QL.info("Excercise date is: " + exerciseDate.shortDate());
        final Date issueDate = calendar.advance(exerciseDate, -length, TimeUnit.Years);
        QL.info("Issue date is: " + issueDate.shortDate());

        //Fix business day convention and compounding?? frequency
        final BusinessDayConvention convention = BusinessDayConvention.ModifiedFollowing;
        final Frequency frequency = Frequency.Annual;

        final Schedule schedule = new Schedule(
                issueDate, exerciseDate,
                new Period(frequency), calendar,
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

    public void testSchedule() {
        final Calendar calendar = new Target();
        final Period maturity = new Period(30, TimeUnit.Years);
        final Date maturityDate = startDate.add(maturity);
        final Period accPeriodTenor = new Period(6, TimeUnit.Months);
        final BusinessDayConvention modFollow = BusinessDayConvention.ModifiedFollowing;
        final DateGeneration.Rule dateRule = DateGeneration.Rule.Backward;

        final Schedule firstConstrSchedule = new Schedule(
                startDate, maturityDate, accPeriodTenor,
                calendar, modFollow, modFollow,
View Full Code Here

Examples of org.jquantlib.time.BusinessDayConvention

    final int lengths[] = { 3, 5, 10, 15, 20 };
    final int settlementDays = 3;
    final double coupons[] = { 0.02, 0.05, 0.08 };
    final Frequency frequencies[] = { Frequency.Semiannual, Frequency.Annual };
    final DayCounter bondDayCount = new Thirty360();
    final BusinessDayConvention accrualConvention = BusinessDayConvention.Unadjusted;
    final BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing;
    final double redemption = 100.0;

    final double yields[] = { 0.03, 0.04, 0.05, 0.06, 0.07 };
    final Compounding compounding[] = { Compounding.Compounded, Compounding.Continuous };
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.