Package org.jquantlib.currencies.Europe

Examples of org.jquantlib.currencies.Europe.CHFCurrency


    @Ignore
    @Test
    public void testCurrencies(){
        QL.info("testing currencies...");
        //Sample Currency - CHF
        final CHFCurrency chf = new CHFCurrency();

        QL.info("testing correct initialization...");
        assertTrue(chf.name().equalsIgnoreCase("Swiss franc"));
        assertTrue(chf.code().equalsIgnoreCase("CHF"));
        assertEquals(chf.numericCode(),756);
        assertTrue(chf.symbol().equalsIgnoreCase("SwF"));
        assertTrue(chf.fractionSymbol().equalsIgnoreCase(""));
        assertEquals(chf.fractionsPerUnit(),100);
        assertEquals(chf.rounding().type(), Rounding.Type.None);
        //Note: the initialization of the triangulated currency is a little bit suspicious...
        assertTrue(chf.triangulationCurrency().getClass() == Currency.class);
        assertTrue(chf.triangulationCurrency().empty());
        QL.info("testing overloaded operators....(only class based)");
        final EURCurrency euro = new EURCurrency();
        final CHFCurrency chf2 = new CHFCurrency();
        assertFalse(euro.equals(chf));
        assertTrue(euro.notEquals(chf));
        assertFalse(chf2.notEquals(chf));
        assertTrue(chf2.equals(chf));

    }
View Full Code Here


    //Note: the initialization of the triangulated currency is a little bit suspicious...data_ not initialized!!
    @Ignore
    @Test(expected = NullPointerException.class)
    public void testLeakyCurrencyInitialization(){
        final CHFCurrency chf = new CHFCurrency();
        chf.triangulationCurrency().code();
    }
View Full Code Here

    //Note: the initialization of the triangulated currency is a little bit suspicious...data_ not initialized!!
    @Ignore
    @Test(expected = NullPointerException.class)
    public void testLeakyCurrencyInitialization(){
        final CHFCurrency chf = new CHFCurrency();
        chf.triangulationCurrency().code();
    }
View Full Code Here

  }

  public Zibor(final Period tenor,
      final Handle<YieldTermStructure> h) {
    super("Zibor", tenor, 2,
        new CHFCurrency(),
        new Switzerland(),
        BusinessDayConvention.ModifiedFollowing,
        false,
        new Actual360(),
        h);
View Full Code Here

 
    public ChfLiborSwapIsdaFix(final Period tenor, final Handle<YieldTermStructure> h) {
        super( "ChfLiborSwapIsdaFix",
                tenor,
                2, // settlement days
                new CHFCurrency(),
                new Target(),
                new Period(1,TimeUnit.Years),
                BusinessDayConvention.ModifiedFollowing,
                new Thirty360(Thirty360.Convention.BondBasis),
                tenor.gt(new Period(1,TimeUnit.Years)) ? new CHFLibor(new Period(6,TimeUnit.Months), h):
View Full Code Here

  }

  public DailyTenorCHFLibor(final int settlementDays,
      final Handle<YieldTermStructure> h) {
    super("CHFLibor", settlementDays,
        new CHFCurrency(),
        new Switzerland(),
        new Actual360(), h);
  }
View Full Code Here

  }

  public CHFLibor(final Period tenor,
      final Handle<YieldTermStructure> h) {
    super("CHFLibor", tenor, 2,
        new CHFCurrency(),
        new Switzerland(),
        new Actual360(), h);
  }
View Full Code Here

    @Test
    public void testCurrencies(){
        QL.info("testing currencies...");
        //Sample Currency - CHF
        final CHFCurrency chf = new CHFCurrency();

        QL.info("testing correct initialization...");
        assertTrue(chf.name().equalsIgnoreCase("Swiss franc"));
        assertTrue(chf.code().equalsIgnoreCase("CHF"));
        assertEquals(chf.numericCode(),756);
        assertTrue(chf.symbol().equalsIgnoreCase("SwF"));
        assertTrue(chf.fractionSymbol().equalsIgnoreCase(""));
        assertEquals(chf.fractionsPerUnit(),100);
        assertEquals(chf.rounding().type(), Rounding.Type.None);
        //Note: the initialization of the triangulated currency is a little bit suspicious...
        assertTrue(chf.triangulationCurrency().getClass() == Currency.class);
        assertTrue(chf.triangulationCurrency().empty());
        QL.info("testing overloaded operators....(only class based)");
        final EURCurrency euro = new EURCurrency();
        final CHFCurrency chf2 = new CHFCurrency();
        assertFalse(euro.eq(chf));
        assertTrue(euro.ne(chf));
        assertFalse(chf2.ne(chf));
        assertTrue(chf2.eq(chf));
       
        assertFalse(euro.eq(null));
        assertTrue(chf.eq(chf2));
        assertTrue(chf.eq(chf));
       
View Full Code Here

TOP

Related Classes of org.jquantlib.currencies.Europe.CHFCurrency

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.