Software forms the backbone of your strategy development process.
The following is my list of recommended software for automated strategy development and trading.
I use the ubiquitous Metatrader 4 (MT4) platform, which predominantly focuses on the forex markets. Most brokers offer MT4 as a free download. Its proprietary programming language (MQL4) allows traders to develop trading algorithms (called expert advisors in MT4) and custom indicators for the platform.
The Strategy Tester module can run backtests up to tick-precision, and it even includes a visual mode that shows the algorithm running over the price data in real time. I have fixed many programming bugs with this feature. The chart below shows an Ichimoku strategy being backtested.
Feel free to check out my step-by-step guide on how to use MT4’s Strategy Tester to debug and backtest your strategy.
To learn how to optimize your strategy parameters in MT4, check out my guide here.
Metatrader 5 is also available. Apart from having better inclusion of the stocks and futures markets, MT5 is multi-threaded and thus runs backtests more efficiently than MT4. Nonetheless, as of 2020, MT4 is still the most popular forex trading platform.
Converting your trading idea into an executable program is the cornerstone of algorithmic trading. Metatrader 4 comes bundled with its MQL4 language editor that allows you to code your algorithms from scratch. Learning a new programming language is a daunting task for many though.
Fortunately, I have AlgoWizard to satisfy my programming needs. It is a visual strategy builder that allows you to easily input your trading logic without any actual programming. Practically all the strategies discussed in my blog posts are programmed using AlgoWizard. The example below shows a simple Bollinger Band strategy being programmed.
AlgoWizard offers a FREE plan that gives you full software functionality, albeit with some backtest limitations.
The full version is included with StrategyQuant (described below), but you can also purchase it separately. Don’t forget your 20% discount by using coupon TACT-AW.
Strategy Generation/Robustness Testing/Analysis
Nowadays, StrategyQuant has superseded MT4 for the vast majority of my strategy development. It is a comprehensive platform that can fulfill every step of my development process.
Your strategy can be easily programmed using AlgoWizard, or you can harness the efficiency of StrategyQuant’s genetic algorithm to automatically generate profitable strategies. Below is an example of a basket of GBPJPY strategies being generated.
Once you specify your strategy building blocks and performance criteria, StrategyQuant’s Builder will iterate through millions of combinations to produce a profitable strategy.
I provide a complete guide on the strategy building process later on in the roadmap.
Strategy Robustness Testing
As mentioned in the basic concepts section, robustness is a central theme in strategy development.
Each backtest only represents a single run over a particular segment of historical data. Since markets are always evolving, your strategy’s backtest performance is unlikely to be exactly replicated in future. Robustness tests give you an estimate of the risks and performance deterioration you can expect to encounter in live trading.
StrategyQuant includes a number of inbuilt robustness tests, ranging from out-of-sample testing to walk-forward optimizations and Monte Carlo simulations.
The inclusion of these robustness tests in your development roadmap will help you weed out weak strategies long before you risk real money. I always include some robustness testing in my strategy development, since robustness (or the lack of it) can take months to be reflected in live trading.
As an appetizer, here is StrategyQuant’s Monte Carlo randomizer in action. We will use it to estimate worst-case drawdowns later on.
StrategyQuant comes bundled with a strategy analysis tool called QuantAnalyzer. Analysis like the one below will be helpful when deciding on time-based entry filters and exits for your strategy.
QuantAnalyzer will be referenced at various points throughout the development process, for example during forward testing and portfolio composition.
There is also a FREE version, where you can obtain detailed analyses of your MT4 backtests, merge strategies to create a portfolio, and experiment with various trading filters and money management rules.
The inclusion of these three key functionalities in a single platform makes it both easier and faster to produce profitable and robust strategies.
If you’re interested to explore all the cool features above, don’t forget to take advantage of StrategyQuant’s 14-day free trial.
To purchase StrategyQuant Pro, use coupon TACT to get USD 200 off.
StrategyQuant Ultimate even comes with a Business module that helps you sell your strategies on the MQL5 Marketplace.
To purchase StrategyQuant Ultimate, use coupon TACT-ULTIMATE to get USD 300 off.
Accurate price data is essential for reliable backtesting. A good dataset covers a long historical period and contains minimal gaps. As of 2020, you should have little trouble obtaining at least 10 years of data for liquid forex markets.
Many forex brokers provide free historical data at 1-minute precision, which can be downloaded through MT4. This means the OHLC prices for every minute in your historical period can be modeled in your backtest. I have found success with Alpari data, shown below in MT4’s History Center. For the forex majors, data since 1999 is available.
A guide to downloading free historical data can be found here.
If you want to maximize your backtest precision, you will have to use tick data instead. You may require such precision if your algorithm takes advantage of small price movements, or often executes actions in the middle of a bar.
StrategyQuant includes a data management module, QuantDataManager, allowing you to download/import data from a multitude of sources.
Since I mainly trade forex, I download both one-minute and tick forex data from Dukascopy, for use during the strategy generation and robustness testing mentioned above. This tick data can also be exported to MT4/5, allowing you to run 99% quality backtests in MT4/5.
Tickstory and Tick Data Suite are another two popular providers of tick data. I have used Tickstory with success.
To learn more about whether you require a tick backtest, and some sources of quality tick data, refer to my article on tick backtesting.
If you are trading a decentralized market such as forex, note that data will vary slightly from source to source.
So there you have it! You’re now all set to dive into the exciting world of algorithmic strategy development.
But first, it pays to understand the markets you’re trading. This will help you focus your development time and effort on the most promising markets.