Simulation Results for Weekend Trend Trader on Brazilian Stocks
After I read all those books and started coding the Weekend Trend Trader on AmiBroker, I executed various simulations for Brazilian Stocks. As I said before, I used Robert Pardo’s Walk Foward Analysis to evaluate the strategy.
I thought I’d post the simulation results here because it shows how much work you have to put into something if you want to make it work even if it is based on someone else’s work. Now I am not saying this strategy will work but after running all these tests I am confident. I am making a bet that it will. What will happen if this goes bad? I’ll loose a few thousands. Does this worry me? Nope. First because I am only risking a portion of my funds. Also because I believe I need to go through this phase where my main focus is on learning not on making money.
In this case I am risking only 2% of the account on each trade. I believe the advisable amount to risk is usually 1%, I decided for 2% because in the tests I noticed I wouldn’t be able to trade the standard lot sizes with only 1%, it would restrict me to only the cheapest stocks.
I selected all stocks on the IBOVESPA index which contains the most liquid stock of the Brazilian market. I did exclude some that represent the same company but are different type of stocks. All the simulations were run taking into account a tax of R$5,00 per trade, the results shown here already have the tax discounted.
I used the operator CAR/MDD (Compounded Anual Return / Max Drawdown) to select the best parameters for each year. I chose this one because it is exactly what I want, the maximum return with the least drawdown possible. I ran in sample simulations followed by out of sample with the best parameters found on the previous in sample. The simulations were done with an account of R$40.000,00, which is what I planned to use for live trading. The simulations were done with AmiBroker.
Keep in mind that each simulation starts out with 40k, the returns from the previous simulations are not added up.
Here are the results:
I started investigating the worse profit years. The year 2000 was run with the best parameter found for 1998/1999. So the first thing I did was find the best possible parameter for 2000. Here’s the result for the best possible parameter for 2000:
That shows the out of sample data was not that far off. I decided to look at the IBOVESPA graphic for the 2000 to see what was going on, and there it is, there was no trend, the market moved sideways. Also, remember that this system only goes long only so it should be out of the market when there is a clear down trend.
I ran a back test with the parameters as they were run on the out of sample data for the year 2000 and I found that of the 25 trades it entered only 6 were profitable, all the rest exited with a loss. Since this was a year with no clear trend I decided that this result is not bad. This kind of system is expected to have drawdowns. In this bad year the strategy only made -15,28% max drawdown.
I then decided to look into the other years that had poor performance: 2007/2008 and 2010/2011.
I’ve already expected to have negative returns on 2007/2008 because of the big international crisis. These are in-sample results, so the parameters are already the best you could’ve taken from those two years. I ran them separately to get the best results for each year:
Ok, so when you run them separately you get better results from when using a set of parameters for both years. But I guess there is no escaping this right? It will happen when I run this system live, I cannot expect to run with the best possible parameters each and every year.
Next, the 2010/2011 is also an in sample period:
Wow, if you run the best possible parameters for 2010 and 2011 separately yoo get worst results. This is curious. I ran the 3 tests separately to see what trades were being done.
Best parameters for 2010:
After analyzing the parameters for each case I noticed that the simulation that includes de 2010 and 2011 years united are actually more restrictive, it enters a position if the stock has risen about 15% more, that eliminates many false entries and in fact it only does 10 trades for the whole 2 years. Analyzing the chart for 2010 and 2011 IBOVESPA index you can see that the market was not on a clear up trend and in fact in 2011 it started on a downtrend:
After analyzing all these results I decided to give this trading system a try, here are the reasons:
1 — The maximum system drawdown experienced was round 16%, I believe this to be a good number and one I can live with when live trading.
2 — The system showed some impressive results on the past and a decent 35% return on the last two years.
3 — I really do need to trade live to get a feeling if I can actually handle this, I figure this system is as good as any.
Am I doing this right? I have no idea, I’ll figure it out as I go. I do appreciate any comments that might lead me in a better direction :).
Next up: the results from live trading.
Some explanations:
In sample data: data used to select the best possible parameters for the strategy
Out of sample data: data on which the tests were not run before.