Portfolio back-testing is by far one of the most underrated tools in an investment manager’s arsenal. Through this process, traders and investors can collect data that allows them to combine dynamically different strategies, allocations, and instruments in order to investigate which idea works best in particular conditions.
Such a process is so vital to achieving the best results that practically all professional traders and financial companies use it to test their investment strategies before taking them to market. This is especially important in today’s financial markets, where the percentage of trades conducted electronically over the internet is increasing at an unprecedented rate (1), leaving little time for investment managers to react in real-time.
It’s good to keep in mind that portfolio back-testing can only be conducted using specialised software and the correct hardware, but unlike what many traders may think, not all options are either off-the-shelf or completely unaffordable.
Portfolio back-testing is a process through which a holistic portfolio strategy can be implemented upon multiple instruments combined in a single portfolio, allowing you to apply managed rules at a portfolio level. In this case, each investment strategy can be tested using historical prices and other market data; while the allocation of rules at portfolio level can be tested to improve the overall performance. This gives investment managers a clearer idea of how their securities would have fared based on certain investment decisions and behaviours during the tested period.
A proper portfolio back-testing exercise should be conducted in an environment that is representative of the real market. For that reason, both the external (market changes) and internal (your process) elements of your testing should be relevant and updated to ensure accurate results. To achieve this, financial companies require huge amounts of data, ranging from the money allocated to each asset to the risk parameters at portfolio- and strategy-levels at intraday levels.
Performing portfolio back-testing is a complicated process that requires powerful software to run. Realistically, it is not something that humans can do manually. Instead, what is needed are carefully coded algorithms that mimic user intent depending on the variables at play.
The following are among the most important elements used to manage a successful financial portfolio back-testing process.
A wide variety of criteria is needed to properly conduct such processes. These include:
From a data perspective, the portfolio back-testing software needs to manage all this information for each single asset strategy being back-tested. It also needs to have the ability to combine them with the aggregated information of the portfolio to give investment managers a clearer idea of how their strategy would have affected their portfolio performance and behaviour in that particular set of circumstances presented during the tested period.
In addition, the aggregated data at portfolio level must be analysed before rules that manage allocation and risk parameters can be applied to it.
One element of portfolio back-testing is the decision-making process, which basically sees the software conduct automated trading on your behalf based on:
This sees your financial strategy being turned into a series of mathematical formulae and rules that outlines the parameters’ values, allowing it to sell, buy, or hold on to securities depending on your decision-making process.
For the software to conduct this process, it must be fed copious amounts of historical data, including that for:
For the process to be accurate, investment managers require the highest, lowest, open, and close prices and volumes traded for each asset at various points throughout the day at a one-minute timeframe.
Certain off-the-shelf portfolio back-testing software gives you these at five points of the trading day, namely the start, the end, the top, the bottom, and the total volume mark. Nevertheless, this does not really offer a real-life representation of market prices, especially during periods of high market volatility.
For that reason, one-minute-level historical highest, lowest, open, and close, volume traded for each asset is recommended.
The ideal data source needs to also include the bid-and-ask prices of the market at one-minute timeframes. During difficult market conditions, the spread is typically wildly different to the standard or the average, so working with book prices allows for better back-testing of the strategy behaviour.
The best solution here is to work with the tick data of the traded prices and the market book, but this requires large amounts of data to be processed. Due to this, the computational power required is high, and so are the costs associated with it – both in terms of time and hardware resources.
The whole idea of portfolio back-testing is to understand how you could tweak your investment strategy to, hopefully, achieve better results in the future for your portfolio and allocations.
Some types of artificially intelligent software come with machine-learning capabilities, which results in the algorithms being automatically modified based on your training set performance criterias.
When machine learning is applied at portfolio level, the software that runs the portfolio back-testing needs to apply the machine-learning test exactly when it is required. This does not just synchronise the whole process, but also helps manage all the strategies according to the information delivered from the machine-learning test.
The Monte-Carlo analysis – sometimes also referred to as the Monte Carlo Simulation – is a process that helps predict the effects of random variables on a security (2).
During financial portfolio back-testing, this simulation can be used periodically to get a better idea of how unpredictable variables would have affected an investment manager’s portfolio and use the results to amend their investment strategy.
The right software can usually do this automatically and use its computational capabilities to customise its algorithms to an investment manager’s specific portfolio and strategy in the hopes of helping them achieve better results in the future.
As discussed in the section about machine learning, synchronisation and dependencies between processes must be managed accordingly.
With all this in mind, it is easy to see the benefits of portfolio back-testing: while previous results are no guarantee for future outcomes, exploring how your investment strategy would have affected your portfolio in past scenarios can give you a better idea of expected portfolio behaviour and what you need to focus on to improve investment criteria.
Nevertheless, using the right software with one-minute-level back-testing capabilities comes with even more rewards for the users.
Sadly, nothing comes without its pitfalls, and portfolio back-testing is no different. So, while it can indeed improve a financial company’s performance, there are still several factors one has to take into consideration.
Once you have acquired your software and the proper hardware to run it on, it’s time to run a portfolio back-test. Here is how it’s done.
To run a proper portfolio back-test, investment managers will first need to calculate all the variables required by the position-sizing formulas they will be using.
For those who are not as proficient in the trading lingo, the position size refers to the number of shares, contracts, or units being bought or sold in any given trade. As one may assume, there are several position-sizing methods used in the industry, including fixed size, constant value, percentage volatility, margin target, and leverage target position sizing.
Each position-sizing method requires different variables, but one thing that unites them is the requirement to calculate any variables at any point in time. In addition, the position sizing rule must be applied pre- and post-trade, so the software is required to manage both during the back-testing process.
Identifying your risk parameters – in other words, how much you would be willing to lose – is an integral part of running a portfolio back-test. More importantly, this needs to be encoded into the back-testing software so it can be applied both pre- and post-trade.
The portfolio valuation is the result of all the valuations initially applied to each constituent in the portfolio (i.e. each trade).
In this case, having intraday valuations requires much more computational resources than a back-test on a single end-of-day valuation would as the latter uses the official market close price or settlement price. Even so, intraday valuations can make a huge difference to the outcome of your results, particularly when the bid/ask prices are used instead of the last traded price. This is why we urge investment managers to take this step to figure out what they would do in real-time to properly value the position and manage cases given a particular set of circumstances.
A portfolio back-test is made up of a multitude of strategies being tested in parallel to each other. Nevertheless, these strategies may require different amounts of calculations, may have different rules applied to them, and may require different amounts of time to be completed.
Once it comes to synchronising the status of each strategy at the chosen timestamp, things may start to become somewhat complicated: should they be synchronised at one-minute timeframe before moving to the next minute simulation or not?
Most investment strategists prefer working with one-minute time frames as these are closer to the behaviour experienced during real-time trading. This doesn’t apply for high-frequency trading, of course, but while it is possible to synchronise processes with a timeframe below one minute, the data sources must be provided at a per-second- or tick- level.
Some larger corporations may want to take it down to the second, but this requires super powerful computers and longer spans of waiting time, both of which may not be afforded by small-to-medium enterprises (SMEs).
Finally, do keep in mind that your portfolio status should be periodically calculated at one-minute timeframe, which means that all processes must be synchronised and completed before the next minute is processed.
The whole point of running a portfolio back-test is to have valuable data at your fingertips so that it can help you update your general investment strategy, such as by amending gross and net market exposure, leverage, margin, volatility, drawdown, and return. It also helps you understand how particular market events may have affected any of these elements.
Good portfolio back-testing software should provide users with all this information in an easy-to-understand format, but it’s up to the investment manager to analyse it and understand how it can be used in the future.
While some investment managers may opt to run just one portfolio back-test, the reality is that several are needed to have a proper understanding of how different parameters in your portfolio strategy would fare under different market conditions.
So, while this may take time and heavy calculations, the data you can create by returning to Step 1 and repeating the process with different variables could be invaluable.
Finally, managers should also keep in mind that portfolio back-testing software and the hardware it runs on need periodical monitoring, maintaining, and improving to deliver the best results.
In other words, while automated portfolio back-testing does save time and reduce risk of errors, it must be updated and maintained to ensure long-term success.
Portfolio back-testing must also be done periodically to compare the real-time behaviour. This lets you identify any possible improvement to close the gap difference between live and back-testing.
An important point to note is whether you should opt for off-the-shelf software that can run portfolio back-tests or customisable portfolio back-testing software that can be tailored to your specific needs.
To help investment managers do so, here are the main differences at a glance.
|Off-the-Shelf Software||Customisable Software|
As we near the end of this comprehensive guide to portfolio back-testing, there is one question that may remain unanswered: who should conduct portfolio back-testing?
Portfolio back-testing is the same process football coaches undertake on a regular basis: they sit down, rewatch their team’s matches, and make detailed notes about the strengths and weaknesses experienced in each game to create an overall better and more coherent strategy.
With this in mind, the answer is that any investment manager who would like to understand how their strategy may be impacted by market forces should run regular portfolio back- tests – at least if they would like to improve their strategy and potentially achieve better results in the process.
Of course, we can’t ignore the fact that portfolio back-testing always requires specialised tools, be it off-the-shelf software or the customisable variety, and that it may not always seem like an affordable option. Nevertheless, as outlined above, the benefits ensure a return on your investment and, with the right hardware, software, and team, you could be saving valuable time, garnering better data, and improving your performance overall.
Our advice is to look at all the possible options before committing to one method and to speak to companies like ours to get a better idea of what’s out there and how this could help improve your investment strategy.
Wakett is made up of a team of experts from the financial and software fields. Our articles are based on experience and expertise, as well as primary and secondary sources.
(1) Statista. (n.d.). Forecast of the global online trading market 2028. [online] Available at: https://www.statista.com/statistics/1260026/forecast-global-online-trading-platform-market/. [Accessed 17 Dec. 2022]
(2) Kenton, W. (2019). Monte Carlo Simulation. [online] Investopedia. Available at: https://www.investopedia.com/terms/m/montecarlosimulation.asp. [Accessed 16 Dec. 2022]