Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 119 additions & 49 deletions shared/stocks.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,130 @@
{
"symbols": [
{ "symbol": "^GSPC", "name": "S&P 500", "display": "SPX" },
{ "symbol": "^DJI", "name": "Dow Jones", "display": "DOW" },
{ "symbol": "^IXIC", "name": "NASDAQ", "display": "NDX" },
{ "symbol": "AAPL", "name": "Apple", "display": "AAPL" },
{ "symbol": "MSFT", "name": "Microsoft", "display": "MSFT" },
{ "symbol": "NVDA", "name": "NVIDIA", "display": "NVDA" },
{ "symbol": "GOOGL", "name": "Alphabet", "display": "GOOGL" },
{ "symbol": "AMZN", "name": "Amazon", "display": "AMZN" },
{ "symbol": "META", "name": "Meta", "display": "META" },
{ "symbol": "BRK-B", "name": "Berkshire", "display": "BRK.B" },
{ "symbol": "TSM", "name": "TSMC", "display": "TSM" },
{ "symbol": "LLY", "name": "Eli Lilly", "display": "LLY" },
{ "symbol": "TSLA", "name": "Tesla", "display": "TSLA" },
{ "symbol": "AVGO", "name": "Broadcom", "display": "AVGO" },
{ "symbol": "WMT", "name": "Walmart", "display": "WMT" },
{ "symbol": "JPM", "name": "JPMorgan", "display": "JPM" },
{ "symbol": "V", "name": "Visa", "display": "V" },
{ "symbol": "UNH", "name": "UnitedHealth", "display": "UNH" },
{ "symbol": "NVO", "name": "Novo Nordisk", "display": "NVO" },
{ "symbol": "XOM", "name": "Exxon", "display": "XOM" },
{ "symbol": "MA", "name": "Mastercard", "display": "MA" },
{ "symbol": "ORCL", "name": "Oracle", "display": "ORCL" },
{ "symbol": "PG", "name": "P&G", "display": "PG" },
{ "symbol": "COST", "name": "Costco", "display": "COST" },
{ "symbol": "JNJ", "name": "J&J", "display": "JNJ" },
{ "symbol": "HD", "name": "Home Depot", "display": "HD" },
{ "symbol": "NFLX", "name": "Netflix", "display": "NFLX" },
{ "symbol": "BAC", "name": "BofA", "display": "BAC" },
{ "symbol": "^NSEI", "name": "Nifty 50", "display": "NIFTY" },
{ "symbol": "^BSESN", "name": "BSE Sensex", "display": "SENSEX" },
{ "symbol": "RELIANCE.NS", "name": "Reliance Industries", "display": "RELIANCE" },
{ "symbol": "TCS.NS", "name": "TCS", "display": "TCS" },
{ "symbol": "HDFCBANK.NS", "name": "HDFC Bank", "display": "HDFCBANK" },
{ "symbol": "ICICIBANK.NS", "name": "ICICI Bank", "display": "ICICIBANK" },
{ "symbol": "BHARTIARTL.NS", "name": "Bharti Airtel", "display": "AIRTEL" },
{ "symbol": "INFY.NS", "name": "Infosys", "display": "INFY" },
{ "symbol": "SBIN.NS", "name": "State Bank of India", "display": "SBIN" },
{ "symbol": "LICI.NS", "name": "LIC", "display": "LICI" },
{ "symbol": "ITC.NS", "name": "ITC", "display": "ITC" },
{ "symbol": "HINDUNILVR.NS", "name": "Hindustan Unilever", "display": "HUL" },
{ "symbol": "LT.NS", "name": "L&T", "display": "LT" },
{ "symbol": "BAJFINANCE.NS", "name": "Bajaj Finance", "display": "BAJFIN" },
{ "symbol": "ADANIENT.NS", "name": "Adani Enterprises", "display": "ADANI" },
{ "symbol": "SUNPHARMA.NS", "name": "Sun Pharma", "display": "SUN" },
{ "symbol": "TITAN.NS", "name": "Titan Company", "display": "TITAN" },
{ "symbol": "M&M.NS", "name": "Mahindra & Mahindra", "display": "M&M" },
{ "symbol": "TATASTEEL.NS", "name": "Tata Steel", "display": "STEEL" },
{ "symbol": "KOTAKBANK.NS", "name": "Kotak Mahindra", "display": "KOTAK" }
{ "symbol": "^GSPC", "name": "S&P 500", "display": "SPX", "region": "us" },
{ "symbol": "^DJI", "name": "Dow Jones", "display": "DOW", "region": "us" },
{ "symbol": "^IXIC", "name": "NASDAQ", "display": "NDX", "region": "us" },
{ "symbol": "AAPL", "name": "Apple", "display": "AAPL", "region": "us" },
{ "symbol": "MSFT", "name": "Microsoft", "display": "MSFT", "region": "us" },
{ "symbol": "NVDA", "name": "NVIDIA", "display": "NVDA", "region": "us" },
{ "symbol": "GOOGL", "name": "Alphabet", "display": "GOOGL", "region": "us" },
{ "symbol": "AMZN", "name": "Amazon", "display": "AMZN", "region": "us" },
{ "symbol": "META", "name": "Meta", "display": "META", "region": "us" },
{ "symbol": "BRK-B", "name": "Berkshire", "display": "BRK.B", "region": "us" },
{ "symbol": "TSM", "name": "TSMC", "display": "TSM", "region": "us" },
{ "symbol": "LLY", "name": "Eli Lilly", "display": "LLY", "region": "us" },
{ "symbol": "TSLA", "name": "Tesla", "display": "TSLA", "region": "us" },
{ "symbol": "AVGO", "name": "Broadcom", "display": "AVGO", "region": "us" },
{ "symbol": "WMT", "name": "Walmart", "display": "WMT", "region": "us" },
{ "symbol": "JPM", "name": "JPMorgan", "display": "JPM", "region": "us" },
{ "symbol": "V", "name": "Visa", "display": "V", "region": "us" },
{ "symbol": "UNH", "name": "UnitedHealth", "display": "UNH", "region": "us" },
{ "symbol": "NVO", "name": "Novo Nordisk", "display": "NVO", "region": "us" },
{ "symbol": "XOM", "name": "Exxon", "display": "XOM", "region": "us" },
{ "symbol": "MA", "name": "Mastercard", "display": "MA", "region": "us" },
{ "symbol": "ORCL", "name": "Oracle", "display": "ORCL", "region": "us" },
{ "symbol": "PG", "name": "P&G", "display": "PG", "region": "us" },
{ "symbol": "COST", "name": "Costco", "display": "COST", "region": "us" },
{ "symbol": "JNJ", "name": "J&J", "display": "JNJ", "region": "us" },
{ "symbol": "HD", "name": "Home Depot", "display": "HD", "region": "us" },
{ "symbol": "NFLX", "name": "Netflix", "display": "NFLX", "region": "us" },
{ "symbol": "BAC", "name": "BofA", "display": "BAC", "region": "us" },

{ "symbol": "^FTSE", "name": "FTSE 100", "display": "FTSE", "region": "europe" },
{ "symbol": "^GDAXI", "name": "DAX", "display": "DAX", "region": "europe" },
{ "symbol": "^FCHI", "name": "CAC 40", "display": "CAC", "region": "europe" },
{ "symbol": "^SSMI", "name": "Swiss Market", "display": "SMI", "region": "europe" },
{ "symbol": "^AEX", "name": "AEX Amsterdam", "display": "AEX", "region": "europe" },
{ "symbol": "^IBEX", "name": "IBEX 35", "display": "IBEX", "region": "europe" },
{ "symbol": "FTSEMIB.MI", "name": "FTSE MIB", "display": "MIB", "region": "europe" },
{ "symbol": "ASML", "name": "ASML", "display": "ASML", "region": "europe" },
{ "symbol": "SAP", "name": "SAP", "display": "SAP", "region": "europe" },
{ "symbol": "NESN.SW", "name": "Nestle", "display": "NESN", "region": "europe" },
{ "symbol": "AZN", "name": "AstraZeneca", "display": "AZN", "region": "europe" },
{ "symbol": "SHEL", "name": "Shell", "display": "SHEL", "region": "europe" },

{ "symbol": "^N225", "name": "Nikkei 225", "display": "N225", "region": "asia" },
{ "symbol": "^HSI", "name": "Hang Seng", "display": "HSI", "region": "asia" },
{ "symbol": "000001.SS", "name": "SSE Composite", "display": "SSE", "region": "asia" },
{ "symbol": "^KS11", "name": "KOSPI", "display": "KOSPI", "region": "asia" },
{ "symbol": "^TWII", "name": "TAIEX", "display": "TAIEX", "region": "asia" },
{ "symbol": "^AXJO", "name": "ASX 200", "display": "ASX", "region": "asia" },
{ "symbol": "^STI", "name": "Straits Times", "display": "STI", "region": "asia" },
{ "symbol": "^JKSE", "name": "Jakarta Composite", "display": "JKSE", "region": "asia" },
{ "symbol": "9984.T", "name": "SoftBank", "display": "SFTBY", "region": "asia" },
{ "symbol": "7203.T", "name": "Toyota", "display": "TM", "region": "asia" },
{ "symbol": "005930.KS", "name": "Samsung", "display": "SMSN", "region": "asia" },
{ "symbol": "9988.HK", "name": "Alibaba", "display": "BABA", "region": "asia" },
{ "symbol": "0700.HK", "name": "Tencent", "display": "TCEHY", "region": "asia" },

{ "symbol": "^NSEI", "name": "Nifty 50", "display": "NIFTY", "region": "india" },
{ "symbol": "^BSESN", "name": "BSE Sensex", "display": "SENSEX", "region": "india" },
{ "symbol": "RELIANCE.NS", "name": "Reliance Industries", "display": "RELIANCE", "region": "india" },
{ "symbol": "TCS.NS", "name": "TCS", "display": "TCS", "region": "india" },
{ "symbol": "HDFCBANK.NS", "name": "HDFC Bank", "display": "HDFCBANK", "region": "india" },
{ "symbol": "ICICIBANK.NS", "name": "ICICI Bank", "display": "ICICIBANK", "region": "india" },
{ "symbol": "BHARTIARTL.NS", "name": "Bharti Airtel", "display": "AIRTEL", "region": "india" },
{ "symbol": "INFY.NS", "name": "Infosys", "display": "INFY", "region": "india" },
{ "symbol": "SBIN.NS", "name": "State Bank of India", "display": "SBIN", "region": "india" },
{ "symbol": "LICI.NS", "name": "LIC", "display": "LICI", "region": "india" },
{ "symbol": "ITC.NS", "name": "ITC", "display": "ITC", "region": "india" },
{ "symbol": "HINDUNILVR.NS", "name": "Hindustan Unilever", "display": "HUL", "region": "india" },
{ "symbol": "LT.NS", "name": "L&T", "display": "LT", "region": "india" },
{ "symbol": "BAJFINANCE.NS", "name": "Bajaj Finance", "display": "BAJFIN", "region": "india" },
{ "symbol": "ADANIENT.NS", "name": "Adani Enterprises", "display": "ADANI", "region": "india" },
{ "symbol": "SUNPHARMA.NS", "name": "Sun Pharma", "display": "SUN", "region": "india" },
{ "symbol": "TITAN.NS", "name": "Titan Company", "display": "TITAN", "region": "india" },
{ "symbol": "M&M.NS", "name": "Mahindra & Mahindra", "display": "M&M", "region": "india" },
{ "symbol": "TATASTEEL.NS", "name": "Tata Steel", "display": "STEEL", "region": "india" },
{ "symbol": "KOTAKBANK.NS", "name": "Kotak Mahindra", "display": "KOTAK", "region": "india" },

{ "symbol": "^TASI.SR", "name": "Tadawul All Share", "display": "TASI", "region": "gcc" },
{ "symbol": "DFMGI.AE", "name": "Dubai Financial Market", "display": "DFM", "region": "gcc" },
{ "symbol": "QAT", "name": "Qatar (iShares)", "display": "QAT", "region": "gcc" },
{ "symbol": "UAE", "name": "Abu Dhabi (iShares)", "display": "UAE", "region": "gcc" },
{ "symbol": "2222.SR", "name": "Saudi Aramco", "display": "ARAMCO", "region": "gcc" },
{ "symbol": "2010.SR", "name": "SABIC", "display": "SABIC", "region": "gcc" },

{ "symbol": "^BVSP", "name": "Bovespa", "display": "BVSP", "region": "americas" },
{ "symbol": "^GSPTSE", "name": "TSX Composite", "display": "TSX", "region": "americas" },
{ "symbol": "^MXX", "name": "IPC Mexico", "display": "IPC", "region": "americas" },
{ "symbol": "^MERV", "name": "MERVAL", "display": "MERV", "region": "americas" },
{ "symbol": "SHOP.TO", "name": "Shopify", "display": "SHOP", "region": "americas" },
{ "symbol": "NU", "name": "Nu Holdings", "display": "NU", "region": "americas" }
],
"yahooOnly": [
"^GSPC", "^DJI", "^IXIC",
"^FTSE", "^GDAXI", "^FCHI", "^SSMI", "^AEX", "^IBEX", "FTSEMIB.MI",
"^N225", "^HSI", "000001.SS", "^KS11", "^TWII", "^AXJO", "^STI", "^JKSE",
"9984.T", "7203.T", "005930.KS", "9988.HK", "0700.HK",
"^NSEI", "^BSESN",
"RELIANCE.NS", "TCS.NS", "HDFCBANK.NS", "ICICIBANK.NS", "BHARTIARTL.NS",
"INFY.NS", "SBIN.NS", "LICI.NS", "ITC.NS", "HINDUNILVR.NS",
"LT.NS", "BAJFINANCE.NS", "ADANIENT.NS", "SUNPHARMA.NS", "TITAN.NS",
"M&M.NS", "TATASTEEL.NS", "KOTAKBANK.NS"
"M&M.NS", "TATASTEEL.NS", "KOTAKBANK.NS",
"^TASI.SR", "DFMGI.AE", "2222.SR", "2010.SR",
"^BVSP", "^GSPTSE", "^MXX", "^MERV", "SHOP.TO",
"NESN.SW"
],
"regions": {
"us": "US Markets",
"europe": "Europe",
"asia": "Asia-Pacific",
"india": "India",
"gcc": "GCC / Middle East",
"americas": "Americas (ex-US)"
},
"defaultSymbols": [
"^GSPC", "^DJI", "^IXIC",
"AAPL", "MSFT", "NVDA", "GOOGL", "AMZN", "META",
"BRK-B", "TSM", "LLY", "TSLA", "AVGO",
"WMT", "JPM", "V", "UNH", "NVO",
"XOM", "MA", "ORCL", "PG", "COST",
"JNJ", "HD", "NFLX", "BAC",
"^NSEI", "^BSESN",
"RELIANCE.NS", "TCS.NS", "HDFCBANK.NS", "ICICIBANK.NS",
"BHARTIARTL.NS", "INFY.NS", "SBIN.NS", "LICI.NS",
"ITC.NS", "HINDUNILVR.NS", "LT.NS", "BAJFINANCE.NS",
"ADANIENT.NS", "SUNPHARMA.NS", "TITAN.NS", "M&M.NS",
"TATASTEEL.NS", "KOTAKBANK.NS"
]
}
21 changes: 17 additions & 4 deletions src/app/data-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
SECTORS,
COMMODITIES,
MARKET_SYMBOLS,
STOCK_CATALOG,
SITE_VARIANT,
LAYER_TO_SOURCE,
DEFAULT_PANELS,
Expand Down Expand Up @@ -63,7 +64,7 @@ import {
fetchSanctionsPressure,
fetchRadiationWatch,
} from '@/services';
import { getMarketWatchlistEntries } from '@/services/market-watchlist';
import { getMarketWatchlistEntries, getCatalogSelection } from '@/services/market-watchlist';
import { fetchStockAnalysesForTargets, getStockAnalysisTargets } from '@/services/stock-analysis';
import {
fetchStockBacktestsForTargets,
Expand Down Expand Up @@ -1171,17 +1172,29 @@ export class DataLoaderManager implements AppModule {

async loadMarkets(): Promise<void> {
try {
const catalogSelection = getCatalogSelection();
const customEntries = getMarketWatchlistEntries();
const effectiveSymbols = (() => {
if (customEntries.length === 0) return MARKET_SYMBOLS;
const base = MARKET_SYMBOLS.slice();
// If user picked from the catalog, use that as the base instead of defaults
let base;
if (catalogSelection && catalogSelection.length > 0) {
const catalogMap = new Map(STOCK_CATALOG.map((s) => [s.symbol, s]));
base = catalogSelection
.map((sym) => catalogMap.get(sym))
.filter((s): s is NonNullable<typeof s> => !!s);
if (base.length === 0) base = MARKET_SYMBOLS.slice();
} else {
base = MARKET_SYMBOLS.slice();
}

// Append any freeform custom entries on top
const seen = new Set(base.map((s) => s.symbol));
for (const entry of customEntries) {
const sym = entry.symbol;
if (!sym || seen.has(sym)) continue;
seen.add(sym);
base.push({ symbol: sym, name: entry.name || sym, display: entry.display || sym });
if (base.length >= 50) break;
if (base.length >= 80) break;
}
return base;
})();
Expand Down
Loading
Loading