fix(ifind): legal A-share windows across a long closure are refused
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- fintech-quant
Research direction
Read ifind_ashare.py:31-42 and the renamed test_minimum_bars_never_exceeds_the_weekday_derived_bar_count sweep; PR #477 provides context, and #482 tracks a separate test gap. Explore whether an iFinD-served trading calendar can inform the bar-completeness floor without weakening protection against truncated replies. Done means complete windows across National Day and Spring Festival closures are accepted while genuinely truncated replies are still refused.
Written by the indexing model from the issue text.
Description
Follow-up from #474 item 1 (PR #477). Known and documented in the code; filing so it is tracked rather than only commented.
minimum_bars_for_window derives its floor from weekdays, which cannot see exchange holidays. A window whose data is complete and correct is refused as truncated when more than half its weekdays fall inside a closure.
floor = max(4, weekdays * 4 * 0.5) → refusal whenever real_trading_days < weekdays / 2.
Measured (sweep over every legal span, both real closures):
| window | span | floor | real trading days | real bars |
|---|---|---|---|---|
| 2026-09-28 → 2026-10-09 | 11d | 18 | 4 | 16 |
| 2026-09-25 → 2026-10-08 | 13d | 18 | 4 | 16 |
| 2024-02-05 → 2024-02-17 | 12d | 20 | 4 | 16 |
Both National Day (Oct 1–7) and Spring Festival reproduce it.
Two things worth knowing before working this:
- It is not reachable at the full 14-day span. Refusals cluster at 11–13 days; a 14-day window picks up enough weekdays on either side of the closure to clear its own floor. The comment at
ifind_ashare.py:31-42implies the widest windows are affected — they are not. - The existing sweep cannot catch it.
test_minimum_bars_never_exceeds_the_weekday_derived_bar_countvaries weekdays only, so no closure ever enters it. Renamed in PR #477 to stop it claiming coverage it does not have; the separate mutation-strength gap in that same test is #482.
It fails in the safe direction — a visible refusal, not a short curve charted as real — which is why it shipped. Lowering _MINIMUM_BAR_COMPLETENESS is not the fix: it trades a visible false refusal for silent acceptance of a genuinely truncated reply, which is the case the guard exists for. The fix is a CN trading calendar, which ifind_ashare.py deliberately does not carry (it would be a second, unversioned holiday table beside the exchange's own). An iFinD-served calendar would avoid that.
User-visible today: formatBacktestError names both holidays as the likely cause, so the message is accurate — the run is still refused.
- Dominant language
- Python
- Stars
- 767
- Forks
- 156
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 73
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No 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 Open-Finance-Lab/AgenticTrading
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Open-Finance-Lab/AgenticTrading#699 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 85/100
Open-Finance-Lab/AgenticTrading#698 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Open-Finance-Lab/AgenticTrading#696 ·
Maintainers usually reply within 1 day
-
fix(llm): Gemini adapter drops thinking tokens from the output countPossibly taken @subidhkhanal claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Open-Finance-Lab/AgenticTrading#657 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Open-Finance-Lab/AgenticTrading#591 ·
Maintainers usually reply within 1 day
All issues in Open-Finance-Lab/AgenticTrading
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pytest-dev/pyfakefs#1367 · 1 comment ·
Maintainers usually reply within 2 days
-
IFEvalG exclude_word_harder misses the keyword next to punctuation, at the start or end of the text, and in other letter casePossibly taken @damienen claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
allenai/open-instruct#2151 ·
Maintainers usually reply within 1 day
-
feat(plan): support convertorLabels and convertorAffinity in Plan resourcePossibly taken @AmenB claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RedHatQE/openshift-python-wrapper#2849 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 25 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
libnativeapi/nativeapi#21 ·