Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

FB-008: close_trade mixes price and tick; stale exits are silent (zero-P&L fallback) [silent-wrong]

Abierto
#27 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend, data

Línea de trabajo

Start in strategy.py at the cited lines 231 and 245, then trace get_price and the trade fields used by close_trade. Check existing tests for stale prices, fill-forward behavior, and no-price exits. Done means one tick source is used, the exit lag is recorded, and an optional maximum lag is enforced with tests covering the stated cases.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Severity: silent-wrong · Source: BUGS_FASTBT.md (2026-10-09; seen in skill trial 11)

  • The price is read at ctx.tick (strategy.py:231), but the trade is stamped with the tick argument (strategy.py:245). A caller passing a different tick records a price from one time against another.
  • The lag returned by get_price is discarded, so a fill-forward exit of any age is accepted: from yesterday's close, or from a contract with no bars left.
  • With no price at all, the exit price falls back to the entry price (zero P&L) with only a logger.warning.

Observed: on the stale 2025-11-27 monthly gap, the fill-forward and live-only variants exit differently.

Workaround: check the lag before closing; pin the ffill-vs-live exit policy.
Fix: use one tick source; store exit_lag on the trade; add an optional max_exit_lag.

Lenguaje dominante
Python
Estrellas
28
Forks
17
Merge medio
5 h 7 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de uberdeveloper/fastbt

Todos los issues de uberdeveloper/fastbt

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.