From a92094e1f3e21382a2cfdd4758fdccf393b1dddd Mon Sep 17 00:00:00 2001 From: OpenSquared Date: Mon, 22 Jun 2026 20:09:01 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20add=20ETFs=20tab=20to=20Markets=20page?= =?UTF-8?q?=20(SPY,=20QQQ,=20TLT,=20GLD,=20EEM,=20IWM,=20HYG=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New 'etfs' asset class in WATCHLIST: 18 key ETFs used in Pattern Lab presets (SPY, QQQ, IWM, TLT, IEF, HYG, GLD, EEM, FXI, EWG, EWJ, EWU, EWZ, XLF, SMH, KWEB, UUP, BIL) - Added 'etfs' tab between Indices and Equities in Markets page - Extended AssetClass union type to include 'etfs' Co-Authored-By: Claude Sonnet 4.6 --- backend/services/data_fetcher.py | 22 +++++++++++++++++++++- frontend/src/pages/Markets.tsx | 1 + frontend/src/types/index.ts | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/backend/services/data_fetcher.py b/backend/services/data_fetcher.py index 0ae488c..96f183a 100644 --- a/backend/services/data_fetcher.py +++ b/backend/services/data_fetcher.py @@ -55,12 +55,32 @@ WATCHLIST: Dict[str, List[Dict[str, str]]] = { {"symbol": "^N225", "name": "Nikkei 225", "currency": "JPY"}, {"symbol": "^VIX", "name": "VIX Volatility", "currency": "USD"}, ], + "etfs": [ + {"symbol": "SPY", "name": "S&P 500 ETF (SPY)", "currency": "USD"}, + {"symbol": "QQQ", "name": "NASDAQ 100 ETF (QQQ)", "currency": "USD"}, + {"symbol": "IWM", "name": "Russell 2000 ETF (IWM)", "currency": "USD"}, + {"symbol": "TLT", "name": "20Y Treasury ETF (TLT)", "currency": "USD"}, + {"symbol": "IEF", "name": "7-10Y Treasury ETF (IEF)","currency": "USD"}, + {"symbol": "HYG", "name": "High Yield Bond (HYG)", "currency": "USD"}, + {"symbol": "GLD", "name": "Gold ETF (GLD)", "currency": "USD"}, + {"symbol": "EEM", "name": "EM ETF (EEM)", "currency": "USD"}, + {"symbol": "FXI", "name": "China Large Cap (FXI)", "currency": "USD"}, + {"symbol": "EWG", "name": "Germany ETF (EWG)", "currency": "USD"}, + {"symbol": "EWJ", "name": "Japan ETF (EWJ)", "currency": "USD"}, + {"symbol": "EWU", "name": "UK ETF (EWU)", "currency": "USD"}, + {"symbol": "EWZ", "name": "Brazil ETF (EWZ)", "currency": "USD"}, + {"symbol": "XLF", "name": "Financials ETF (XLF)", "currency": "USD"}, + {"symbol": "SMH", "name": "Semiconductors (SMH)", "currency": "USD"}, + {"symbol": "KWEB", "name": "China Internet (KWEB)", "currency": "USD"}, + {"symbol": "UUP", "name": "US Dollar ETF (UUP)", "currency": "USD"}, + {"symbol": "BIL", "name": "T-Bill 1-3M (BIL)", "currency": "USD"}, + ], "equities": [ {"symbol": "XOM", "name": "Exxon Mobil", "currency": "USD"}, {"symbol": "CVX", "name": "Chevron", "currency": "USD"}, {"symbol": "LMT", "name": "Lockheed Martin", "currency": "USD"}, {"symbol": "RTX", "name": "Raytheon", "currency": "USD"}, - {"symbol": "BA", "name": "Boeing", "currency": "USD"}, + {"symbol": "BA", "name": "Boeing", "currency": "USD"}, ], "forex": [ {"symbol": "EURUSD=X", "name": "EUR/USD", "currency": "USD"}, diff --git a/frontend/src/pages/Markets.tsx b/frontend/src/pages/Markets.tsx index 23784de..fa995ab 100644 --- a/frontend/src/pages/Markets.tsx +++ b/frontend/src/pages/Markets.tsx @@ -12,6 +12,7 @@ const ASSET_CLASSES: { key: AssetClass; label: string; emoji: string }[] = [ { key: 'metals', label: 'Metals', emoji: '🥇' }, { key: 'agriculture', label: 'Agriculture', emoji: '🌾' }, { key: 'indices', label: 'Indices', emoji: '📊' }, + { key: 'etfs', label: 'ETFs', emoji: '🗂' }, { key: 'equities', label: 'Equities', emoji: '📈' }, { key: 'forex', label: 'Forex', emoji: '💱' }, ] diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 5c52e1d..272dba8 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -1,4 +1,4 @@ -export type AssetClass = 'energy' | 'metals' | 'agriculture' | 'equities' | 'indices' | 'forex' | 'crypto' | 'rates' +export type AssetClass = 'energy' | 'metals' | 'agriculture' | 'equities' | 'indices' | 'forex' | 'crypto' | 'rates' | 'etfs' export type RiskLevel = 'low' | 'medium' | 'high' | 'extreme' export type GeoCategory = | 'military' | 'sanctions' | 'elections' | 'natural_disaster'