38. Paper Trading

Published at 1683736497.781181

Paper trading is the first stage of forward testing. Future data is unseen data. Paper trading thus eliminates overfit from backtesting and the parameter optimization phase. In addition, all transactions in this stage are at the present. We can observe each closely and see the context clearly. It’s easier to deduce and explain the algorithm’s behaviors and its efficiency, thereby improving its performance. In practice, this stage typically lasts 2 months. Below are key points of paper trading to keep in mind:

  • Ensure consistency. Do not update, or change the rules, or any algorithm parameters. Any small change in this phase can completely lose the meaning of the testing process: the future data set then becomes equivalent to the past data set. Paper trading becomes the optimization phase. In the necessary event that a new rule or parameter adjustment is required, one should consider restarting the entire testing process.

  • Ensure real-time. Simulation in paper trading should be closest to real environments. The only difference is the order matching results returned from securities companies and any price slippage incurred. Taxes and fees should be fully calculated. Ensuring real-time records help algorithmic traders have an accurate, intuitive view of the algorithm. If any transaction is delayed compared to real-time, the difference between forward testing and backtesting will no longer be meaningful.

  • Build test criteria prior to starting. The algorithm is tested to assess its ability to generate stable profits in the future. Paper trading also assesses the similarity between backtesting and forward-testing results. All the criteria need to be defined so the algorithm’s performance can be verified upon completion.

Figure 16 illustrates how an algorithm is evaluated in the paper trading phase.

 

 

At the end of paper trading, the algorithmic trader can test the similarity between the trading performance of the out-of-sample and in-sample data, besides the algorithm’s profitability. At the same time, they can estimate the risk and performance of the algorithm as well as reasonable expectations when the algorithm operates in real life. They can also calculate the Kelly criterion and the algorithm’s compatibility with the current system to make the final decision.

Note that a good trading algorithm still has bad time periods when it cannot be profitable. As long as the algorithm behaves similarly for past periods with similar current market conditions, its future profit potential should still be considered.