Skip to content

Commit

Permalink
Add MYR-KLIBOR to floating rate and index data (#2441)
Browse files Browse the repository at this point in the history
* Add MYR-KLIBOR to floating rate and index data

* add some tests

* changed fixing day to 0

* fix tests after fixing days change

Co-authored-by: Alexis Skitini <skitini@users.noreply.github.com>
  • Loading branch information
skitini and skitini committed Apr 14, 2022
1 parent f5a3c55 commit 51ad570
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ MXN-TIIE-Banxico = MXN-TIIE
MXN-TIIE-Banxico-Bloomberg = MXN-TIIE
MXN-TIIE-Banxico-Reference Banks = MXN-TIIE

# "MYR-KLIBOR" is the ISDA 2021 code
MYR-KLIBOR = MYR-KLIBOR
MYR-KLIBOR-BNM = MYR-KLIBOR
MYR-KLIBOR-Reference Banks = MYR-KLIBOR
MYR-Quarterly Swap Rate-11:00-TRADITION = MYR-KLIBOR
MYR-Quarterly Swap Rate-TRADITION-Reference Banks = MYR-KLIBOR

# "NOK-NIBOR" is the ISDA 2021 code
NOK-NIBOR = NOK-NIBOR
NOK-NIBOR-NIBR = NOK-NIBOR
Expand Down Expand Up @@ -538,6 +545,7 @@ HKD = HKD-HIBOR
HUF = HUF-BUBOR
KRW = KRW-CD
MXN = MXN-TIIE
MYR = MYR-KLIBOR
NOK = NOK-NIBOR
NZD = NZD-BKBM
PLN = PLN-WIBOR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ MXN-TIIE-4W,MXN,TRUE,Act/360,MXMC,1,MXMC,MXMC,4W,Following,14:00,America/Mexico_
MXN-TIIE-13W,MXN,TRUE,Act/360,MXMC,1,MXMC,MXMC,13W,Following,14:00,America/Mexico_City,Act/360
MXN-TIIE-26W,MXN,TRUE,Act/360,MXMC,1,MXMC,MXMC,26W,Following,14:00,America/Mexico_City,Act/360
,,,,,,,,,,,,
MYR-KLIBOR-1M,MYR,TRUE,Act/365F,MYKL,0,MYKL,MYKL,1M,ModifiedFollowing,11:00,Asia/Kuala_Lumpur,Act/365F
MYR-KLIBOR-3M,MYR,TRUE,Act/365F,MYKL,0,MYKL,MYKL,3M,ModifiedFollowing,11:00,Asia/Kuala_Lumpur,Act/365F
MYR-KLIBOR-6M,MYR,TRUE,Act/365F,MYKL,0,MYKL,MYKL,6M,ModifiedFollowing,11:00,Asia/Kuala_Lumpur,Act/365F
,,,,,,,,,,,,
NOK-NIBOR-1W,NOK,TRUE,Act/360,NOOS,2,NOOS,NOOS,1W,Following,12:00,Europe/Oslo,30U/360
NOK-NIBOR-2W,NOK,FALSE,Act/360,NOOS,2,NOOS,NOOS,2W,Following,12:00,Europe/Oslo,30U/360
NOK-NIBOR-1M,NOK,TRUE,Act/360,NOOS,2,NOOS,NOOS,1M,ModifiedFollowing,12:00,Europe/Oslo,30U/360
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public static Object[][] data_name_type() {
{"HUF-BUBOR-Reuters", "HUF-BUBOR", FloatingRateType.IBOR},
{"KRW-CD-KSDA-Bloomberg", "KRW-CD", FloatingRateType.IBOR},
{"MXN-TIIE-Banxico", "MXN-TIIE", FloatingRateType.IBOR},
{"MYR-KLIBOR-BNM", "MYR-KLIBOR", FloatingRateType.IBOR},
{"NOK-NIBOR-OIBOR", "NOK-NIBOR", FloatingRateType.IBOR},
{"NZD-BBR-FRA", "NZD-BKBM", FloatingRateType.IBOR},
{"PLN-WIBOR-WIBO", "PLN-WIBOR", FloatingRateType.IBOR},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import static com.opengamma.strata.basics.currency.Currency.JPY;
import static com.opengamma.strata.basics.currency.Currency.KRW;
import static com.opengamma.strata.basics.currency.Currency.MXN;
import static com.opengamma.strata.basics.currency.Currency.MYR;
import static com.opengamma.strata.basics.currency.Currency.NZD;
import static com.opengamma.strata.basics.currency.Currency.PLN;
import static com.opengamma.strata.basics.currency.Currency.SEK;
Expand Down Expand Up @@ -582,6 +583,26 @@ public void test_mxn_tiie() {
assertThat(test.toString()).isEqualTo("MXN-TIIE-4W");
}

@Test
public void test_myr_klibor() {
HolidayCalendarId cal = HolidayCalendarId.of("MYKL");
IborIndex test = IborIndex.of("MYR-KLIBOR-3M");
assertThat(test.getCurrency()).isEqualTo(MYR);
assertThat(test.getName()).isEqualTo("MYR-KLIBOR-3M");
assertThat(test.getTenor()).isEqualTo(TENOR_3M);
assertThat(test.getFixingCalendar()).isEqualTo(cal);
assertThat(test.getFixingDateOffset())
.isEqualTo(DaysAdjustment.ofCalendarDays(0, BusinessDayAdjustment.of(PRECEDING, cal)));
assertThat(test.getEffectiveDateOffset())
.isEqualTo(DaysAdjustment.ofCalendarDays(0, BusinessDayAdjustment.of(FOLLOWING, cal)));
assertThat(test.getMaturityDateOffset())
.isEqualTo(TenorAdjustment.of(
TENOR_3M, PeriodAdditionConventions.NONE, BusinessDayAdjustment.of(MODIFIED_FOLLOWING, cal)));
assertThat(test.getDayCount()).isEqualTo(ACT_365F);
assertThat(test.getDefaultFixedLegDayCount()).isEqualTo(ACT_365F);
assertThat(test.toString()).isEqualTo("MYR-KLIBOR-3M");
}

@Test
public void test_nzd_bkbm() {
IborIndex test = IborIndex.of("NZD-BKBM-3M");
Expand Down

0 comments on commit 51ad570

Please sign in to comment.