Package org.jquantlib.daycounters

Examples of org.jquantlib.daycounters.Actual360


        final double /* @Rate */rRates[] = { 0.01, 0.05, 0.15 };
        final double /* @Volatility */vols[] = { 0.11, 0.50, 1.20 };

        final Date today = new Settings().evaluationDate();

        final DayCounter dc = new Actual360();

        final SimpleQuote           spot  = new SimpleQuote(0.0);
        final SimpleQuote           qRate = new SimpleQuote(0.0);
        final YieldTermStructure    qTS   = Utilities.flatRate(today, qRate, dc);
        final SimpleQuote           rRate = new SimpleQuote(0.0);
View Full Code Here


    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 };
View Full Code Here

      final Calendar bondCalendar = new NullCalendar();
      final DayCounter bondDayCount = new ActualActual(ActualActual.Convention.ISMA);
      final int settlementDays = 1;

    final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360()));

      // actual market values from the evaluation date

      final Frequency freq = Frequency.Semiannual;
      final Schedule sch1 = new Schedule(new Date(31, Month.October, 2004),
View Full Code Here

        final double faceAmount = 1000000.0;

      final int settlementDays = 1;

    final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360()));

      final double tolerance = 1.0e-6;

      // plain
View Full Code Here

        final double faceAmount = 1000000.0;

      final int settlementDays = 1;

    final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360()));

      final double tolerance = 1.0e-6;

      // plain
View Full Code Here

      final Settings settings = new Settings();
      settings.setEvaluationDate(today);

      final int settlementDays = 1;

    final Handle<YieldTermStructure> riskFreeRate = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.025, new Actual360()));
    final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360()));

    final IborIndex index = new USDLibor(new Period(6,TimeUnit.Months), riskFreeRate);
      final int fixingDays = 1;

      final double tolerance = 1.0e-6;
View Full Code Here

                            BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted,
                            DateGeneration.Rule.Backward, false);

          // fixed coupons
          final Leg cashflows =
              new FixedRateLeg(schedule, new Actual360())
              .withNotionals(faceAmount)
              .withCouponRates(couponRates)
              .withPaymentAdjustment(BusinessDayConvention.ModifiedFollowing).Leg();
          // redemption
          cashflows.add(new SimpleCashFlow(faceAmount, cashflows.last().date()));
View Full Code Here

                //    barrierType, barrier, rebate,         type, strike,     s,    q,    r,    t,    v,  result, tol
                //---- new NewBarrierOptionData( BarrierType.DownOut,    45.0,    0.0,  Option.Type.PUT,     50,  50.0,-0.05, 0.10, 0.25, 0.50,   4.032, 1.0e-3 ),
                //---- new NewBarrierOptionData( BarrierType.DownOut,    45.0,    0.0,  Option.Type.PUT,     50,  50.0,-0.05, 0.10, 1.00, 0.50,   5.477, 1.0e-3 )
        };

        final DayCounter dc = new Actual360();
        final Date today = Date.todaysDate();
        new Settings().setEvaluationDate(today);

        final SimpleQuote           spot  = new SimpleQuote(0.0);
        final SimpleQuote           qRate = new SimpleQuote(0.0);
View Full Code Here

        final double underlyingPrice = 100.0;
        final double rebate = 0.0;
        final double r = 0.05;
        final double q = 0.02;

        final DayCounter dc = new Actual360();
        final Date today = Date.todaysDate();
        new Settings().setEvaluationDate(today);

        final Quote                 underlying = new SimpleQuote(underlyingPrice);
        final Quote                 qH_SME     = new SimpleQuote(q);
View Full Code Here

        final double underlyingPrice = 50.0;
        final double rebate = 0.0;
        final double r = Math.log(1.1);
        final double q = 0.00;

        final DayCounter dc = new Actual360();
        final Date today = Date.todaysDate();
        new Settings().setEvaluationDate(today);

        final Quote                 underlying = new SimpleQuote(underlyingPrice);
        final Quote                 qH_SME     = new SimpleQuote(q);
View Full Code Here

TOP

Related Classes of org.jquantlib.daycounters.Actual360

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.