feat(config): benchmark Taiwan, Korea, Singapore and the main European exchanges (#1392)

- .TW, .TWO, .KS, .KQ, .SI, .DE, .PA, .AS, .SW and .MI tickers are measured against their regional index instead of SPY
This commit is contained in:
Yijia-Xiao
2026-09-24 18:45:44 +00:00
parent 51066935b8
commit 47ac1f2d1e
3 changed files with 23 additions and 4 deletions
+10
View File
@@ -161,8 +161,18 @@ DEFAULT_CONFIG = _apply_env_overrides({
".NS": "^NSEI", # NSE India (Nifty 50)
".BO": "^BSESN", # BSE India (Sensex)
".T": "^N225", # Tokyo (Nikkei 225)
".TW": "^TWII", # Taiwan (TAIEX)
".TWO": "^TWII", # Taipei OTC (TPEx has no Yahoo index; TAIEX)
".KS": "^KS11", # Korea (KOSPI)
".KQ": "^KQ11", # Korea (KOSDAQ)
".HK": "^HSI", # Hong Kong (Hang Seng)
".SI": "^STI", # Singapore (Straits Times)
".L": "^FTSE", # London (FTSE 100)
".DE": "^GDAXI", # Germany (DAX)
".PA": "^FCHI", # Paris (CAC 40)
".AS": "^AEX", # Amsterdam (AEX)
".SW": "^SSMI", # Switzerland (SMI)
".MI": "FTSEMIB.MI", # Milan (FTSE MIB)
".TO": "^GSPTSE", # Toronto (TSX Composite)
".AX": "^AXJO", # Australia (ASX 200)
".SS": "000001.SS", # Shanghai (SSE Composite)
+3 -4
View File
@@ -16,10 +16,9 @@ def resolve_benchmark(ticker: str, config: dict) -> str:
``config["benchmark_ticker"]`` overrides everything when set; otherwise
the suffix map matches the ticker's exchange suffix (e.g. ``.T`` for
Tokyo). US-listed tickers without a dotted suffix fall through to the
empty-suffix entry (SPY by default). Unrecognised suffixes (including
US tickers with dots like ``BRK.B``) also fall back to the empty-suffix
entry, which is the right default because the alpha calculation works
in USD.
empty-suffix entry (SPY by default). Unrecognised suffixes, including
US tickers with dots like ``BRK.B``, also take the empty-suffix entry.
Returns are compared as percentages, each in its own currency.
"""
explicit = config.get("benchmark_ticker")