It always seems easier to write from scratch than refactor. Several years into pysystemtrade later.... GAT
Don't worry, everyone does this at least once. Twice if they are especially stubborn! https://en.wikipedia.org/wiki/Second-system_effect You (or someone) said something to the effect of it will be problematic to implement new types of entries/exits because they were hard coded. Which I was worried about, but it wasn't that big of a deal in the end!
The one thing I do need to figure out is how best to stitch together a continuous futures contract for backtesting/research. Found this page which looks like a good approach: https://www.quantstart.com/articles/continuous-futures-contracts-for-backtesting-purposes/ I seem to recall GAT had this in one of his books a well but I forgot which so I guess I'll have to reinvent it poorly.
It's in appendix C of Leveraged trading, or https://qoppac.blogspot.com/2015/05/systems-building-futures-rolling.html, or https://github.com/robcarver17/pysystemtrade/blob/master/sysdata/futures/roll_calendars.py. GAT
I use the method which GAT calls the”Panama stitching method”. In this method the individual contracts are offset with a value to stitch them to the next contract. I think I learned this approach from his blog; can’t remember whether it is described in his Systematic Trading book.
Yes, to clarify: Panama is included in Systematic Trading, but not in so much detail. Leveraged Trading includes a row by row table illustrating how it works. Or you can read the blog. GAT
@globalarbtrader seeing the link you posted: indeed, I got it from your blog. And then made my own Java code to implement it.
BTW don't take my mocking of Java seriously, I think it's a great productive language/ecosystem. Especially recently when they've been taking ideas on how to un-enterprise various things.