Spaces:
Running
Running
Commit History
-
Predict AI forecast for recently listed stocks instead of refusing below 200 bars
Khanna, Videh Rakesh Rakesh +1: Claude Sonnet 5.5predict_stock_v2 hard-refused anything under 200 bars, so recent IPOs (e.g. RENTOMOJO, 17 bars) got no AI prediction even though the ML model had been relaxed. Refuse only below a 15-bar floor; between 15 and 199 bars predict as a degraded call: confidence is capped to LOW and the result carries low_history/history_bars. get_ml_feature_score's early return now includes the "upgraded" key the caller indexes (it raised KeyError for short history). ml_predictor MIN_BARS lowered 20 -> 15 to match. The watchlist payload passes low_history through and the TF cell shows a "New listing" badge; stale "after 200 bars" messages reworded. Cache buster bumped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>6887c6c
-
Predict for low-history tickers instead of hard-refusing below 205 bars
Khanna, Videh Rakesh Rakesh +1: Claude Sonnet 5ml_predictor previously refused any prediction below 205 bars (the model's training minimum), even though every short-window feature is already computable and neutral-defaulted well before that. Add a degraded tier (20-204 bars): predict using the existing model, force confidence to LOW, and flag it, instead of returning ml_unavailable. Below 20 bars still refuses as unusable. Also lower the dead 26-bar guard in compute_features() to the new 20-bar floor, and fix the frontend's stale "awaiting 26 daily bars" message to report real bar counts from the API instead of a hardcoded, drifted number. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>5703a07
-
ML: add indicator + Monte Carlo features, retrain model
Khanna, Videh Rakesh RakeshAdd 12 extra point-in-time features (Bollinger bandwidth/squeeze, Keltner & Donchian channel position, Stochastic %K, CCI, MFI, Williams %R, realized vol, and Monte-Carlo bootstrap hit-probability/excursion estimates), now the production default (opt-out ML_EXTRA_FEATURES=0). Shared helpers in features.py keep live inference and the training augmenter identical (no train/serve skew). Validated on the 5-month OOS holdout (research/ml_backtest.py, 38,376 rows): INTRADAY direction 71->82%, price-target hit 64->84%, est-high MAE 1.54->1.07; 1D/3D per-trade P&L +0.86->+1.02 / +1.29->+1.51 (PF 1.74->1.93 / 1.79->1.96), no regression. Retrained the committed 49-feature model. Adds research/augment_features.py (vectorized CSV augmenter reusing the shared feature helpers).c789230
-
ML model retrain + research updates + news/llm tweaks
Khanna, Videh Rakesh Rakesh- Retrain ml_predictor quantile/direction models + manifest - dataset/features/infer/train updates - Add research/ml_intraday_backtest.py + results; update ml selection/watchlist evals - llm_client and news_sentiment adjustments8af7f2e
-
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