FB-012: get_instrument_data has no expiry filter and no dedupe; rows collide silently [silent-wrong, latent]
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 28
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uberdeveloper/fastbt
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
uberdeveloper/fastbt#29 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
uberdeveloper/fastbt#20 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
uberdeveloper/fastbt#30 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
uberdeveloper/fastbt#28 ·
-
FB-008: close_trade mixes price and tick; stale exits are silent (zero-P&L fallback) [silent-wrong]Openbug
Difficulty 3/5 1-2 days Newbie friendliness 70/100
uberdeveloper/fastbt#27 ·
All issues in uberdeveloper/fastbt
Similar issues
-
SSM GetParameter throttling during concurrent workflow launchesPossibly taken @alexiswl claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)Possibly taken @andest01 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
pesu-dev/discord_bot#97 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
gradio-app/gradio#13964 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 comment ·
Maintainers usually reply within 1 day