Examples of DayCounter


Examples of org.jquantlib.daycounters.DayCounter

     * @warning term structures initialized by means of this
     *          constructor must manage their own reference date
     *          by overriding the referenceDate() method.
     */
    public LocalVolTermStructure() {
        this(new Calendar(), BusinessDayConvention.Following, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

     * @warning term structures initialized by means of this
     *          constructor must manage their own reference date
     *          by overriding the referenceDate() method.
     */
    public LocalVolTermStructure(final Calendar cal) {
        this(cal, BusinessDayConvention.Following, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

     *          by overriding the referenceDate() method.
     */
    public LocalVolTermStructure(
            final Calendar cal,
            final BusinessDayConvention bdc) {
        this(cal, bdc, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

    /**
     *  initialize with a fixed reference date
     */
    public LocalVolTermStructure(final Date referenceDate) {
        this(referenceDate, new Calendar(), BusinessDayConvention.Following, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

     *  initialize with a fixed reference date
     */
    public LocalVolTermStructure(
            final Date referenceDate,
            final Calendar cal) {
        this(referenceDate, cal, BusinessDayConvention.Following, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

     */
    public LocalVolTermStructure(
            final Date referenceDate,
            final Calendar cal,
            final BusinessDayConvention bdc) {
        this(referenceDate, cal, bdc, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

     * calculate the reference date based on the global evaluation date
     */
    public LocalVolTermStructure(
            /*@Natural*/ final int settlementDays,
            final Calendar cal) {
        this(settlementDays, cal, BusinessDayConvention.Following, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

     */
    public LocalVolTermStructure(
            /*@Natural*/ final int settlementDays,
            final Calendar cal,
            final BusinessDayConvention bdc) {
        this(settlementDays, cal, bdc, new DayCounter());
    }
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

    @Ignore
    @Test
    public void testPiecewiseYieldCurve() {
        final Date d = new Date();
        final RateHelper[] instruments = null;
        final DayCounter dc = new DayCounter();
        final Handle<Quote> jumps[] = null;
        final Date[] jumpDates = null;
        final double accuracy = 0;
        final org.jquantlib.math.interpolations.Interpolation.Interpolator i = new Linear();
        final org.jquantlib.termstructures.Bootstrap b = new IterativeBootstrap(PiecewiseYieldCurve.class);
View Full Code Here

Examples of org.jquantlib.daycounters.DayCounter

        /*@Time*/ final double expected[] = { 0.25, 0.5, 1.0 };

        // 4 years should be enough
        final Date first = new Date(1,Month.January,2002);
        final Date last  = new Date(31,Month.December,2005);
        final DayCounter dayCounter = new SimpleDayCounter();

        for (final Date start = first; start.le(last); start.inc()) {
            for (int i=0; i<expected.length-1; i++) {
                final Date end = start.add(p[i]);
                /*@Time*/ final double  calculated = dayCounter.yearFraction(start, end);

                if (abs(calculated-expected[i]) > 1.0e-12) {
                    fail("from " + start + " to " + end + ":\n"
                            + "    calculated: " + calculated + "\n"
                            + "    expected:   " + expected[i]);
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.