CanOz
Home runs feel good, but base hits pay bills!
- Joined
- 11 July 2006
- Posts
- 11,543
- Reactions
- 519
Must explore this From Howard , I have a couple of his books but not the one mentioned hereRegime switching has become easier. There is a working example in AmiBroker in my "Mean Reversion" book, and a much different example in Python in my "Quantitative Technical Analysis" book.
The AmiBroker algorithm is about 150 lines long, of which over half are comments, system settings, and lines listed separately for clarity. In essence, there are multiple (two in the code shown) separate models in the file. The trading result of each is tracked and the buy and sell signals come from the one that is best. The listing of the afl is on page 192 and is easily understood. This works, and the chart shown on the cover of the book is the out-of-sample result of this program.
The Python algorithm uses the CAR25 universal objective function along with sequential Bayesian analysis to track and switch among any number of alternatives. CAR25 is the estimate of risk-normalized profit potential. It is a Dominant metric -- which means that the best use of funds is to trade the single system that has the highest CAR25, switching to another when the ranking changes. There is no need for a portfolio. In fact, forming a portfolio means that a portion of the funds are being used sub-optimally. Risk-normalization, distributions of results, CAR25, and dynamic position sizing are all developed and explained in the QTA book. The Python code that implements dynamic position sizing is about 200 lines of code. See page 412.
For more information, and to read portions of each book, begin here:
http://www.blueowlpress.com/123-2
In always, perform your own validation before considering using either technique.
Best regards, Howard
Hello and welcome to Aussie Stock Forums!
To gain full access you must register. Registration is free and takes only a few seconds to complete.
Already a member? Log in here.