Summary
The preload cache in trading_bots/src/data/historical.rs:34-37 hardcodes 13 tickers that don't match the TICKERS constant defined in trading_bots/src/constants.rs:11-14 (7 tickers).
TICKERS constant (active): SPY, TSLA, AAPL, MSFT, AMD, INTC, NVDA
Preload cache list: TSLA, AAPL, MSFT, NVDA, INTC, AMD, ADBE, GOOG, META, NKE, DELL, CMCSA, FDX
Impact
SPY is in TICKERS but not in the preload list, so it is always loaded from disk on first access instead of being cached at startup.
- 6 tickers (
ADBE, GOOG, META, NKE, DELL, CMCSA, FDX) are preloaded into memory but never used, wasting memory and startup time.
Additional divergence
There are also hardcoded ticker lists in the environment modules that diverge from both:
trading_bots/src/torch/env/env.rs:29-32 — AVAILABLE_TICKERS (13 tickers, matches preload list)
trading_bots/src/torch/env/vec_env.rs:57 — AVAILABLE_TICKERS (6 tickers, a different subset)
All of these should likely reference the single TICKERS constant to stay in sync.
Suggested fix
Replace the hardcoded list in get_or_init_cache() with crate::constants::TICKERS, and similarly update the AVAILABLE_TICKERS constants in the env modules.
Summary
The preload cache in
trading_bots/src/data/historical.rs:34-37hardcodes 13 tickers that don't match theTICKERSconstant defined intrading_bots/src/constants.rs:11-14(7 tickers).TICKERSconstant (active):SPY, TSLA, AAPL, MSFT, AMD, INTC, NVDAPreload cache list:
TSLA, AAPL, MSFT, NVDA, INTC, AMD, ADBE, GOOG, META, NKE, DELL, CMCSA, FDXImpact
SPYis inTICKERSbut not in the preload list, so it is always loaded from disk on first access instead of being cached at startup.ADBE, GOOG, META, NKE, DELL, CMCSA, FDX) are preloaded into memory but never used, wasting memory and startup time.Additional divergence
There are also hardcoded ticker lists in the environment modules that diverge from both:
trading_bots/src/torch/env/env.rs:29-32—AVAILABLE_TICKERS(13 tickers, matches preload list)trading_bots/src/torch/env/vec_env.rs:57—AVAILABLE_TICKERS(6 tickers, a different subset)All of these should likely reference the single
TICKERSconstant to stay in sync.Suggested fix
Replace the hardcoded list in
get_or_init_cache()withcrate::constants::TICKERS, and similarly update theAVAILABLE_TICKERSconstants in the env modules.