Repository navigation
feat(fase-19): tracker — Diagnóstico de Rechazos + Dashboard + Estrategias Bidireccionales - #3
Merged
Merged
Conversation
…g + re-optimizacion parcial - Anadidos bollinger_lower(), bollinger_upper(), vwap() a inference/conditions.py - Registrados en _INDICATORS para que funcionen con operadores compuestos - Corregidos YAMLs de swing_reversion y swing_mean_reversion (bollinger + 'price < lower' -> bollinger_lower + 'price < bollinger_lower') - Agregado flag --windows a scripts/optimize.py - Actualizados parametros post-optimizacion en intraday.yaml, scalping.yaml, swing.yaml - TAREA A: intraday_vwap SOBREAJUSTADO, scalping_spread ROBUSTO - TAREA B: swing_reversion, swing_mean_reversion, swing_momentum optimizadas - 4 procesos en background aun corriendo: intraday_volume_breakout, intraday_support_resistance (WF 5-window) intraday_trend (v2), scalping_momentum (WF-integrated)
- scalping_momentum: re-optimizada con nuevo diseno EMA+RSI (best trial sharpe 3.88) - intraday_trend_v2: re-optimizada con fix de vwap - intraday.yaml y scalping.yaml actualizados con parametros optimos
- RiskManager ahora acepta config_path opcional para releer max_positions de config.yaml cada 60s (en approve()), permitiendo cambios en caliente - Agregado log temporal: 'RiskManager: checking signal — positions=X/Y' para diagnosticar el limite efectivo en cada senal - optimize.py: fallback de max_positions cambiado de 5 a 10 - run.py: pasa config_path al RiskManager
… etc.) Tres bugs interrelacionados impedian que las posiciones se cerraran: Bug 1: _exit_signal() reseteaba self.state='IDLE' y entry_price=0.0 ANTES de que el RiskManager aprobara y el broker ejecutara la venta. Si el SELL era rechazado, la celula ya estaba IDLE y re-entraba en el siguiente tick, acumulando posiciones sin cerrar. Bug 2: RiskManager.approve() para SELL hacia _active_entries.discard() antes de verificar si habia posicion para vender (qty <= 0). El slot se liberaba incluso en rechazo, permitiendo re-entrada inmediata. Bug 3: RiskManager usaba portfolio.positions.get(symbol) que devuelve el TOTAL del simbolo. Cuando multiples celdas tenian el mismo simbolo, una venta se llevaba TODA la posicion. Las otras celdas quedaban 'IN_POSITION' sin posicion real en el portfolio. Fixes: - cells/base.py: _exit_signal() ya no resetea estado. Agregado exit_position() que el engine llama solo tras ejecucion exitosa (analogo a enter_position() para BUY). - core/engine.py: llama cell.exit_position() tras ejecucion confirmada del SELL. - risk/manager.py: _active_entries.discard() movido despues del check de qty. Agregado _entry_qty[(symbol,cell_name)] para trackear cantidad por celda, no por simbolo.
This was referenced Jun 26, 2026
feat(fase-19): diagnostics detallados de rechazo + drawdown real
feat(fase-19): TradeTracker con 8 metricas profesionales
feat(fase-19): dashboard profesional 6 paneles Rich en vivo
feat(fase-19): celulas bidireccionales (IN_SHORT + exits invertidos)
…r, brokers) feat(fase-19): pipeline SHORT completo (Engine, Portfolio, RiskManager, brokers)
guigerdts
marked this pull request as ready for review
June 26, 2026 02:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tracker branch for FASE 19 — structured rejection diagnostics, peak-equity drawdown, TradeTracker, professional dashboard, and bidirectional strategies (BUY & SHORT).
5 PRs encadenados — Feature Branch Chain hacia main.
Chain Context
Chain Overview
PR Status