コード例 #1
0
 public int compareKey(PointSensitivity other)
 {
     if (other is OvernightRateSensitivity)
     {
         OvernightRateSensitivity otherOn = (OvernightRateSensitivity)other;
         return(ComparisonChain.start().compare(Index.ToString(), otherOn.Index.ToString()).compare(currency, otherOn.currency).compare(observation.FixingDate, otherOn.observation.FixingDate).compare(endDate, otherOn.endDate).result());
     }
     return(this.GetType().Name.CompareTo(other.GetType().Name));
 }
コード例 #2
0
        public virtual void test_brlCdi()
        {
            OvernightIndex test = OvernightIndex.of("BRL-CDI");

            assertEquals(test.Name, "BRL-CDI");
            assertEquals(test.Currency, BRL);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, BRBD);
            assertEquals(test.PublicationDateOffset, 1);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, DayCount.ofBus252(BRBD));
            assertEquals(test.ToString(), "BRL-CDI");
        }
コード例 #3
0
        public virtual void test_usdSofr()
        {
            OvernightIndex test = OvernightIndex.of("USD-SOFR");

            assertEquals(test.Name, "USD-SOFR");
            assertEquals(test.Currency, USD);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, USGS);
            assertEquals(test.PublicationDateOffset, 1);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_360);
            assertEquals(test.ToString(), "USD-SOFR");
        }
コード例 #4
0
        //-------------------------------------------------------------------------
        public virtual void test_usdFedFund3m()
        {
            OvernightIndex test = OvernightIndex.of("USD-FED-FUND");

            assertEquals(test.Currency, USD);
            assertEquals(test.Name, "USD-FED-FUND");
            assertEquals(test.FixingCalendar, USNY);
            assertEquals(test.PublicationDateOffset, 1);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_360);
            assertEquals(test.DefaultFixedLegDayCount, ACT_360);
            assertEquals(test.ToString(), "USD-FED-FUND");
        }
コード例 #5
0
        public virtual void test_zarSabor()
        {
            OvernightIndex test = OvernightIndex.of("ZAR-SABOR");

            assertEquals(test.Name, "ZAR-SABOR");
            assertEquals(test.Currency, ZAR);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, ZAJO);
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_365F);
            assertEquals(test.DefaultFixedLegDayCount, ACT_365F);
            assertEquals(test.ToString(), "ZAR-SABOR");
        }
コード例 #6
0
        public virtual void test_sekOis()
        {
            OvernightIndex test = OvernightIndex.of("SEK-SIOR");

            assertEquals(test.Name, "SEK-SIOR");
            assertEquals(test.Currency, SEK);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, SEST);
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 1);
            assertEquals(test.DayCount, ACT_360);
            assertEquals(test.DefaultFixedLegDayCount, ACT_360);
            assertEquals(test.ToString(), "SEK-SIOR");
        }
コード例 #7
0
        public virtual void test_plnOis()
        {
            OvernightIndex test = OvernightIndex.of("PLN-POLONIA");

            assertEquals(test.Name, "PLN-POLONIA");
            assertEquals(test.Currency, PLN);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, PLWA);
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_365F);
            assertEquals(test.DefaultFixedLegDayCount, ACT_365F);
            assertEquals(test.ToString(), "PLN-POLONIA");
        }
コード例 #8
0
        public virtual void test_nzdOis()
        {
            OvernightIndex test = OvernightIndex.of("NZD-NZIONA");

            assertEquals(test.Name, "NZD-NZIONA");
            assertEquals(test.Currency, NZD);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, HolidayCalendarId.of("NZBD"));
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_365F);
            assertEquals(test.DefaultFixedLegDayCount, ACT_365F);
            assertEquals(test.ToString(), "NZD-NZIONA");
        }
コード例 #9
0
        public virtual void test_inrOis()
        {
            OvernightIndex test = OvernightIndex.of("INR-OMIBOR");

            assertEquals(test.Name, "INR-OMIBOR");
            assertEquals(test.Currency, INR);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, HolidayCalendarId.of("INMU"));
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_365F);
            assertEquals(test.DefaultFixedLegDayCount, ACT_365F);
            assertEquals(test.ToString(), "INR-OMIBOR");
        }
コード例 #10
0
        //-------------------------------------------------------------------------
        public virtual void test_audAonia()
        {
            OvernightIndex test = OvernightIndex.of("AUD-AONIA");

            assertEquals(test.Name, "AUD-AONIA");
            assertEquals(test.Currency, AUD);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, AUSY);
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_365F);
            assertEquals(test.DefaultFixedLegDayCount, ACT_365F);
            assertEquals(test.ToString(), "AUD-AONIA");
        }
コード例 #11
0
        public virtual void test_gbpSonia()
        {
            OvernightIndex test = OvernightIndex.of("GBP-SONIA");

            assertEquals(test.Name, "GBP-SONIA");
            assertEquals(test.Currency, GBP);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, GBLO);
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_365F);
            assertEquals(test.DefaultFixedLegDayCount, ACT_365F);
            assertEquals(test.FloatingRateName, FloatingRateName.of("GBP-SONIA"));
            assertEquals(test.ToString(), "GBP-SONIA");
        }
コード例 #12
0
        public virtual void test_sgdSonar()
        {
            HolidayCalendarId SGSI = HolidayCalendarId.of("SGSI");
            OvernightIndex    test = OvernightIndex.of("SGD-SONAR");

            assertEquals(test.Name, "SGD-SONAR");
            assertEquals(test.Currency, SGD);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, SGSI);
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_365F);
            assertEquals(test.DefaultFixedLegDayCount, ACT_365F);
            assertEquals(test.ToString(), "SGD-SONAR");
        }
コード例 #13
0
        public virtual void test_chfSaron()
        {
            OvernightIndex test = OvernightIndex.of("CHF-SARON");

            assertEquals(test.Name, "CHF-SARON");
            assertEquals(test.Currency, CHF);
            assertEquals(test.Active, true);
            assertEquals(test.FixingCalendar, CHZU);
            assertEquals(test.PublicationDateOffset, 0);
            assertEquals(test.EffectiveDateOffset, 0);
            assertEquals(test.DayCount, ACT_360);
            assertEquals(test.DefaultFixedLegDayCount, ACT_360);
            assertEquals(test.FloatingRateName, FloatingRateName.of("CHF-SARON"));
            assertEquals(test.ToString(), "CHF-SARON");
        }
コード例 #14
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_toString(OvernightIndex convention, String name)
        public virtual void test_toString(OvernightIndex convention, string name)
        {
            assertEquals(convention.ToString(), name);
        }