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)); }
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"); }
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"); }
//------------------------------------------------------------------------- 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"); }
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"); }
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"); }
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"); }
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"); }
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"); }
//------------------------------------------------------------------------- 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"); }
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"); }
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"); }
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"); }
//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); }