Australian (ASX) Stock Market Forum

Dump it Here

Hi @MovingAverage

Many thanks for the detailed reply. I will try adding in you Amibroker code to delve further into Monte Carlo testing in Amibroker with my system and see what i come up with. Totally agree re including 'fixed dollar position sizes' when testing. So far my system is tracking what the back test results suggest, but ive only traded it for a short time.
Clearly, the results from Amibroker system testing itself needs to viewed with a degree of caution and needs further examination

cheers
Marty
 
Quick update re above post - i added in your code, @MovingAverage and run the analysis over different time periods. Very interesting to review the results. Overall the DD of my system appears to be stable and the CAR is 'good' when i scroll through 80% of the results also. At worse its still profitable.
This is very useful to give you an idea as to what can happen at the 'extremes' of probability (that could well happen).
I'll export to excel later for more analysis later. I think anyone doing back testing would find this very useful - thanks again for the input, much appreciated

cheers
Marty
 
Quick update re above post - i added in your code, @MovingAverage and run the analysis over different time periods. Very interesting to review the results. Overall the DD of my system appears to be stable and the CAR is 'good' when i scroll through 80% of the results also. At worse its still profitable.
This is very useful to give you an idea as to what can happen at the 'extremes' of probability (that could well happen).
I'll export to excel later for more analysis later. I think anyone doing back testing would find this very useful - thanks again for the input, much appreciated

cheers
Marty

Great to hear @martyjames . The spread on the DD is very important to look at.
 
Amibroker recap Logo.jpg
Background - before I start constructing the "WTT Strategy"
There have been posts made previously about "setoption" & changing a "chart style" on-the-run, so I'll reference those posts with the hyperlinks.

Amibroker SetOption template by Bruce Robinson
https://www.aussiestockforums.com/posts/1077208/
This is a modified version of Bruce Robinson's template as some settings are only accessible via "setoption" & not listed in the (AA) settings. It's recommended to control settings using an (AFL) rather than the "Settings dialogue" whenever possible. (the reason for uploading the template) "Setoption" forms the start of the construction process.

How to change from a Candle Chart to a Bar Chart on the fly
https://www.aussiestockforums.com/posts/1077220/
Amibroker's standard "Price Chart" is a "Candle Chart" where I prefer to have a "Bar Chart" (personal preference) I have uploaded a "Price Chart" (AFL) that allows changing from a Candle Chart to a Bar Chart on the fly.

How to change the user-definable parameter (this is important)
I use the parameter feature extensively in all my trading strategies. Meaning, every parameter & "important setting" can be changed without changing the strategy code. To test an idea, change the parameter you wish & run a backtest to see if it makes a difference. Once finished you can "reset" the parameter back to the original parameter setting of the strategy code by hitting the [Reset All] at the bottom of the dialogue box or alternatively it will reset once the strategy is closed.

How.jpg

User-definable parameter, which will be accessible via Parameters dialogue box
1. When you are on a chart: "right-click" over chart pane & select "Parameters". The chart below is the format for displaying the "WTT Strategy" which paints an easy to read graphic (a) the buys & sells signals, (b) the white arrow is the signal bar (c) the white square is the buy bar (d) is the entry price of the pre-auction & (e) the Index Filter ribbon at the bottom (Green = On, Red = Off)

Param Chart Capture.JPG

2. Exploration Analysis
The Parameter icon is a small [slider Box] icon on the menu bar. How to change the parameters?, "left-click" on the parameter icon, a list will appear so you can alter (a) the bet size (b) The Strategy Breakout Period or (c) change the chart style. I've decided to have a portfolio size of $100k with 20 positions = $5k initial bet size (as shown in the parameter dialogue box below). The parameter setting allows you to adjust your bet size on the fly. Changing your bet size is done by changing the "Trading Funds" dollar size. The strategy will automatically re-calculate the new number of shares to buy.

Param Capture.JPG

3. The "Exploration Analysis" window (Set the "Range" to 1 recent bar for buy & sell positions)
The "WTT Strategy" has been designed to trade the signals of the "Exploration Analysis" as they appear. The results are self-explanatory & easy to follow. You just need to buy the positions in the order displayed. As an example, if you need to buy 3 positions you buy the top three. If you are holding a position that is displayed "as a sell" in the "Exploration Analysis" results, sell all the shares that you hold at the "Sell Offer price" in the pre-auction. If you don't hold that sell position, no action is required.

Exploration Analysis Capture.JPG


4. Backtesting
I have coded the strategy so it can be backtested. The results below are from a backtest of the strategy I will construct. The Portfolio size is $100k with $5k bets (but as explained the bet size can be adjusted through the parameter dialogue box) The Backtest period is from "1st January 2019 to end of trade yesterday". Why did I use that period? Because it's an average of how the strategy would have performed that included the recent "good & bad" periods of trading.

Backtest Capture 1st Jan 2019 to today .JPG

Important.jpg

The "WTT Strategy" being constructed is the Henry Ford model "T" when it comes to cars
The model "T" & the "WTT Strategy" has many similarities as both are practical & affordable for the common man of the time (Model "T" = then, the "WTT Strategy = now). Both the model "T" & the "WTT Strategy" are low cost, durable, versatile & easy to use. I can guarantee you "it's no Tesla" but it will get the job done till you get more experience driving either one. The "WTT Strategy" that I'm going to construct is "bare-bones" & basic in nature that bears no relationship to the original strategy coding. I went to great lengths to construct & code my version of the "WTT Strategy" to align with actual results posted by forum members "who own the genuine original WTT Strategy" using those results as a baseline.

The Start today.jpg

Skate.
 
WTT Under construction Logo images.jpg

I'll post the 12 steps in constructing a strategy (WTT Strategy)
I'll try to post the steps quickly so I keep the entire post together. The 12 steps are in story-board format (broken & displayed separately) to reduce confusion when there is so much to look at & then try to decipher it. Each line of code has an explanation of what the code means.

The "WTT Strategy"
The strategy comprises of 109 lines of code that is inclusive of white space. The strategy will be uploaded & for those who don't have Amibroker the (afl) code can be opened & viewed in "Microsoft Notebook" or similar reader.

So the series can be kept together
I'm asking if you could refrain from posting comments or asking questions till they are all uploaded.

Skate.
 
WTT cover.png

The order of construction
12. Add code to the chart & plots the signals. Also adding an Index Ribbon at the bottom of the chart

12. Charts Capture.JPG

Next, I'll post up some backtest results
The Backtest results will be from this constructed "WTT Strategy". Then I will post a backtest with a few modifications to the strategy just constructed for improvements to have confidence trading a modified version of a "WTT Strategy"

Skate.
 
Fantastic information @Skate :xyxthumbs. I'm interested to see where the differences lie with those others who have coded Amibroker WTT strategies and had different backtest results.
 
Sad Face shady images.jpg
What a bummer

I've just been messaged by a concerned member & it looks like I have the incorrect parameters for the WTT code.

1. The index filter parameter from Nicks ebook is actually a 10 week SMA, not a "20 week SMA as reflected in your code"
2. The trailing stop for the WTT is actually 40% not "20% as reflected in your code" from the entry price and then 40% from each successive high point whilst the index filter is ON, and then it ratchets up to 10% from each successive high point when the index filter turns to OFF.

I'll make the adjustments
I'll make the adjustments (alterations to the code) & post a backtest with the amendments made for the accuracy of reporting.

FYI
The strategy construction is correct & completed in the correct order but the Index Filter & Trailing Stop is settings are not correct (they will be corrected) I thank the member for the updated information

Skate.
 
Top