How To Develop a Trading System Part 4

See other posts in this series…
[catlist id=2 numberposts=3 pagination=yes] NOTE: This is THE most important step in the entire development process!

I’m not kidding. And it’s the lengthiest, and for some, the most boring. That’s because it is like a factory assembly line, you’re going to do repetitive tasks, over and over, until your eyes bleed!

So, what’s the benefit? You’re going to create a continuous supply of winning algorithms that will make you money, without a lot of the roller coaster emotional rides most traders go on, with severe draw downs, and price shocks and surprise Fed announcements. And the reason why…because you spent the time testing, testing, testing.

Remember, you need multiple non-correlated strategies running concurrently, to get the best possible results. So we need to find great team members, just like the scouts of a major league baseball team do, by going through a huge number of candidate players, and reviewing all their stats. Remember the movie Money Ball, with Brad Pitt and Jonah Hill?

Jonah Hill played the part of the statical, Peter Brand. Now, I don’t expect you to become a super geek, just know some basic stuff, and stick to a plan.

So, what’s involved?

  • Read Equity or P&L charts
  • Evaluate performance statistics
  • Categorize strategies by type and potential

What’s your purpose?

To test a large number and wide variety of strategies, and identify the cream of the crop. And do it continuously…this process has no end.

Why does this process have no end, there must be a conclusion, right?

No. That’s because strategies, no matter how good, won’t last forever. Even the best strategies will either outright fail, and be no longer useful, or will go through extended periods of draw down.

This is because nothing is static in this world, especially in the financial markets. What works today, may not work tomorrow due to a limitless variety of causes, like a product goes out of favor, a law impedes the operations of a company, a CEO is caught with his hand in the cookie jar, the Fed decides to confiscate your 401K money…err, you get the picture. Anything can happen, and it will happen, so you must be prepared by always having strategies ready to go.

This is the essence of Algorithmic trading. But just in case you’re wondering, it’s really not that hard, it’s more boring than anything else, but extremely profitable. The time you spend here will get banked and multiplied. And with compounding, will probably make you rich.

NOTE: if you are a licensed user of my Auto Traders from the Programed Trader, you won’t have to do this stuff, that’s what I do. But, if you wanted to learn, I will teach you as part of the service.

Back Testing and the Forward Walk

One of the most repetitive things you will be doing is back testing a strategy by inputting a range of values to test, and a time period to test over, and then let your platform automatically run through all the data and apply the values and try to find the most profitable combination of configuration of your strategy.

Sometimes, you won’t find ANY combo profitable, so you may decide to scrap that strategy, or try it on some other asset class. Maybe it will work on index funds or commodity ETFs, but not technology stocks, for example.

At the conclusion of the backtest, your system will present the stats and various charts so that you can visualize the performance, like this equity chart.

code-equity

This is a strategy I call The Code, applied to the Gold ETF GLD in the 10 minute timeframe. All these identifying characteristics are used to categorize the strategy and the individual tests.

code-performance

Here’s the performance statistics, that tell me even more information about what I can possibly expect from this strategy. I say possibly, because it’s not a certainty. These stats represent how the strategy performed in the past, they are not a guarantee as to how they will perform in the future. This is why we do the forward walk.

Forward Walk Testing

If we back tested 5 years back to the present day, we would get certain results for what happened in the past 5 years. And by continuously changing the parameters and retesting, I could find optimal settings that make the strategy look like a winner. But this is bad, because it’s like being a conspiracy theorist that makes a conclusion, then finds facts that fit the conclusion.

So, I have to do something better. I have to give the strategy data that it has never seen, and see how it performs with my settings. The way we do this is by backtesting a period in the past, say 2001 to 2005. I get my parameters to give me the results I like for that period, then I take those same parameters and back test a period from 2005 to 2008, and see how the strategy performs., then again for 2008 to 2011, and so on.

This is called forward walking. The new tests are using data that has not been used to create an optimized test. This is called “out of sample data.” This is extremely important…because if your strategy can work with out of sample data, the same way it worked with optimized data, then there’s a good chance it will work with future data.

Forward Walk is NOT a Panacea

This is a good way to test, but no guarantee, not until you actually have the strategy running with realtime market conditions, in simulation mode, for a lengthy period of time, say weeks or months. And even this is not perfect, not until you run the strategy with actual money in real time. But, it’s the best we can do. So, we do it.

There are other tests we can do, but they are beyond the scope and time I have to write here, like a Monty Carlo simulation.

I haven’t even scratched the surface here. There’s so much more to know and to evaluate and to categorize, then there’s the whole methodology, which is kind of like the scientific process, and then the continuous improvement process, so that you constantly get better at your testing and eliminate wastes.

I could go on and on, but I’ll spare you.

If you want to learn more about what I do, and how these things make the Programed Trader systems superior to your manual trading, quite frankly, superior to any human’s manual trading, then click here, fill out the form and I’ll give you a demonstration.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.