Have algorithms become more sophisticated
Beyond financial education, algorithmic trading strategies have other challenges, including overfitting (built for the backtest results), survivorship bias (picking stocks manually that we know have done well) and old-fashioned code bugs causing unexpected trades to happen, which can cost you plenty in live trading.
Writing an algorithm is challenging — so often they are pieced together from other scripts and code is shared by a team or community members. Joining together multiple scripts made by many different authors is a challenging and messy, bug-prone experience. These difficulties can cause bugs in live trading and increased development costs.
Algorithmic trading used to require a deep investment in infrastructure technology — the code that connected the exchanges, routed the orders and maintained your portfolio. Many software packages are already written and open sourced so quants can quickly jumpstart their trading. Today, it is possible to integrate with multiple brokerages and asset classes. It is now possible for retail traders to build robust trading algorithms at a reasonable cost.
Second, with the recent launch of various algorithmic platforms, such as QuantConnect, the algorithm development process can be sped up. Each component of a trading strategy has been abstracted so that they can be used interchangeably and team members can work more efficiently.
Your code/my code?
If you are using someone else’s code, does that negate an edge as that code is now considered a commodity?
The financial markets have a limited number of people buying and selling. If many people were trading the same strategy, the available assets for sale would be quickly used up and it would become less productive to run the strategy. Imagine you could predict a $2 rise in the price of Apple (AAPL). With Apple trading at $99, thousands of people are utilizing a similar algorithm to buy Apple. Those traders with the fastest connection with get in early and see profit, while those late to the game will only be able to get in after the move. Codes and signal needs to be robust, as most retail traders cannot compete on speed.
The core of a strategy might only be 100 lines of code; this alpha model is sensitive to being copied. However, every other piece of code in the algorithm (universe selection, portfolio construction, execution and risk management) can all be reused without a material impact on performance.
Trust the code
Algorithms require rigorous testing to ensure they work as expected. When this testing is done on historical data, the simulations are called backtests. This runs real stock prices through the algorithm to see how it might have performed at the time.
When the algorithm is completed, it is often tested on a fresh set of data, previously unavailable to the algorithm. This is called an out-of-sample testing. Ideally, the algorithm should perform predictably in- and out-of-sample datasets. If it doesn’t, that may be a sign of overfitting.
Finally, before putting live capital through the algorithm, it should first be paper traded with live data. This runs the same algorithm on a fictional brokerage account to confirm it performs as expected on brand new data and scans for any live trading bugs.
Historically, companies reduced building algorithms into building blocks of logic in code. This misses the fundamental financial concepts that quantitative algorithms should follow. Our intent with the framework was to instill good design concepts into the foundational code people are building from, to help them write robust strategies. The algorithm framework is unique in this regard.