Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#27 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, data

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
28
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di uberdeveloper/fastbt

Tutte le issue di uberdeveloper/fastbt

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.