Examples of Brazil


Examples of org.jquantlib.time.calendars.Brazil

      for (int bondIndex = 0; bondIndex < maturityDates.length; bondIndex++) {

          // plain
          final InterestRate yield = new InterestRate(yields[bondIndex],
                             new Business252(new Brazil()),
                             Compounding.Compounded, Frequency.Annual);

          final Schedule schedule = new Schedule(new Date(1,Month.January,2007),
                            maturityDates[bondIndex], new Period(Frequency.Semiannual),
                            new Brazil(Brazil.Market.SETTLEMENT),
                            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()));

          final Bond bond = new Bond(settlementDays, new Brazil(Brazil.Market.SETTLEMENT),
                    faceAmount, cashflows.last().date(),
                    new Date(1,Month.January,2007), cashflows);

          final double cachedPrice = prices[bondIndex];
View Full Code Here

Examples of org.jquantlib.time.calendars.Brazil

                -0.1507936507937,
                0.1507936507937,
                0.2023809523810
        };

        final DayCounter dayCounter = new Business252(new Brazil(Brazil.Market.SETTLEMENT));

        for (int i=1; i<testDates.length-1; i++) {
            final Date start = testDates[i-1];
            final Date end = testDates[i];
            /*@Time*/ final double  calculated = dayCounter.yearFraction(start, end);
View Full Code Here

Examples of org.jquantlib.time.calendars.Brazil

@QualityAssurance(quality=Quality.Q4_UNIT, version=Version.V097, reviewers="Richard Gomes")
public class Business252 extends DayCounter {


    public Business252() {
        this(new Brazil());
    }
View Full Code Here

Examples of org.jquantlib.time.calendars.Brazil

                -0.1507936507937,
                0.1507936507937,
                0.2023809523810
        };

        final DayCounter dayCounter = new Business252(new Brazil(Brazil.Market.SETTLEMENT));

        for (int i=1; i<testDates.length-1; i++) {
            final Date start = testDates[i-1];
            final Date end = testDates[i];
            /*@Time*/ final double  calculated = dayCounter.yearFraction(start, end);
View Full Code Here

Examples of org.jquantlib.time.calendars.Brazil

   
    @Test
    public void testEqualityHashCode() {

        QL.info("Testing Equality and HashCode ...");
        final DayCounter business252Brazil = new Business252(new Brazil(Brazil.Market.SETTLEMENT));
        final DayCounter business252Brazil1 = new Business252(new Brazil(Brazil.Market.SETTLEMENT));

       
        final DayCounter business252China = new Business252(new China(China.Market.SSE));
        final DayCounter simpleDayCounter = new SimpleDayCounter();     
        final DayCounter actual360 = new Actual360();       
View Full Code Here

Examples of org.jquantlib.time.calendars.Brazil

      for (int bondIndex = 0; bondIndex < maturityDates.length; bondIndex++) {

          // plain
          final InterestRate yield = new InterestRate(yields[bondIndex],
                             new Business252(new Brazil()),
                             Compounding.Compounded, Frequency.Annual);

          final Schedule schedule = new Schedule(new Date(1,Month.January,2007),
                            maturityDates[bondIndex], new Period(Frequency.Semiannual),
                            new Brazil(Brazil.Market.SETTLEMENT),
                            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()));

          final Bond bond = new Bond(settlementDays, new Brazil(Brazil.Market.SETTLEMENT),
                    faceAmount, cashflows.last().date(),
                    new Date(1,Month.January,2007), cashflows);

          final double cachedPrice = prices[bondIndex];
View Full Code Here

Examples of org.jquantlib.time.calendars.Brazil

  private final Calendar exchange;
  private final Calendar settlement;

  public BrazilCalendarTest() {
    QL.info("::::: "+this.getClass().getSimpleName()+" :::::");
      exchange = new Brazil(Brazil.Market.BOVESPA);
      settlement = new Brazil(Brazil.Market.SETTLEMENT);
  }
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.