This is a mobile optimized page that loads fast, if you want to load the real page, click this text.

Dump it Here

Really enjoying the discourse on backtesting periods here recently. Frankly I feel both approaches are wise and have their benefits. Longer backtests tend to be best for finding robust parameters and ruthlessly simplifying complexity - i.e. minimise the number of parameters that might be cuve-fit at all costs - or the "degrees of freedom". You do your best to avoid steep spikes in backtest optimiziation graphs.

But don't be afraid to monitor short and medium term performance against backtests as market regimes will change. There is no perfect system, so likewise it may be that long term (super/retirement fund) strategies should be more robust over longer periods, but there could also be value running additional systems where the style is more aggressive entry/exit over shorter time frame with benefit re-optimizing parameters very 6-12 months.


A large part of the problem too is how you optimize. For breakout or pullback trend following systems, there is invariably a very unbalanced effect from a small number of trades with huge outperformance compared to the bulk of trades with small to medium profits, or (hopefully) contained losses. Here are 2 plots of %profit versus weeks in the market for 2 very different weekly trend following systems. The first is much more aggressive, the second stubbonly holds on for profit where it can.






Optimizing these 2 systems is a completely different ball game. The first will live and die by commissions and slippage but offers hope of a smoother upward equity curve if set up correctly. The second is at HUGE risk of over-optimistic curve-fitting. You could change filter conditions, buy and sell logic just a little and have a huge effect on overall profit and returns.

I'm usually trading the second style of system, and becoming more interested in the compromise and trade off for performance versus risk. As such, have recently started to monitor MEDIAN % profit and loss during backtest work as the average values in Amibroker must be biased for system 2 - just one more trade appearing in that top right corner will skew average stats massively.

Only early days with this idea, but so far median % profit seems to nicely reflect parameter changes that increase profit, whilst median % loss tends to show a conflicting reversed optimal value for the same parameter to contain DD and open risk. The optimial point for each trader will vary depending on whether you wish to maximise returns, minimise risk, or balance the 2 at your comfort point somewhere in the middle.
 
Last edited:
To explain further, here are examples of plots for Median % profit per trade and Median % loss per trade - for optimisation runs on the value of a tight % trailing stop parameter.




From the perspective of minimising loss, a 7% trailing stop looks very nice thank you!
Obviously such a stop does choke off profit potential.

This isn't a great example as this tight trailing stop only cuts in during volatile market regimes and thus the upward slope of the profit curve has many other things affecting it.

But the point is, the choice/compromise that best balances risk and profit will depend on the individual, and that individual could be wildly mislead by over-optimistic blips in the % Profit graph if not very careful.
 
So this article (Brett Steenbarger) came out in May 2008, just prior to JPM purchasing Bear Stearns for $10/share.




Written just prior to the start of the GFC.

jog on
duc
 
Wow - that's a pretty amazing discourse on how wildy varying market conditions can affect real and perceived risk, reward and psychology.

Also shows how 2 people arguing if psychology is more important than strategy probably have 2 completely different sets of experience, style, expectation etc in their heads!
 
Hi Newt.
any comment is ok man. no need for forgiveness..
I trade the whole ASX with a few exclusions. (ethical reasons). My system is setup to buy anything above 5c and below $1000, that meets buy conditions.

I only use the XAO as an index regime filter.

As for the " NOT OnLastTwoBarsOfDelistedSecurity", that's definitely in my buy condition and also Sell= Sell OR OnLastTwoBarsOfDelistedSecurity
 
Initial testing of the NTW system

In starting to put things together and testing how the planned components of the system worked with each other, a few problems were highlighted. Problems are always expected but usually the ones that you get are not the ones that you originally expected. I’ve had to do a lot of fine tuning to basically align the elements of the system with each other and some major changes to the system as a whole.

I’m now doing the initial backtest using only one market, the SPY. If this works out well then I may be satisfied with leaving the system as a one market system. I have made changes to produce more trades, I hope it’s enough. If it’s a one market system I can increase my 5% per trade rule without exceeding my previous 30% account exposure for the system. If I increased my position size four times bigger I will still only have a system wide risk of 20%.

Another advantage of using the one market (SPY) is that this is a market that I follow on a day to day basis anyway, so it’s a very familiar market and I don’t even have to log onto my computer because the market is reported in the news every day on the radio and TV.

There has a lot of talk on the forum about making a system robust and not over tuning a system to a particular market or particular conditions. As with a lot of things in life, I think that both sides of the argument can be right and both can be wrong. What I mean in saying that is that I think a particular situation would need to be defined before determining which side of the argument would best apply to it.

I am planning to possibly use only one market for my system and I have tuned it to a degree to this type of market. What I’ve done is not something that won’t work in another market but something that may not get as many trades in another market as it would in this one. That will reduce profit in another market but won’t increase my risk. As I have said before, the most important factor is managing risk and in reading the forum posts, people are only making each side of the argument because they are of the opinion that their side of the argument is less risky.

When I do my backtest I won’t be testing 20 or 30 years and I won’t be testing from after the covid crash until now, I’ll just use a period that includes at least one market crash, a down turn and a sideways section of market.
 
