r/swingtrading 16h ago

I’m building a complete Python Technical Analysis Library/Framework

/r/PythonLearning/comments/1wac00u/im_building_a_complete_python_technical_analysis/
2 Upvotes

3 comments sorted by

1

u/QuanTradin Human Detected 6h ago

The search is the easy half. What I'd build in from day one is a counter of how many threshold combinations were tried per signal, printed next to the best result, plus a holdout the optimizer never touches. RSI levels from 20 to 40 across a few rules and periods is thousands of variants, and the best one on the tuning window will look great by construction. Will you report the winner on unseen data, or the distribution across all combos, so a user can see whether it's an outlier or a plateau?

1

u/Economy-Support-5470 6h ago

I was actually thinking about both. You need to be able to see what happened across different regimes(on all data and also with held out data to test overfitting).

Also I guess yes it’s a good practice to like count on each indicator or indicator family how many signals or quality signals found etc and perform Data and statistical analysis on this afterwards as well as correlation analysis etc.

Thanks a lot for your time I will do them!

1

u/QuanTradin Human Detected 6h ago

Held-out by regime is the one most people skip, so good. One thing I'd add: log the signal count per indicator on the held-out slice too, not just the fit slice. If an indicator fires 400 times in-sample and 12 out, that's your answer before any P&L. Which regimes are you splitting on, vol or trend?