Skip to content
Wakett-Portfolio Back-testing at One-Minute Level

Portfolio Back-testing at One-Minute Level

What is it, and how can it help your financial investment strategy?

Table of Contents

Introduction

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.

Key Points:

  • Portfolio back-testing is the process through which investment managers test portfolio performance and their investment strategies against historical prices and scenarios.
  • This process is conducted using specialised software that can run heavy calculations and issue a report explaining the strengths and weaknesses of portfolio performance and strategy behaviours tested under certain market conditions.
  • Off-the-shelf software can be used to conduct more generic back-testing, while customised software allows traders to home in on the details.

What Is Portfolio Back-testing?

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.

How Does Portfolio Back-testing Work?

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.

Portfolio Back-testing at one-minute level Gross return and Net Leverage0

Criteria

A wide variety of criteria is needed to properly conduct such processes. These include:

  • Which assets and instruments are to be invested in,
  • The allocation size of the said investment and related sizing rules,
  • How the evolution of the portfolio valuation and market condition could have changed the individual exposure to an asset,
  • How the portfolio volatility and risk parameters could influence the exposure to a single asset,
  • How the correlation between assets influences the investment rules; and
  • How the liquidity of the asset influences the allocation limits.

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.

 

Decision-Making

One element of portfolio back-testing is the decision-making process, which basically sees the software conduct automated trading on your behalf based on:

  • your strategy, 
  • your risk controls, 
  • the historic market prices and data of the period you opt for, and 
  • any configurations applied.

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.

 

Data

For the software to conduct this process, it must be fed copious amounts of historical data, including that for:

  • the specific period you are looking to back-test your portfolio in, 
  • the historical prices of your assets at that point in time, and 
  • the market data needed for the strategy throughout that period.

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.

 

Machine Learning

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.

 

Monte-Carlo Analysis

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.

The Benefits of Using Portfolio Back-testing

 
   

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.

  • Test Allocation and Sizing: In the same way that musicians in an orchestra need to work together to create a harmonious sound, so do investment strategies and instruments need to come together to ensure cohesive portfolio management. In other words, when multiple investment strategies and instruments need to be combined into a portfolio, the allocation rules and related sizing are crucial. It is only through portfolio back-testing that one can investigate how the allocation and sizing works best.
  • Unlock Intraday Details: By running financial portfolio back-testing with intraday data at one-minute time frames allows users to unlock intraday details that would otherwise be impossible to determine. This intraday data needs to include the highest, lowest, open, and close price and volume of each security at every minute of the idea – ideally with bid/ask book prices, too. Through this, the results can be a world away from those produced by software that works on daily data.
  • Manage Volatility Spikes: Tying in with the above is the ability to better manage volatility spikes. This is because, during market turmoil, market behaviour can become erratic and daily highs, lows, open, and close prices and volumes would not necessarily reflect the gains and losses a portfolio could have experienced when selling, buying, or holding on to certain securities at different times of the day. Intraday valuation software with granularity at one-minute level makes it possible to investigate details and manage volatility spikes in a whole new way. Moreover, book prices are vital to properly estimate the execution on bid/ask without relying on a generic volatility formula.
  • Reduce Errors: A general but underestimated benefit of such systems is that they reduce human errors. This is mainly because such software looks at trading as a series of checkboxes that need to be ticked or unticked before effecting a trade. Moreover, the algorithms that this software runs on can keep up with the fast pace of modern trading and execute orders based on the facts presented to it without any hesitation or emotional hindrances. When relationships across parameters and valuation are complex, it is necessary to work with a software capable of combining valuation, risk, and limits.
  • Real-Time Control & Diversification: Software that can conduct one-minute-level back-testing needs to be incredibly powerful due to the large amount of data that needs to be processed, as well as to run tick data tests. This adds speed to your processes, with actions taking place within milliseconds in real-time according to rules that are synchronised and checked every minute. In a back-testing scenario, this shows you how using electronic trading – rather than manual trading – can change the outcome of an investment strategy. It also allows investment managers to juggle multiple accounts with plenty of assets in each far more easily.
  • Focus on More Important Work: The best part is that by letting this software conduct this process, managers are freeing up valuable time, allowing their teams to focus more on the strategy and less on its actioning. The possibility to run multiple tests with different configuration combinations lets you explore how to perform better and conduct more in-depth analysis on the property of the investment strategy.

The Downsides of Using Portfolio Back-testing

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.

  • Computational Time & Resources: Running just one back-test on a single asset requires large amounts of data and, therefore, high computational power. This is magnified when running multiple back-tests on the multiple assets found in a portfolio. In other words, powerful software needs powerful hardware to operate at optimum level, and that is something that businesses may need to invest in before they can start using this software.
  • Technology Isn’t Infallible: While such software is often reliable, technology can still let us down sometime. Systems running this software can be hit by bad internet connections, power cuts, and even crashing hardware. Of course, there are steps that can be taken to avoid this, including having one’s own data centres, better connectivity, and power generators, but these too require some form of initial investment and on-going upkeep.
  • Human Error: While the software itself is not prone to making mistakes, the coding of the algorithms is done by humans, and can therefore be subject to human error or missed controls. This means that certain actions undertaken by the software may be erroneous and negatively impact the results of your back-test, leading to incorrect conclusions. Of course, when back-testing, investment managers have the luxury to tweak the algorithm without losing any actual capital.

How To Run Portfolio Back-testing

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.

 

Step 1: Identity the Position Sizing Rules

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.

 

Step 2: Identify the Risk Control Pre- and Post-Trade

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.

 

Step 3: Deciding the Portfolio Valuation Criteria

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.

 

Step 4: Synchronise Calculations at One-Minute Timeframes

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.

 

Step 5: Analyse Portfolio and Risk Statistics

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.

 

Step 6: Run Multiple Portfolio Back-testing to Stress Different Criteria

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.

 

Step 7: Monitoring, Maintaining, and Improving the Portfolio Configuration

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.

Off-the-Shelf Software vs Customisable Software

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

  • Allows for easy and generic back-testing, often without the need of in-house technical experts.
  • One-size-fits-all software that has limited capabilities.
  • Doesn’t allow users to see how their data is being processed, which means the process cannot be modified to achieve better results.
  • Most software in this category does not allow users to go into detail.
  • Usually more affordable.

Customisable Software

  • Designed around the user’s exact needs.
  • Allows users to amend or introduce new formulae as needed to optimise the processing of their data.
  • Can be amended to show more or less detail depending on the user’s specifications.
  • Combined with the right hardware, this software can achieve more accurate results at a much faster rate.
  • Tends to cost more.

 

Who Should Choose Portfolio Back-testing?

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.

SOURCES:

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]

webinar-03-unsplash

READY TO BUILD YOUR OWN PILLAR PAGE?

Click on the button and jump directly to your HubSpot portal.