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

FB-012: get_instrument_data has no expiry filter and no dedupe; rows collide silently [silent-wrong, latent]

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, data

Direzione di ricerca

Start in data.py at DuckDBVortexLoader.get_instrument_data (line 303) and compare its row selection and data[time_str] assignment with get_underlying_data (line 273). Trace how the context supplies instrument data and inspect the relevant duplicate and multiple-expiry cases described in the issue. Done means the optional expiry filter is passed through and duplicate keys are handled predictably, with tests covering conflicting rows.

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

Descrizione

bug

Severity: silent-wrong (latent) · Source: BUGS_FASTBT.md (2026-10-12; consolidation E002 2026-10-11)

DuckDBVortexLoader.get_instrument_data (data.py:303) selects on trade_date, option_type and strike only, and builds data[time_str] = row. If a date has two rows for one strike and minute, the later row overwrites the earlier one with no warning. ORDER BY trade_time does not order ties, so which row wins is arbitrary. Triggers:

  • duplicate rows in the file (nifty_full.vortex, 2026-03-24..04-30)
  • more than one expiry on a date (merged weekly + next-week or monthly file)

get_underlying_data (data.py:273) has the same pattern with SELECT DISTINCT trade_time, underlying_price: two different prices for one minute give two rows, and the later one wins.

Today's results are not affected (consolidation E002 ran 4 strategy configs on original vs deduped copy, default and 1-thread DuckDB — identical trades; holds only because duplicate copies are byte-identical and every current file has one expiry per date).

Workaround: keep one expiry per file, and dedupe any new file before use.
Fix: take an optional expiry in get_instrument_data (pass it from the context), and either dedupe on (trade_time, expiry, strike, option_type) or raise when a key appears twice with different values.

Lingua principale
Python
Stelle
28
Fork
17
Merge medio
8h 50m
PR unite (30g)
2

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.