Skip to content

Stock Universe — Spec

Overview

The active ticker list is stored in the tickers DB table and managed at runtime via the Manage Tickers dashboard page. No code changes or restarts are needed to add or remove a ticker.

Initial seed data is defined in config.py:US_STOCKS, KR_STOCKS, and TICKER_NAMES and is loaded into the DB on first init_db() call.

Markets

  • US: 24 tickers across 3 sectors — Big Tech, AI Infrastructure, Energy/AI Power
  • KR: 15 tickers across 6 sectors — Big Tech, Manufacturing/Battery, Semiconductor, Defense/Shipbuilding, Power Infrastructure, Biotech

Ticker Formats

Market Format Example
US Plain alphabetic symbol AAPL, NVDA, TSLA
KR Bare 6-digit KRX code 005930, 000660, 373220

No .KS suffix anywhere — FinanceDataReader uses bare codes natively.

Lifecycle

  • Adding: use Manage Tickers UI or add to config.py for bulk/pre-deployment seeding
  • Deactivating: sets active=False — excluded from all future pipeline runs; historical data preserved
  • Market discriminator: StockPrice.market and NewsArticle.market ("US" or "KR") is the sole market discriminator, not the ticker format

Constraints

  • ALL_US_TICKERS / ALL_KR_TICKERS are auto-derived — do not edit manually
  • KR: bare 6-digit code only; verify it works in FinanceDataReader before adding
  • Tickers are not globally unique — always filter by both ticker and market in cross-market queries