- execution.py: dual-write SIP_NO_FILL and SIP_PARTIAL to engine_event
so the strategy summary can surface them to users
- execution.py: emit SIP_NO_FILL event (with cash/required amounts) on
the paper path instead of silently returning when funds are insufficient
- strategy_service.py: improve insufficient_funds message to show exact
shortfall and reassure user that next SIP will auto-execute when funded
- strategy_service.py: clear SIP_NO_FILL warning after a successful
SIP_TRIGGERED so it does not persist after funds are added
- runner.py: always write PRICE_FETCH_ERROR and HISTORY_LOAD_ERROR to
engine_event regardless of ENGINE_DEBUG flag
- db.py (backend + engine): raise default pool sizes to 20/50 max
connections to handle 100 concurrent users without pool exhaustion
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_try_execute_sip_paper and _try_execute_sip_live were hardcoding
NIFTYBEES.NS regardless of strategy. Added equity_symbol/gold_symbol
params to try_execute_sip and propagated from runner using _EQUITY_SYM
(_GOLD_SYM). Also fixed JUNIORBEES check in state accounting helpers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
period=1d interval=1m returns empty after NSE closes at 3:30 PM IST.
Fall back to period=5d interval=1d to get last available close price.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces STRATEGY_REGISTRY, alpha_shield_allocation(), and compute_weights()
in strategy.py. Updates runner.py to dynamically load equity symbol, gold
symbol, and SMA window from the registry based on strategy_name, enabling
Alpha Shield (JUNIORBEES.NS + GOLDBEES.NS, 60M SMA) alongside Golden Nifty.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>