Skip to Main Content

06/21/2023 |

TrendSpider Software Update: Strategy Tester Major Improvements

Hello, traders, welcome to another software update. In this release, we are happy to further the functionality of our Strategy Tester by offering an upgrade to the way historical data can be selected, a slew of new Tabular Data metrics, as well as a few other small improvements. Details after the jump!

Having a firm understanding of the historical performance of your strategy can be a very valuable resource. As market conditions change, so, too, can the performance of your strategy. These new upgrades are designed to provide you with more flexibility in your testing as well as a more robust set of metrics to help you decipher the performance of your strategies.

Adjusting The Historical Data Set

We now offer the ability for traders to define the exact period of time they’re testing their strategy on. In order to adjust the data set for your strategy test, open up the Strategy Tester and click on the ‘Data’ drop-down menu. It will be set to ‘300 Candles’ by default.

This is an image of the data drop down menu in the strategy tester.

With the dropdown menu open, users will now see two ways to define their data set. The first selection, titled ‘Number of Candles’, offers access to a slider bar that can be used to specify an exact number of candles. If you’re interested in testing a strategy looking back ‘X’ candles in time, this is the selection to use. Users can test back up to 7,000 candles in any time frame.

This is an image of the new data selections within the strategy tester.

The second selection, titled ‘Date Range’, allows users to specify exact dates in time to run their strategy test. For example, if someone wanted to test a strategy from the 2009 crash lows to the pre-pandemic high, this would be the selection to utilize and it can be scripted as in the below image.

This is an image that shows how to script the date range for a strategy test.

This input is visualized in the chart below.

This is an image of a chart that displays a strategy implemented from the GFC lows to the pre-pandemic high.

Why Use Date Ranges?

There are a number of use cases for defining a specific date range to test a strategy on.

  • Seasonality – Some stocks have seasonal trends. Retail stocks, for example, might perform better during the holiday season. By selecting a specific time period, you can account for this seasonality in your strategy testing.
  • Data Relevance – Certain data or trends may no longer be relevant. If you test over a period too far in the past, the results might not hold true today because the factors influencing the stock price could have changed significantly.
  • Overfitting – This is a common mistake that is made where a strategy is tailored so specifically to the historical data that it performs poorly on new, unseen data. The strategy might appear highly effective when it’s actually just exploiting irrelevant patterns in the specific dataset it was tested on.
  • Economic Conditions – Market conditions change over time, and these changes can significantly influence stock prices. The timeframe you test your strategy against should reflect the conditions you expect to face when using the strategy.
  • Benchmarking – If you’re comparing your strategy to other strategies or to a market benchmark, you’ll need to select the same time period for a fair comparison.

Put your strategy-building skills to the test with this special offer!


New Tabular Data Metrics

In addition to the new method for selecting your lookback period, users are now able to access a plethora of new metrics within the Tabular Data section of the Strategy Tester. To access these new metrics, simply click on the three dots in the top right corner of the Tabular Data panel.

This is an image of the three dots within the Tabular Data section of the strategy tester.

After clicking the three dots, a list of all the newly available metrics will appear. Simply check the box next to each of the metrics you’d like to have displayed in your Tabular Data panel and they will be added to it. Traders can utilize the ‘Copy as 2 columns’ and ‘Copy as 2 rows’ prompts to easily take a snapshot of their Tabular Data and load it into a spreadsheet for additional analysis.

This is an image of the new 'metrics to display' dropdown menu in the tabular data section of the strategy tester.

Do note the grey-colored slider bar at the bottom of the Tabular Data panel, as it will become relevant if you select to view more metrics than can fit within the two columns.

This is an image of the slider bar of the tabular data area.

Below is a list of all of the available metrics you can now track.

  • Avg. Length — Average duration of a position, in candles
  • CAGR, 2y — Compound annual growth rate, over the last 2 years
  • CAGR, 3y — Compound annual growth rate, over the last 3 years
  • CAGR, 4y — Compound annual growth rate, over the last 4 years
  • CAGR, 5y — Compound annual growth rate, over the last 5 years
  • Exposure — Percentage of the overall time range the strategy has spent in positions
  • Loss St.dev — Standard deviation of returns, for losing trades
  • Loss Streak, avg — Average amount of consecutive losing trades
  • Loss Streak, max — Max amount of consecutive losing trades
  • Max DD (Asset) — Max drawdown of Buy&Hold
  • Net Perf, 1mo — Net performance over the last 1 month
  • Net Perf, 1y — Net performance over the last 1 year
  • Net Perf, 2y — Net performance over the last 2 years
  • Net Perf, 3mo — Net performance over the last 3 months
  • Net Perf, 3y — Net performance over the last 3 years
  • Net Perf, 4y — Net performance over the last 4 years
  • Net Perf, 5y — Net performance over the last 5 years
  • Net Perf, 6mo — Net performance over the last 3 months
  • R.vol (asset 90d) — Realized volatility of the asset, for the last 90 days of a backtest. Annualized
  • R.vol (asset) — Realized volatility of the asset, for the entire backtest. Annualized
  • R.vol (strat 90d) — Realized volatility of the strategy equity curve, for the last 90 days of a backtest. Annualized
  • R.vol (strat) — Realized volatility of the strategy equity curve, for the entire backtest. Annualized
  • Return St.dev — Standard deviation of returns, for all trades
  • Sharpe (90d) — Sharpe ratio, for the last 90 days of a backtest. Annualized
  • Sortino (90d) — Sortino ratio, for the last 90 days of a backtest. Annualized
  • Trades/Day — Average amount of trades per day
  • Trades/Month — Average amount of trades per month
  • Win Streak, avg — Average amount of consecutive winning trades
  • Win Streak, max — Max amount of consecutive winning trades

Position Contributions

Just below your Performance Chart, you’ll now see a new histogram visualization called ‘Position Contributions’. This replaces the old Position Return Distribution chart. The horizontal axis represents the return (change %) and the vertical axis represents the number of positions.

There are three colors within this histogram; Red, green, and black (white in dark mode). Red illustrates the distribution of returns for losers. Green represents the distribution of returns for winners. Black illustrates the distribution of returns for all positions. This new histogram exists because some of the new metrics offered within the Tabular Data section, like Sharpe and Sortino Ratios, require an understanding of this distribution.

A distribution like the one pictured below suggests that most positions, winners and losers, only returned a small percentage. The long tail to the right shows only winning positions returning larger percentages.

This is an image of the position contribution histogram.


Strategy Tester Major Improvements | TrendSpider Shorts

As always, we hope you find these updates helpful and, if you have any questions, feel free to reach out to us via the ‘Contact Us’ button in the bottom right-hand corner of your chart view.