How To Create A Winning Trading System  Backtesting


The phrase: 

“If you give a man a fish, you feed him for a day. If you teach a man to fish, you feed him for a lifetime. 

That is the perfect phrase when it comes to trading. 90% of traders simply do not have a trading system and mostly rely on purchasing subscription services, as well as trading tools to help them make money in the market (neither of which works, especially incorporating options trading). 

If someone has an actual trading system they will not waste time selling it, they will be busy making money with it and trying to improve it.

It is up to the individual to trade for themselves and not depend on others (especially on Social Media, where almost all stock traders deceive). Therefore it is imperative if you want to be a successful trader you must have your own trading system. 

It's perfectly fine if your trading system starts out not making money, or makes very little. As long as there are gradual improvements, it could take years to make a winning system. But once you get there, you will be in control of your own destiny when it comes to your stock trader career. That is key.

In this article, I will be talking about, how to use a backtesting tool to come up with a trading system to generate an edge. I will not disclose my edge (as the more popular it is the less of an edge it becomes). But we will go over how to use the tool, as well as a starting point to generate a trading system where you can refine and eventually make a winning trading system.

Please note this article uses TrendSpider's backtesting software (use code CL25 for 25% off) which is the best I've seen in the market. Feel free to use the affiliate links listed in this article as they help support my free websites.

How to Backtest Stock Trading System

Here is the layout and toolset I am using on TrendSpider's website

how to use trendspider backtesting strategy tester tool tutorial



As noted on the left, there are several examples to follow and start out with, you can run them against buying and hold and see if it ever beats that strategy. However, in this article I will go over a starting point I am more comfortable with.


Creating A Trading System

Before we start there is a couple of key points that need to be understood. When you are creating a trading system you are comparing against what that trading system makes versus buying and holding.

You will need two types of strategies the first one is a buying strategy and then a selling strategy.

Additionally, we want stocks to test our trading system. For my own personal taste, I like to test with the ETFs $SPY & $QQQ. Then I love to answer the question: If my trading system would have captured more gains versus buying and holding when it comes to Amazon Apple Tesla Facebook and many other amazing companies throughout the last decade.

Then I'd like to test it against the most traded/popular/most gained stocks of the year. Making sure the relevance of the trading system has not faded, and it still can make money in this current stock market climate. Because you will always always have to adapt, never forget that!

How To Technical Indicators To Make Money

As if it isn't apparent yet, trading will solely be done using technical indicators. In this blog, I've mentioned my favorites countless times.

For the barebone of this tutorial, we will be starting out with the 5/10 EMA crossover (which was first introduced to me by Steve Burns).

Then we will add Bollinger Bands to our system and see how that goes in improving the system.

But remember the sky is the limit, you need to be creative and think outside the box when it comes to trying to make money trading stocks. This article's goal is to give you a good foundation for your long journey of making something work for you and fulfilling your trading dreams.

Because quite frankly you can spend all the money in the world on services and systems and you will never come up with anything satisfactory unless you put in the work.


The Stock Trading System

Let's start out by simply trading the 5/10 EMA cross-over. I love this strategy since it really helps identify short-term momentum.

So we will buy when the 5 EMA goes ABOVE the 10 EMA, and we will sell when the 5 EMA goes BELOW the 10 EMA.
 

trendspider strategy backtester
So here we are using the daily time frame, for day traders or swing traders you can change them to different settings (maybe hourly for day traders, and weekly for swing traders).

We then have both an entry & exit condition. This is one of the simplest trading systems you can come up with where we just use the 5/10 EMA cross-over and purchase at the close, and when the 5 crosses down the 10 we sell. Take a look at the picture above to see how I set it up. 

Now, let's see how well this strategy does testing with QQQ, on the picture at the top you will note we are using "5,000" candles of history. That's basically 5000 trading days which is roughly 20 years of data!

