Australian (ASX) Stock Market Forum

Developing a mechanical system from scratch

Bund_30_30 BOT EQ.PNG Bund_30_30 BOT.PNG Jeez, who would have thought, slapped the breakout system onto the Bund and boom! IT works, really well....with slippage and commisions.....Lets see if we can break it with more OOS data, surely....
 
YUP, that broke it....

I didn't optimise it on the intial data series. I merely applied the FDAX strategy to a 2 year period from Jan 2014-2016. This tells me the regime has changed. Can i optimise the first part of that series and see it if holds. In other words, train it on new data, and test it to see if it holds? Otherwise its curve fit.Bund_30_30 BOT OOS UNOPT.PNG
 

Attachments

  • Bund_30_30 EQ OOS UNOPT.PNG
    Bund_30_30 EQ OOS UNOPT.PNG
    70.7 KB · Views: 1
Bund_30_30 Optimised recent Stats.PNG Bund_30_30 Optimised recent.PNG Alright, given the bund has gone through a regime change (end of QE?) we optimised on a couple of recent years worth of data to see if there is a possibility of a "trained" strategy working on OOS data that is more recent....here is the trained result on two years of "recent" data.....lets see what happens when we run it right up to date....
 
Here, as you can see, this strategy is not worth pursuing as it cannot be profitable without heavy optimising.[/ATTACH]Bund_30_30 Optimised recent Stats OOS.PNG Bund_30_30 EQ OOS UNOPT_OOS.PNG
 
Ok, so given that the last strategy was pretty much a fizzer. I want to start from scratch with an idea i had using the regime type filter, an ATR cross filter. I want to start with this because i had decent probabilities using EOD charts on currencies. This might make a good filter. So what i'm thinking is we use an ATR Cross and then an MA Cross as a trend filter. For exmple, if we get the signal, an ATR cross, we'll take a short right away, apply our trailing stops on a smaller time frame (240, 120 or 60m) and then enter again on a pullback. ATR Cross Signals.PNG
 
We'll then go to a second data series for the trailing stop and then take new entries based on pullbacks of some kind (mean reversion) followed by some kind of momentum, or range expansion....stay tuned...i'm working so this may take a few days!
 
In regards to the code for my first system, I have found errors in it that mean it tests well, but I don't think it's possible to achieve those results ..... I'll post more soon...just trying to fix it.
 
I still use both, just using TS for intraday. I may try and code some for Amibroker, but only EOD strats
 
Regime change.PNG For my first paint bar study i've just completed an indicator that uses two normalised ATRs and an RSI to show me where extremes have occured and the market may turn. Enlightful and rewarding experience, i.e. that was fun.
 
I love how the Bulls clean out the weak bears on the lower low after the initial extreme so consistently in that shot.
 
My volitility model smells a rat.....Two Index sells and a GC buyFDAX Vol Model SELL.PNG FESX Vol Model SELL.PNG GC Vol Model Buy.PNG
 
This is an old Strategy i got from a book. I applied it to the Dax after a few optimisations. It hadn't done too well until the last 6 months or so when it climbed out of Drawdown. Good to see it performing again...Daxsystem2.PNG Daxsystem1.PNG Daxsystem3.PNG
 
Regime 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
Must explore this From Howard , I have a couple of his books but not the one mentioned here
 
Top