Spaces:
Running
Running
Commit History
-
Fix empty universe + full-market top picks; drop dead NSE price APIs
Khanna, Videh Rakesh RakeshUniverse (universe.py): - Source the WHOLE NSE market from NSE's official EQUITY_L.csv (~2,062 EQ stocks, all cap tiers incl. mid/small-caps) instead of Yahoo's top-500 screener, which is blocked on HF datacenter IPs (returned 0 -> empty universe -> top picks stuck 'Analysing...'). Chain: EQUITY_L -> Nifty-500 CSV -> Yahoo screener -> static fallback (nse_fallback_universe.py). - Persist cache to /data on HF (survives restarts). Top picks (top5_picker.py): - Scan draws from the whole market, capped at 700/run, ordered cache-first (data_sources.cached_tickers) + rotating cold tail so mid/small-caps are included and the market is swept over ~3 runs. Phase 1 is signals-only. Data sources (data_sources.py, app.py): - Remove dead NSE OHLCV API, NSE live-quote, and jugaad NSELive (all HTTP 403 bot-blocked even locally) to stop wasting a warmup+request per fetch. - OHLCV order simplified to yfinance-first. - Fix _is_price_fresh (was always-False via dead probes -> stop-loss ch…b0d9ebf