-
Notifications
You must be signed in to change notification settings - Fork 1k
Add docs on choosing data and bars processing #2195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
many thanks 👌 I'll do some formatting and make tweaks once on develop
branch.
:::tip | ||
For some trading strategies, it can be practical to start development with bar data to validate core trading ideas. | ||
If the strategy looks promising, but is more sensitive to precise execution timing (e.g., requires fills at specific prices | ||
between OHLC levels, or uses tight take-profit/stop-loss levels), you can then invest in higher granularity data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well stated.
- Uses bar structure to estimate likely price path: | ||
- If Open is closer to High: processes as `Open → High → Low → Close` | ||
- If Open is closer to Low: processes as `Open → Low → High → Close` | ||
- Testing shows this approach achieves 75-85% accuracy in predicting correct High/Low sequence (compared to statistical 50% accuracy with fixed ordering) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we start quoting research and stats, it might be worth adding some citations if possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhm, good point - reality is - it is my own script, testing 1-year of data with this heuristics:
Current fixed OHLC approach = 50% correct
- 50% correct simulations
- 50% incorrect simulations
Proposed heuristic approach = 85% correct
- 70% of bars have significant directional bias (>35% of bar range difference between open-close)
- Remaining 30% split roughly 50/50
- Net result: ~85% accurate simulations (70% + half of the remaining 30%)
- Only ~15% potentially incorrect simulations
If you are OK with it, I can formulate the reasoning behind and add it to the note of these docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that's great - even if we link to a gist or markdown you can provide for the above 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am making a note and it will be added tommorrow 👍
- Order of OHLC in bar processing - Choosing data: cost vs. accuracy
Docs were update on both topics - as I promised.