Hedging trading strategies with backtesting - but with which tool?
What is Backtesting?
Backtesting is considered by traders to be one of the most important methods for testing investment strategies. As the name suggests, historical data is used to find out whether a trading strategy would have made profits or losses in past periods if a certain amount had been invested at a chosen entry date. Investors are more confident that the tested strategy can bring profits in the future if the test result is positive. In this respect, backtesting is a method of minimizing the risk of investing in the stock market.
A backtesting software screen (here: TrendSpider)Unlike other retrospective strategies, however, backtesting absolutely requires that financial data of the companies under investigation from the past be available in a suitable form (1). This requires, above all, a powerful tool fed with high-quality, homogeneous data that enables backtesting. Whether for the analysis of own trading strategies, for testing in demo accounts or even forecasts for the future: backtesting tools are sometimes considered a real secret weapon among traders. Our article presents 5 interesting backtesting tools.
Important note: The retrospective view of stock prices, balance sheet data and performance is no guarantee for the future success of a stock or a trading strategy. However, well-founded backtesting before opening a position can help to better assess the investment risk (2). Backtesting in itself is therefore clearly part of individual risk management and can be quite useful when creating and reviewing one's own trading strategy. In this respect, backtesting offers the following advantages (3):
New trading strategies can be tested without taking a financial risk.
Existing trading strategies can be continuously improved and refined.
It allows the establishment of individual investment strategies based on own risk and return requirements.
Some backtesting tools allow to include the costs for slippage and possibly commissions in the return calculation.
Attention: Investors and exchange traders should always keep in mind that in real trading there are still costs and fees that are often not included in the return calculation of backtests. Such costs always affect the individual profit or loss in the live account.
Strategies that have performed well in backtesting should definitely be observed for a relevant period of time via "paper trading" in a demo account for their actual performance.
How can an investor backtest investment strategies?
Backtesting can be performed both laboriously by hand on paper or in a spreadsheet program. Nowadays, however, it can be done more easily with appropriate software tools. For the latter case, there is special backtesting software, which until a few years ago was only available to institutional traders. In the meantime, there are numerous providers that also address private traders with their backtesting software. Although many financial portals such as Yahoo Finance already provide historical data, this alone is of no use. As an investor, you would have to be a data scientist at the same time to be able to set up and apply the algorithms required for a backtest yourself. A dedicated backtesting tool not only provides the required financial data, such as
Stock market prices
Fundamental data such as revenue, profit, loss, cash flow, debt, assets, etc.
Key figures such as P/E ratio, P&L, EV etc.
stock indices like NASDAQ 100, S&P 500
but also the necessary financial mathematical backtesting functions. A backtesting software is therefore a database and evaluation tool in one.
In order to evaluate the performance of trading strategies, various backtesting tools are available to private and institutional investors. We present the best-known ones here:
(Addendum: 6. SimFin Analytics)
TradingView has been around since 2011 and is a web-based trading platform for stock, forex and crypto trading (4). Pricing charts with add-on real-time data allow users to track prices live on various international exchanges. Fundamental data for the last 7 years can also be displayed in the free access. The financial platform is said to already have millions of users. The provider TradingView already includes backtesting software for stocks and cryptocurrencies in the free basic access. Based on the Pine Script Editor, users are offered already proven backtesting strategies. In addition, TradingView has an active community that presents strategies and discusses their results.
Once you have familiarized yourself with the Pine-Script Editor, you can use the Tradingview backtesting tool to display the following results graphically as a chart or in tabular form, for example (5):
Signals for longs (buys) and shorts (sells)
Performance of the portfolio
Drawdowns (loss zones)
List of individual trades
Benchmarks, indices such as S&P500, NASDAQ100
How does TradingView backtesting work?
Each backtesting strategy can be created or modified in TradingView with the integrated Pine-Script Editor. This is located as a tab in the lower half of the chart window. The screenshot shows a simple 20/50 moving average strategy.
The buy (long) and sell (short) signals resulting from the crossovers of the calculated averages are entered into the stock chart (here: TESLA) when the user presses "Add to chart".
There is also the possibility to replay past price developments in a so-called "Replay" mode and to set manual buy and sell orders in parallel with the support of a set strategy. This mode is suitable, for example, to train day trading decisions without risk (6).
Under the tab "Strategy Tester" you can select predefined strategies and try them out in your own backtesting. There are also strategies to choose from that have been provided by the community.
How well is TradingView suited for backtesting?
TradingView offers with its included free backtesting software the possibility to quickly test strategies based on price fluctuations. Also, all kinds of indicators and technical chart tools can be used. However, only individual symbols can be tested. Therefore, it is not possible to test a market-wide strategy that, for example, buys and sells certain stocks of the S&P500 or the NASDAQ according to fixed criteria. Also no trading costs can be applied. This means that losses due to slippage and broker fees or spreads are not included in the calculation of returns.
In the free version of TradingView, fundamental data is only available for the last 7 years.
TrendSpider is a trading platform with connected backtesting software. The solution has been around since 2016 and includes numerous technical analysis tools in the basic version. TrendSpider offers data from the last 20 calendar years. With TrendSpider, a proven design meets innovative tools. Many processes can be automated thanks to customizable engines (8). This makes TrendSpider especially suitable for day traders who want to save a lot of time with clever automation solutions. In the area of backtesting possibilities, potential users of TrendSpider can primarily rely on the integrated program called "Strategy Tester". This allows the inclusion of historical data such as cash flow, P&L, dividends and other trading signals that have arisen during the relevant period. No special programming skills are required to use the backtesting activities.
Where can I find the backtesting functions of TrendSpider?
The backtest function can be opened with the menu item "Strategy Tester" in the upper right area of the screen. Once opened, various metrics and ratios can be included from this menu or the following things can be implemented (9):
Creation of a new trading strategy (incorporating data from past markets).
Include advanced backtesting variables and conditions
Reading as well as analyzing results (for example price behavior explorer, performance charts, position distribution charts)
Visualize results (using various chart types)
Downloading your own backtesting results as CSV or Excel file
Setting alarms and risk warnings for the current trading operation
Saving of own strategies and cloning of native strategies
How to start the Strategy Tester of TrendSpider?
First of all, potential users of TrendSpider's "Strategy Tester" have to click the "Strategy Tester" button in the top menu. After that, another screen will open below the open chart. From there, the following steps are then necessary (10):
Specifying the type of strategy test
Time interval (minute, hour, day to month)
Define test period into the past
Select trading price (close, open, high, low etc.)
Define indicators or rules of the strategy (e.g. Cross EMA20/105)
Click test button
Performance data of the test is displayed (e.g. versus Buy&Hold)
All backtesting results and the shown performance history can be included in the own chart analysis (of the already opened chart). At the same time, the application can also be used to detect signals in the open chart. At the same time, the software also allows the use of the data for backtesting various strategies, such as buy-and-hold, scalping or long term trading. The profitability of one's own strategy(s) can thus be determined relatively quickly and easily.
How well is TrendSpider suited for backtesting scenarios?
TrendSpider offers an overall user-friendly interface that allows a quick and comprehensive compilation of various backtests. The advantage of this is that the tool can be used directly in trading and allows the inclusion of signals for buying or selling open positions and can be used for any individual investment objective. This can be realized by including own criteria. The offer of clear performance charts as well as the creation of informative online reports round off the backtesting services of TrendSpider quite well. It is said to still lack more in-depth features such as selection by trading venue or indices such as the S&P 500.
Comparable to Tradingview, only individual symbols can be tested. Thus, it is not possible to test a market-wide strategy that, for example, buys and sells certain stocks of the S&P 500 or the NASDAQ 100 according to specified indicators.
TrendSpider is chargeable in all versions. However, a new user can test the software once for 7 days before his deposited credit card is charged.
What is MetaStock?
MetaStock, on the other hand, is a program that was developed back in 1985 and has always been used for chart creation as well as technical chart analysis. Since it is not a cloud application, the user has to download and install the software on his Windows computer. It offers both real-time and end-of-day analysis, making it a product for holistic stock and forex market analysis (11). Whether for scalpers, for position traders or for investors, MetaStock offers various analysis functions, including a backtesting option. The stock market software behind MetaStock is said to be used by over 150,000 customers spread over 97 countries (12). In addition to the pure backtesting functionalities, MetaStock also offers numerous other tools in its basic version (13):
Fundamental data analysis
Inclusion of various indicators
Where are the backtesting functionalities hidden in MetaStock?
The comprehensive backtesting features of MetaStock can be accessed under "System Test". This button also gives you access to the integrated systems that allow you to check technical analysis patterns. Researching systems, testing them and placing them as a template over old price trends and thus forecasting the effect on the current market - this has always been no problem with MetaStock (14). Via the - admittedly quite complex - power console, the backtester gets access to a total of 58 different backtesting systems. All known indices, such as the S&P 500 or the Nasdaq 100, can be selected for this purpose. With some programming knowledge, a hypothesis regarding one's own portfolio can also be created with the backtesting tool. All features can already be used in the basic version of MetaStock.
How exactly does MetaStock's "System Test" work?
Accessing MetaStock's backtesting tool is done as follows:
First click on the "System Test" button
Select markets, indices or symbol
Then set the criteria in the power console or select ready-made strategies
Click on "Start System Test
The tested symbols are listed according to best performance
Details of the trades can be viewed in tabs
Those with programming and scripting skills can use MetaStock to perform even more comprehensive evaluations.
How practical is the MetaStock backtesting tool?
MetaStock's "System Test" is very comprehensive and can be customized, but according to the manufacturer, private investors should also be able to use the tool. There is the possibility of using MetaStock partners, who can set up or expand individual filters or backtesting systems for customers (15).
4. Stock Rover
What is Stock Rover?
Stock Rover is a web application that was developed back in 2008 and has been continuously developed ever since. Stock Rover itself is the brainchild of two software engineers and is still headquartered in Braintree, Massachusetts (16). In its service portfolio, Stock Rover has always offered comprehensive possibilities for technical chart analyses and for own financial research, but also numerous backtesting functions.
Especially for growth as well as dividend investors, Stock Rover offers a financial database with 10 years of history in terms of backtesting functionalities. However, Stock Rover is only interesting for investors with a focus on North America, as it only provides financial data on the US market and Canada.
How does one get access to the backtesting tool at Stock Rover?
Despite the connected database, the backtesting functionalities in Stock Rover are not yet fully developed. The vendor's website also states that dedicated backtesting functionality will likely not be considered until future versions of Stock Rover (17). Until then, however, "Premium Plus" subscribers in particular could use the currently already available screener, which can also include historical data - Stock Rover's database allows a look back at the stock market over the last 10 years in this respect. In this way, potential users can check how stocks would have performed if they had been purchased at an earlier point in time (18).
How can the backtesting function in Stock Rover be used?
As mentioned above, Stock Rover does not yet have extensive backtesting functionality, but screening results for the past can be tested (19):
Own trading or investment strategy must first be created with the screener.
Via "Compare to" the own chart can be compared with historical data.
In the line below the chart, any period (maximum last 10 years) can now be set.
Stock Rover then automatically calculates the performance of the tested strategy in the existing chart.
How practical is Stock Rover for individual backtesting requirements?
The numerous screening options of Stock Rover allow to select promising stocks, but do not cover the versatile backtesting offer of other platforms and software by far. Backtesting also does not take into account trading fees such as spreads or slippage. Another disadvantage is that the "backtesting-like screener" is only available in the comparatively expensive "Premium Plus" subscription version. Therefore, Stock Rover is probably not (yet) the first choice when it comes to backtesting investment strategies.
What is Portfolio123?
A time-tested solution among backtesting tools is the provider Portfolio123. The Chicago-based company was founded in 2004 and specializes in stock analysis software. Portfolio123 offers many stock research and portfolio management options for retail and institutional investors. The versatile features allow individual investments to be targeted and managed. The selection of data refers to individual stocks, ETFs as well as fixed income securities (20) from mainly North American stock exchanges. Furthermore, Portfolio123 allows the creation of automated real-time trading strategies. The backtesting software is suitable for the following users:
More than 470 different indicators, historical data, a screener as well as backtesting algorithms (from Pro Plan) distinguish Portfolio123 altogether (21).
Who can use Portfolio123's backtesting tool?
Portfolio123's backtesting engine is unfortunately not yet available in the basic version. Both beginners and professionals will find a quick start with this versatile configurable and backtester. Besides various conditions such as the definition of entry rules, slippage as well as weighting and user-defined time frames, there is also the possibility to set up various hypotheses as well as to perform rolling backtests. Analysts who have the necessary scripting skills can also freely design and implement their own backtesting strategies.
How does the "Run Screen" of Portfolio123 work?
If you want to check the result of your own investment strategy via Portfolio123, you have to go to the "Screens" section. Once there, the next steps are as follows (22):
Via the "Backtests" tab, the user can then access the versatile analysis options
Definition of individual conditions, financial year, strategies as well as references
Via "Run Screen" the backtest is then completely executed
Portfolio123's backtesting tool, which appears almost scientific and extremely analytical, also makes it possible to check one's own portfolio via "Run Screen". Thus, the own investment strategy can be examined on the basis of past data for previously unrecognized risks.
How good is Portfolio123's tool on balance?
Portfolio123 offers a sophisticated backtesting feature that allows savvy and experienced traders to check their strategies and therefore identify opportunities as well as risks. However, private investors might be overwhelmed with the complex backtesting suite. For users who can get by with 5 years of data history for backtesting, the "Screener" version is sufficient. To be able to backtest over a period of 20 years, the user needs the "Pro-Plans" subscription.
There are numerous backtesting tools on the market, most of which are cloud-based applications. For investors who are interested in many international markets, Tradingview is especially recommended, but so far no trading costs can be applied to the backtest. For those who have their investment focus in North American companies, Trendspider, MetaStock, and Portfolio123 have sophisticated backtesting features that users can work with professionally. Stock Rover has a great screener but the backtesting does not yet contain as many functions as the tools of the above mentioned competitors.
(Addendum: 6. SimFin Analytics)
The company SimFin, which was previously only known for their data API for fundamental data, launched their own analytics platform at the beginning of 2023. The analytics tools include a stock screener as well as an extremely easy-to-use backtesting, which can already be used in the free version for 4,000+ US stocks for free. According to the SimFin roadmap, the data of European companies should also be available by the end of 2023. Subscribers to the "BASIC Package" or the "PRO Package" can run backtests over the past 10 or 20 years, respectively. Users of the paid version can still enjoy top performance of the analysis and charting tools thanks to Google's powerful BigQuery database. Thus, segments with thousands of symbols and complex investment strategies can be tested in a few seconds, even for daily rebalancing intervals. In addition to the long data history, there is a real unique selling proposition with SimFin: Company fundamentals can be traced back to the original company annual report at the click of a mouse. This should be of particular interest to professional investors who demand a high level of transparency and data quality.
(1) https://de.wikipedia.org/wiki/Backtesting (Stand: 08.12.2022, 06:50 AM)
(2) https://www.ig.com/de/trading-strategien/was-ist-backtesting-und-wie-fuehrt-man-einen-backtest-bei-einer--220602 (Stand: 08.12.2022, 06:59 AM)
(4) https://atozmarkets.com/guides/how-to-backtest-on-tradingview/ (Stand: 08.12.2022, 05:07 PM)
(5) https://www.liberatedstocktrader.com/best-stock-backtesting-software-strategies#tradingview (Stand: 08.12.2022, 05:02 PM)
(6) https://atozmarkets.com/guides/how-to-backtest-on-tradingview/ (Stand: 08.12.2022, 05:11 PM)
(8) https://coinjournal.net/de/news/trendspider-bericht-2021-was-ist-trendspider/ (Stand: 09.12.2022, 10:39 AM)
(9) https://help.trendspider.com/kb/strategy-tester (Stand: 09.12.2022, 10:49 AM)
(10) https://trendspider.com/product/backtesting/ (Stand: 09.12.2022, 11:06 AM)
(11) https://en.wikipedia.org/wiki/MetaStock (Stand: 09.12.2022, 03:31 PM)
(12) https://www.kagels-trading.de/metastock/ (Stand: 09.12.2022, 03:34 PM)
(14) https://www.liberatedstocktrader.com/metastock-review/ (Stand: 09.12.2022, 03:41 PM)
(16) https://successfultradings.com/de/Blog/Stock-Rover-Screener/ (Stand: 10.12.2022, 08:49 AM)
(17) https://www.stockrover.com/support-database/can-i-use-screeners-for-backtesting/ (Stand: 10.12.2022, 09:01 AM)
(19) https://www.liberatedstocktrader.com/best-stock-backtesting-software-strategies#stockrover (Stand: 10.12.2022, 09:10 AM)
(20) https://www.liberatedstocktrader.com/portfolio123-review/ (Stand: 10.12.2022, 10:55 AM)
(22) https://daytradingz.com/portfolio123-review/ (Stand: 10.12.2022, 11:46 AM)
Start analyzing for free and pay as you grow.
- Investment AnalysisHow to build a solid stock investment strategy if buy & hold will not work in 2023After the bear market of 2022, markets might move sideways in 2023 and buy & hold strategies may no longer work. How to make profit out of volatility is the topic of this article.
- Investment AnalysisThe 3 types of stock investment analysis and their methodsEveryone knows the key to successful stock investing is to buy low and sell high. To evaluate the intrinsic value, different analysis types are applied. We present them.