@DaveTrade, if you're happy to put up your backtest results - please do. I'm sure you will get some constructive input from members on the forum regarding system design, market selection and backtesting results.
 

Great. So essentially you're trading close to the full "Fully Paid Ordinary" share universe of the ASX, not limiting to index participants.

Only put up the previous post as I've been badly burned optimizing XAO-only systems that would take wonderful trades on multi-baggers BEFORE they were even in the XAO universe
 
I’ll just use a period that includes at least one market crash, a down turn and a sideways section of market.
If i may suggest..before covid crash and my current short term optimisation, i used to do as you mention but in 3 different backtests one for each situation more than a single period encompassing the three phase.
this will imho give you a better understanding of various expected real life outcomes based on the timing of your system start within one of the 3 basic situations.
Hope i am clear enough
And this could point to parameter really well suited to some of the situations, more than a fit for all options
 
Yes I can do this when I finish the full period because I'm manually doing the backtest and I have written a spreadsheet to record the data and calculate the metrics, so when I finish I can simply extract sections of the spreadsheet into individual spreadsheets.

As long as I can get my required yearly minimum from the system I'll be happy, if some years it gives me a higher return then that's just a bonus year. That's the way I'm looking at this project. Thanks for your feedback.

PS: And Cam019 yes I will post my results
 
A description of "The Platinum Strategy"
This strategy is a "breakout strategy" that incorporates ..... "Volume weighted Moving Average" over two different time periods...."
Hi @Skate great to see that you are back and active.

Are you calculating the VWAP based on the EOD turnover amount divided by the daily volume ?

eg, VWAP = AUX1 / V;
Where AUX1 is Norgate data daily turnover in dollars.

Thanks
 
Hi @Skate great to see that you are back and active.

Are you calculating the VWAP based on the EOD turnover amount divided by the daily volume ?

eg, VWAP = AUX1 / V;
Where AUX1 is Norgate data daily turnover in dollars.

Thanks

I trade weekly strategies
@AussieStockDawg, What I can say for sure is that I don't use Norgate's AUX1 feature to show the "daily dollar turnover" in any of my strategies.

Skate.
 
A problem to solve

I’ve been trading in a discretionary manner, looking at and evaluating each market individually.

Which as you are probably realising is not the way to go. Markets are related, hence the rise of inter-market analysis in the '90's. Possibly (probably) even earlier.


Here I am making a couple of assumptions due to your not describing your 'tools'. The tools that I use are to (try) to recognise (via inter-market analysis) the macro-environment that the various markets (equity, debt, commodities, fx) find themselves.

