diff --git a/financepy/utils/bond_market.py b/financepy/utils/bond_market.py index 6f750242..78a3ccb5 100644 --- a/financepy/utils/bond_market.py +++ b/financepy/utils/bond_market.py @@ -76,7 +76,7 @@ def get_bond_market_conventions(country): if country == BondMarkets.AUSTRIA: return (act_act, annual, 2, 0, None) if country == BondMarkets.AUSTRALIA: - return (act_act, annual, 2, 7, CalendarTypes.NONE) + return (act_act, semi_annual, 2, 7, CalendarTypes.NONE) if country == BondMarkets.BELGIUM: return (act_act, annual, 2, 0, None) if country == BondMarkets.CYPRUS: @@ -106,7 +106,7 @@ def get_bond_market_conventions(country): if country == BondMarkets.NETHERLANDS: return (act_act, annual, 2, 0, None) if country == BondMarkets.NEW_ZEALAND: - return (act_act, annual, 2, 0, None) + return (act_act, semi_annual, 2, 0, None) if country == BondMarkets.NORWAY: return (thirty360, annual, 2, 2, None) if country == BondMarkets.PORTUGAL: @@ -140,7 +140,7 @@ def get_bond_market_conventions(country): if country == BondMarkets.SWEDEN: return (thirtye360, annual, 2, 0, None) if country == BondMarkets.JAPAN: - return (act_act, annual, 2, 0, None) + return (act_act, semi_annual, 2, 0, None) if country == BondMarkets.SWITZERLAND: return (act_act, annual, 2, 0, None) if country == BondMarkets.UNITED_STATES: diff --git a/tests/unit/test_bond.py b/tests/unit/test_bond.py index 6cebc344..db3b2f4d 100644 --- a/tests/unit/test_bond.py +++ b/tests/unit/test_bond.py @@ -528,3 +528,13 @@ def test_bond_us_treasury_final_period_uses_simple_interest(): settle_dt, treasury - bond.accrued_interest(settle_dt, 100.0), YTMCalcType.US_TREASURY ) assert abs(ytm_back - ytm) < 1e-9 + + +######################################################################################## + + +def test_bond_market_semi_annual_coupons(): + + for country in (BondMarkets.AUSTRALIA, BondMarkets.JAPAN, BondMarkets.NEW_ZEALAND): + freq_type = get_bond_market_conventions(country)[1] + assert freq_type == FrequencyTypes.SEMI_ANNUAL