Check out the results below for QQQ.  Over 19 years, a 5/10 EMA strategy would have resulted in a 232% return, however, if we just bought and held QQQ it would have returned 1480%! This strategy we just tried is a bust and a horrible idea.

backtesting results trendspider


There is also a detailed breakdown, of each trade. Note each trade resulted on average a measly return of .67%., which to emphasize is <1%.

Looking over the Tabular Data in the image above, we can conclude we are getting whipsawed a bit. Keep in mind this trading system is profitable but it's not beating the market at all, which is what really matters. In fact, it's 6 times less money! This is assuming you have perfect entries as well as 0 commission.

Now, let's iterate on this system. I love Bollinger Bands, let's add an additional entry when we hit the lower Bollinger Band we will consider that a buy point as well.

Backtesting via Lower Bollinger Bands

The results are much better now. Now we have two entry points (either the 5/10 EMA crosses over or when the price touches the lower Bollinger Band). Running it through TrendSpider's backtesting software we are neck and neck with buy and hold 1342% (ours ) vs 1474%. Buy and hold is still winning. Which is not surprising. It's almost impossible to beat buy and hold, which has been proven time and time again. The results and stats are shown below for this strategy.

Trendspider Bollinger Band Backtesting software test

Now here's the thing, I indeed have a system that does beat the market in real-time, that I've been using and modifying over the last decade. However, it is proprietary as mentioned previously. I will leave it to you, the reader to use similar software (or use TrendSpider use code CL25 for 25% off) to create a million-dollar maker of your own.

There is just so much to test and add when it comes to TrendSpider's tools, it would be information overload, After all, there are trillions of combinations you can come up with in terms of a trading system. Hopefully, this is enough to get you started in using the tool. Make sure to read this article several times as I have left a few tips and hints that will help you accelerate your trading goals, as well as follow all the links I have put in this article that give more in-depth information.



Key Stock Trading Tips

Certain strategies work way better on certain stocks than others. I like to call this "capturing the frequency of a stock/ETF". As they all trade a little differently. Being able to identify this as fast as possible can make you a lot of money. For example, I've come up with trading systems that beat QQQ buy and hold but do not beat buying and holding the SPY ETF. You will also need to recognize your system stops working and turn into a losing system! Your system will eventually change whether within a month, a year, or a decade, always be on the lookout and review your trades! Especially your losers.

If you haven't noticed already volume is absolutely a useless indicator. It irritates me to no end how many people babble about volume. If you think I'm wrong, feel free to add volume into your trading system using the back tester, and see if it won't make a difference (call me out if you think I'm wrong at chartlearner@gmail.com)! Also, note on the final trading system of this article we almost broke even with QQQ and we did not use any sort of volume indicator.

TrendSpider also offers tons and tons of indicators and options. For example, you can consider the state of the prior day, and also provide a margin of error so you don't sell prematurely (i.e. for a crossover, only sell if the 5 EMA dips 2% below the 10 EMA), and so forth. All these little tweaks can actually turn an average trading system into something that could rival buy and hold, which is the goal right? All the little details matter! I'd advise you to watch all the tutorials on their backtesting software, as well as get super comfortable using it. In other words, expect a learning curve. The more you put into it the more money you will make. Eventually, your system will try very hard to improve after a certain point, but that only occurs with the most studious of traders. 


Conclusion

It is imperative to your success to come up with a winning trading system, a backtesting tool is absolutely a must when it comes to making money in the stock market.  Using a backtesting tool will either make you realize you cannot come up with a winning trading system and hopefully make the rational decision of buying and holding (instead of losing)...or you will be that rare trader who actually comes up with an amazing system and you fulfill all your trading dreams.

Make sure you read up on my other article on How To Create A Trading Edge, as both these articles work in conjunction to maximize your trading skills.

Also, don't forget to sign up for TrendSpider (with code CL25 for 25% off). Again please use the link affiliates on my website as it helps support my free site.