I think it is true that a single mechanical system would trade all markets the same way. That is simply by definition. However there are many 'mechanical' (algo's) employed across the various markets and now even individual stocks or commodities.


I note that in your later post, you have decided upon the S&P500. Of course you could break this down to the 11 primary sectors that have ETFs. These of course break down into even further specialised ETFs. I'll give you the list of some.



Indeud!

jog on
duc
 

Sounds interesting.




The SPY is currently a tricky one. If you are simply going to trade SPY, fine. But if you are wanting to trade sectors within SPY, that is slightly different. If you are simply going to trade the individual stocks, that is different again. Obviously you already know this.

The advantage of just SPY is that you can put on size and easily manage the position. The disadvantage is that the % returns are simply the aggregate of the constituents. Everybody gets greedy looking at the 'what ifs'.


Which takes us back to your earlier post and market environments or character.


I am planning to possibly use only one market for my system and I have tuned it to a degree to this type of market.

Until it changes. By way of example a number of historical markets:




What I’ve done is not something that won’t work in another market but something that may not get as many trades in another market as it would in this one. That will reduce profit in another market but won’t increase my risk.

You seem to be implying a form of diversification will provide (some) risk mitigation. In quiet markets, that may be true. In meltdown markets, it will not. Correlations rise to 1.0.


As I have said before, the most important factor is managing risk and in reading the forum posts, people are only making each side of the argument because they are of the opinion that their side of the argument is less risky.

I haven't followed closely enough the various arguments.

However, those who traded through various markets that turned Bear (1987, 1998, 2000, 2016, 2018, 2020) know that the drawdowns when they come, come fast and are getting (apart from 1987) faster.

The only thing that saves you is correctly hedging. Of course that has a cost to your upside. Or, I suppose if you can predict the future.



When I do my backtest I won’t be testing 20 or 30 years and I won’t be testing from after the covid crash until now, I’ll just use a period that includes at least one market crash, a down turn and a sideways section of market.


See above.

jog on
duc
 
Thanks Skate for sharing the platinum strategy. I am trying to implement this in Amibroker as a practice based on you descriptions in this thread. However I was not able to get the result similar like yours (very bad result and don't even close). I must be missing out something or have totally different understanding. I will summarize my understanding of the buy and sell rules as below, could you please let me know if I am completely wrong?

Buy Rules
1. 20 period breakout:- C > Ref(HHV(H, 20), -1)

2. ADX is trending higher for several bar:- ADX(14) > Ref(ADX(14), -1) AND Ref(ADX(14), -1) > Ref(ADX(14), -2)

3. Ucler Index is going down and it is lower than 5:- ulcerIndex < Ref(ulcerIndex , -1) and ulcerIndex < 5

4. Index filter is on:- Index > MA(Index, 10)

Sell Rules
1. Ucler Index is greater than 5:- ulcerIndex > 5

2. 40% trailing stop if index filter is positive other wise 10% trailing stop:-
ts1 = 40;
ts2 = 10;
ts = IIf( IndexFilter , ts1 , ts2 );
ApplyStop( stopTypeTrailing , stopModePercent , ts , exitatstop = 2 );

3. 4X ATR multiplier profit stop:-
period = 10; // ATR period
multiplier = 4; // ATR multiplier
ApplyStop(stopTypeTrailing, stopModePoint, multiplier*ATR( period ), True, True );

4. Stale stop? If read from one of you message that you are using Ucler index (sell rule 1 above) as stale stop so I did'nt implement it.

Thank you.
 

@czehoul thanks for your interest & your simplistic explanation of the "Platinum Strategy" that I must say is close to the money.

The buy rule of a "20-period breakout" is just a minor part of the buy condition. Filters, parameters, & positionscore also have a hand in deciding which positions are selected. The selection of positions is critical to reducing false breakouts & profitability of the strategy



The red circled area on the parameter setting forms part of the buy condition as well as a "bullish indicator" not mentioned. If your version of the "platinum Strategy" has 1127 lines of code, I would pretty much say you have nailed it.

Stale stop? If read from one of you message that you are using Ucler index (sell rule 1 above) as stale stop so I did'nt implement it.

Nope, don't trivialise the "StaleStop" exit strategy. It's also pleasing when others talk about some of my filters such as the "StaleStop" exit strategy, the "GTFO Filter" as if they are mainstream.

StaleStop exit strategy is a combination of 4 exit conditions
The StaleStop exit strategy is placed in a loop to measure bar-by-bar calculations. Other traders simply exit a position that has not made a new high over a nPeriod of days to weeks. Personally, doing it that way is highly ineffective (IMHO). Using the "OR" function allows the "StaleStop" exit to be added to a trailing stop loop as the calculations need to be done "bar-by-bar".

The StaleStopExit strategy
(a) The StaleStop exits after a certain number of bars when there is a loss in momentum.
(b) The StaleStop also will execute after a percentile drop of the ROC filter over a "nPeriod" from the High of the entry price. (the buy price)
(c) A simple GMMA exit combined with a volatile BBO exit strategy is (simple & effective) without going into any detail.
(d) An "Ulcer Up" indicator is at the very heart of everything I'm trying to achieve.

In saying all this - as traders, we don't need a fancy strategy to make money. We just have to know when to enter a confirmed trend with strength & get out before the stampede. How you do it is up to you. I promote only the ideas that have worked for me. If they didn't work I wouldn't waste my time posting about them.

Skate.
 
After getting a massive response from ducati916, thanks for your interest BTW, I thought I should respond by saying where I’m at and what I see as a possible next step going forward.

I’ve been coding and recoding trade ideas and slowly increasing the number of trades that I’m getting from this in the SPY. One potential problem from doing this is that when you get more winners you also get more losers and I won’t know exactly what my stats are until I go through that first manual backtest. This first backtest is not intended to be a backtest of the final system, it’s just a step to get feedback in the process of designing the system. If I can’t get acceptable results from the one market then my intention was to test on the $SPX sectors. I would be hoping that reducing the number of trade types that I’m using to only the most reliable ones but over the multiple markets (the sectors), would then bring the backtest stats within an acceptable range.

I won’t have the money from selling my real estate until mid next year so I have about six to seven months to decide if I will use a mechanical system or continue with my discretionary trading in a more systematic manner. Whatever way that I decide to work this money in the markets I’ll be using a tested and retested systematic approach. Although I have many year’s experience in the markets I have never traded such a large amount of money (to me) before and I haven’t had to report to anyone before. This time my wife will be on the board of directors.

PS; Can someone tell how that you get those @userid's in blue put into your posts.
 
So that people better understand what I’ve been saying I should explain that I’m using a charting software called Trade Navigator which has a programming language called Tradesense. This allows a user to program just about anything onto the chart. This is how I’ve created my own indicators and how I’m able to program various trades. So that’s how I’ve been programming various trades for this system and seeing what they look like on the chart. I can even use indicators and functions that I’ve written for programming a trade.

The software does have a backtest facility but I prefer the do it manually. You can even trade from the chart but I’ve never gotten into all the software’s functions, I just use the broker’s platform to place trades.

The other thing that I’ve only mentioned once on the forum, and I think that may have been in a conversation, is that I intend on trading the A$-US$ as another market in this system, to act as a currency hedge. The difference is it wouldn’t really be a hedge because a hedge is something you lose money on, it will be a trade to make money and provide a currency hedge while doing it. I hope this post fills in any questions like ‘what the f* is this guy talking about’.
 

Here are 2 examples of sectors within SPY as they trade against SPY:




Worth considering.

jog on
duc
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more...