Help Glossary

About Strategy Testing

What is a Trading Strategy?

Trading strategies are sets of explicit rules, based on historical price data, technical indicators or a combination, that help you determine when to buy, sell, or hold a given investment. A trading strategy can help you take advantage of potential opportunities in the market.

Top

What is Strategy Testing?

Strategy Testing lets you test and modify pre-built trading strategies under historical market conditions to determine how certain scenarios would have performed in the past.

Strategy Testing determines when a trading strategy would have bought, sold, or held a security. Testing also provides the hypothetical performance metrics of a strategy such as the percentage returned on an investment had the suggested transactions been made over the period tested.

Top

Why use Strategy Testing?

Strategy Testing lets you experiment and familiarize yourself with the concepts behind trading strategies, without actually trading positions in your portfolio. It also lets you compare results from different strategies or using different parameters.

Many traders attempt to find chart patterns or indicators that help them to identify entry and exit points for a stock. Although this doesn't always work, the goal is to trade more efficiently, minimizing risk while maximizing returns. Additionally, by relying on patterns or indicators to identify trade opportunities, traders are less likely to make emotional decisions. Generally it's good to explore different ideas to check for validity and reliability to help you gain confidence before applying a trading strategy to your portfolio.

At the same time, it's important to recognize that testing results are dependent on broader market movements over the time period tested, and these movements may not be present over every time period. Additionally, there's the possibility that a trading strategy may not perform the same way in the future as it did in the past.

Top

What is Single Symbol Strategy Testing?

Use Single Symbol Strategy Testing if you are interested in investing in a specific security and want to see how it would have performed historically using a particular strategy. Single Symbol Strategy Testing can help you identify trading opportunities but may not produce enough trade results to effectively evaluate the strategy.

Top

What is Multi-Symbol Strategy Testing?

Use Multi-Symbol Strategy Testing to see how a group of stocks (such as the stocks in an index) would have performed historically using a particular strategy. Multi-symbol Strategy Testing enables you to create a hypothetical simulation which includes the effects of dividends, cash interest, and commissions paid. It also allows you to choose a percent of equity to use for each trade based on the amount of trading capital selected. As the Multi-Symbol Strategy Test is run, the gain/loss is calculated for each position, subtracts commissions, and adds dividends or interest received, and adjusts the trade size up or down based on whether the strategy has a gain or loss at the particular time the trade signal for the next position is generated.

Because Multi-symbol Strategy Testing can more accurately reflect your trading style, you may be more successful in identifying an efficient trading strategy. Used in combination, Single Symbol Strategy Testing can help identify a trend or pattern that can then be validated over different historical time periods by using Multi-Symbol Strategy Testing.

Top

What information do I get when I run a Strategy Test?

After executing a strategy test, the results are portrayed in a series of performance visualizers that provide you performance statistics, a price chart, hypothetical historical buys and sells and current trade alerts. Use the trade alerts as ideas for further research and place trades to enter new positions.

Top

How can I use Strategy Testing to trade?

When strategy conditions are met in a test, the trade alerts are generated for the selected Symbol(s). If there is no alert associated with the trading strategy, it will not be displayed. If you determine that you would like to implement the strategy, you can click the Trade button to get a pre-filled trade ticket and enter an order.

Use the Strategy Monitor to receive updated trade alerts and track the strategies that you are currently trading.

Top

What is a Pre-built Strategy?

Fidelity offers several pre-built strategies that you're welcome to explore, test, or customize to your preference. The pre-built strategies are organized into categories that best describe their trading style; however, you can copy, move, or re-organize them as you see fit.

Top

What is a Strategy Category?

Pre-built strategies are organized in categories based on their trading style and approach to technical analysis. Common approaches such as Trend Following, Counter Trend, Dip Buyer, Breakout and Gap strategy categories are available.

You can save the customized versions of pre-built strategies and save them either in a pre-built strategy category or a custom defined category.

Top

What is a Saved Strategy?

Saved strategies are the customized versions of the pre-built strategies where you can modify the strategy parameters to fit your trading style.

Top

How do I configure Strategy settings?

The Strategy settings allow you to customize each Strategy to your liking. Once configured and activated, the Strategy will be executed against the strategy parameters until you change them.

‘Settings’ link’: When clicked, you are presented with the Test settings options. Please note that settings can be saved, so that they are retained across sessions and applied to the tests. Settings are not saved specifically to a single strategy.

  1. ‘Test Assumptions’ tab: When selected, this tab provides you with the following options:
    1. "Interest and Dividends (Portfolio Simulation)" Section:
      1. ‘Include Interest on uninvested cash’: A checkbox is provided for you to select whether, or not to include interest on free cash. Note: Interest on uninvested cash is only included in Portfolio Simulation Mode Strategy Tests.
        1. ‘Interest rate’: When “Include Interest on uninvested cash” box is selected, a new field ‘Interest rate on uninvested cash’ will become visible for you to specify the interest rate. This field allows you to specify a return rate to be assigned to uninvested cash during Strategy testing. The default value of ‘Interest rate on uninvested cash’ is blank. This field is greyed out when ‘Include Interest’ is off.


          Note: Interest on uninvested cash is only included in Portfolio Simulation Mode strategy tests.

      2. ‘Include Dividends in Strategy Test results’: A checkbox is provided to you to include dividends in the strategy test results. Note: Dividends are only included in Portfolio Simulation Mode strategy tests.
    2. "Margin and Margin Loan Amount (Portfolio Simulation)" Section:
      1. ‘Include margin’: A checkbox is provided to you to select whether, or not to apply margin to the strategy test.


        Note: Margin is only included in Portfolio Simulation Mode strategy tests.

        1. ‘Margin Interest rate’: When the ‘Include margin’ box is checked, ‘Margin Interest rate’ will become visible to you to specify the interest rate to be applied to margin loan amount during Strategy Testing. This field is greyed out when ‘Margin Interest rate’ is off. Note: Interest on margin loan amount is only included in Portfolio Simulation Mode Strategy Tests.
      2. ‘Margin Loan Factor’: Text box that allows you to specify the margin loan factor to be applied during Strategy Testing. You can enter a value into the text box, it is not part of the field name, it is simply a placeholder for your entry. If a value greater than 1:1 is entered, margin will be applied, allowing a strategy test to borrow cash to fill trades if needed. Note: Margin loan factor is only included in Portfolio Simulation Mode Strategy Tests.
    3. "Worst Trades (Portfolio Simulation)" Section:
      1. Use Worst Trades in Portfolio simulations checkbox to include the worst trades in portfoilo simulation mode Strategy tests to provide more realistic view of strategy performance.
    4. "Benchmark Buy And Hold" Section:
      1. Symbol: A text box is available for you to enter a symbol that will apply an alternative comparison for Buy and Hold.
        1. Buy and hold comparison symbol can be changed anytime.
  2. ‘Trade’ tab: When selected, available trading accounts are displayed to you to use for Strategy Testing:
    1. ‘Default Account’ Section:
      1. Acct: A drop down is provided to select the account to use as default Strategy Testing trading account. When the trade alerts are generated from a strategy, the account is included to facilitate trading. This feature is only available for logged-in users.
    2. ‘Exit Orders’ Section:
      1. ‘Exit Orders (sell and cover) should always exit the position held’: When checked, exit orders will always exit the full position held by you.
    3. ‘Trade Commissions’ Section:
      1. ‘Apply commissions to simulated trades': When checked, commissions will be applied to Strategy test results. Commissions reflect Fidelity’s pricing of $7.95 per trade for each side of the transaction. Commissions are set to "on" by default, but may be turned on/off based on your preference.
    4. ‘Round Lots’ Section:
      1. "Round stock positions to nearest 100 shares": When checked, orders will be rounded to the nearest 100 shares, e.g. an order of 95 shares of XYZ will be rounded up to 100 shares of XYZ.
      2. "Round stock positions of less than 50 shares up to 100 shares": When selected, orders of less than 50 shares will be rounded up to 100 shares, e.g. an order for 30 shares of XYZ will be rounded up to 100 shares of XYZ and submitted.
Top

How do settings affect my Strategy Testing?

The Strategy test settings are used to model the results to include commissions, dividends, interest, margin or alternative benchmarks allowing you to customize each Strategy to your trading style.

Top

What is a Visualizer?

A visualizer portrays the performance of a Strategy in different formats such as tabular data and graphs. The available visualizers are Performance, By Symbol, By Trade, Draw Down, Chart, By Period, Profit Distribution, Equity Curve and Alerts.

The list of visualizers is available on the test page of the Strategy Testing application which has a thumbnail representation of each visualizer. When clicked, you can expand any of the visualizers to display in the testing page. You can also drag one or more visualizers and stack them side by side, or on top of another to view multiple visualizers at once.

Top

What is a Performance visualizer?

The Performance visualizer provides a detailed report of a trading strategy’s performance statistics that describe the Test results.

Performance Metrics

A list of performance metrics is presented in the first column on the left. Each metric is reported for All Trades, Long Trades, Short Trades, as well as for the Buy & Hold strategy.

The set of metrics presented depend on the mode selected for Strategy test: Portfolio Simulation Mode or Raw Profit Mode. Please refer to Glossary for the metric definitions.

Top

What is a By Symbol visualizer?

The By Symbol visualizer breaks down a subset of performance statistics for each Symbol traded during the test with side-to-side profit/loss comparisons to the Buy and Hold strategy. The visualizer is displayed only for Multi-Symbol Strategy tests.

The metrics available in the By Symbol visualizer include Profit, Buy & Hold Profit, Profit per Bar, B&H per Bar, Trades, Percentage of Winners and Avg Bars Held.

Top

What is a By Trade visualizer?

The By Trade visualizer displays a list of all of the historical trades generated by the Strategy and a set of detailed performance metrics for each trade.

The columns displayed include Position, Symbol, Quantity, Entry Date, Entry Price, Exit Date, Exit Price, Profit %, Profit $, Bars Held, Profit per Bar, Entry Name, Exit Name, MAE %, MFE %.

Display a trade in the chart

Double click a trade to show it in the Chart visualizer. You can use this action to review trades in the chart after performing a Multi-Symbol Strategy test without re-executing the Strategy on the selected symbol. In this way, trades for the selected symbol are in the context of the Multi-Symbol Strategy test, which may have rejected some trades due to settings in Portfolio Simulation mode.

When you select a trade alert, it will be displayed in the center of the chart. For example, a one year chart with a trade signal on 7/10/2011 will show results for 6 months before, and six months after that date.

Top

What is a Drawdown visualizer?

The Drawdown visualizer presents two different ways of analyzing Drawdown.

Strategy Drawdown visualizer

The Equity Curve displays Drawdown on a walk-forward basis. This means that the percentage of drawdown is with respect to maximum equity achieved up to that point in time. You have the choice of displaying your data in percentage (default) or dollar representations using the right click menu.

The depth of the current Drawdown is displayed on a bar by bar basis, covering the complete period of the historical simulation. You can quickly identify the periods of deepest and longest Drawdown.

For the strategy test periods involving a large number of bars, it may not be possible to display the exact Drawdown for each bar due to screen rendering limitations. For exact value of Max Drawdown, refer to the metrics in the Performance visualizer.

Number of Bars since Last Equity High

This graph displays the number of bars since a new equity high was achieved. This can give you an idea of how long you may have to wait to recover from Drawdowns in your account when trading the strategy.

Top

What is a Chart visualizer?

Charts are the primary tool of a technical analyst to visualize potential trading opportunities as well as to verify that a trading strategy is functioning as desired.

The chart displays the historical price movement for the testing period and any associated trade alerts for a particular equity.

Strategy Parameters

Strategy Test parameters cannot be changed within the chart. Parameters set during a test must be reset through running a new test. The parameters that cannot be changed within the chart are: Time Scale, Test Period, Symbol, and Position Size.

Indicators

Indicators associated with a strategy can be added to the chart. You can add additional indicators, but those indicators will not affect the test results. You are allowed to remove an indicator that was applied as a result of a test, but the test results must not be impacted by their removal.

Chart Intervals

The chart interval displayed depends on the interval associated with the strategy selected. The default interval displayed on the chart is 1 Year/Daily. You can change the time frame, but cannot turn it off.

Drawing Tools

A drawing tool helps you perform additional analysis on a chart by drawing trend lines, support, or resistance lines, as well as different Fibonacci retracements. You can also add a note to the chart or zoom into and out of a specific period of the data in the chart.

Events

To show applicable corporate event information – Splits, Dividends, and Earnings – on your chart, click on the Splits, Dividends or Earnings icon on the Events menu.

Splits

Splits are represented by small blue circles with an "S". Move your cursor over a split circle to see the date and type (e.g., 2 for 1, 3 for 1, 1 for 2, etc.) of the split.

Dividends

Dividends are represented by grey squares with a "D". Move your cursor over a dividend square to see the date of the dividend payment and the per share dollar amount.

Earnings

Historical quarterly earnings are displayed on your chart. Green triangles with an "E" indicate a higher quarterly Earnings Per Share (EPS) as compared to the same quarter one year ago. Red triangles indicate a lower quarterly EPS as compared to the same quarter one year ago. Move your cursor over a triangle to see the EPS amount and the date on which the data was released.

Comparison

The advanced chart allows for comparison of additional symbols against the primary symbol. These comparisons will not change the Strategy test results. All comparisons are completed on the chart, but comparison of test results is not enabled.

Top

What is a By Period visualizer?

The By Period visualizer allows you to see the strategy performance broken down by day, week, month, quarter, or year. By Period returns reflect the account's equity value on the last day of the period minus the value on the last day of the previous period. Consequently, the return value is calculated by the change in the equity curve, not by the sum of exits in the specified period. You have the choice of displaying their data in percentage (default) or dollar representations using the right click menu.

By Period returns are not available after running a strategy test in Raw Profit Mode.

Top

What is a Profit Distribution visualizer?

The Profit Distribution histogram provides an overall illustration of your strategy’s dynamics. The graph illustrates the percentage profit distribution of all of the trades that were generated by the strategy. Profits include all trading costs including commissions.

Net profits of the trades are divided into a number of evenly-distributed bins. Each bar on the graph contains a number of trades whose profit falls within the upper bounds of the bin. For example, imagine that the bins are spaced apart by 5% each. The bin labeled 10% contains 20 trades. This means that 20 trades had a net profit between 5% and 10%.

Top

What is an Equity Curve visualizer?

The Equity Curve portrays the Strategy's performance over the historical Strategy testing period, optionally compared to Buy and Hold. In Portfolio Simulations, the amount of exposure taken by the Strategy is also represented in the graph.

Account Equity

Account Equity is portrayed as the solid green area of the graph. Equity changes over time as trading-system Positions gain or lose value. The Account Equity area itself is divided into a Cash Position (dark green) and a Market Position (light green). Dividing the Equity into Cash and Market levels lets you see the history of your strategy's market exposure at a glance.

Buy & Hold Equity

The Buy & Hold Equity is represented as a blue line. The line is calculated by taking equal dollar-sized Positions in each symbol of the DataSet at the beginning of the simulation period and holding them until the end of the strategy test period. The hypothetical Buy & Hold positions are calculated based on the closing value of the first bar of data (bar #0) and activating the Position at the opening price of the next bar. Because of this you'll notice that Buy & Hold Exposure is usually never exactly 100%, but is typically within 1% of 100%, assuming 1:1 margin.

The Strategy test does not close Buy & Hold positions. Final profit is based on closing price of the last bar in the test. Exit commission is not applied.

Top

What is an Alerts visualizer?

When you test a strategy, the alerts visualizer displays trade alerts that indicate what the next buys and sells would be based on the parameters you selected. You must act on these alerts prior to the next market open to seek to produce returns similar to those in the hypothetical calculation. You will need to run the strategy test daily in order to get updated trade alerts or add the strategy to the Strategy Monitor in order to get the updated trade alerts.

Top

How do I view different visualizers?

A list of visualizers is available on the right hand side of the Test page. When clicked, you can expand any of the visualizers to display on the Test page.

You can replace the visualizer in focus by dragging and dropping a new visualizer in its place. You can also drag and stack the visualizers side by side, or on top of another to enable multiple expanded visualizers at once.

Top

What is the Strategy Monitor?

The Strategy Monitor is a tool that allows you to run all of their strategies, regardless of the update frequency for each strategy. When you have finished testing a strategy and are ready to begin trading, you can add the Strategy to the Strategy Monitor. Once the strategy is active at the selected interval, the data for the symbol(s) is updated and the Strategy is re-run to check for new trade alerts. Alerts can be displayed by Strategy or as a group.

Top

How do I add a strategy to the Strategy Monitor?

When you click on the ‘Add to Monitor’ link they will be directed to the Monitor tab and the strategy will be automatically activated within the Strategy Monitor.

You are presented with several options to configure the strategy to run. These settings override the other test settings and you can select the following: Account Number, Time Scale, Test Period, Trade Size, Strategy Parameters, and Symbol/Symbol Set.

You can also add additional strategies, delete strategies, or modify the settings of the strategies from the Strategy Monitor.

Top

How do I configure/modify the Strategy Test rules in the Strategy Monitor?

When clicked, the "Review" link for a strategy within the Strategy Monitor displays the strategy settings to you with the ‘Modify Settings’ link. The ‘Modify Settings’ window displays with the following Strategy Test rules: Account Number, Time Scale, Test Period, Trade Size, Strategy Parameters, and Symbol/Symbol Set.

Top

How do I manage strategies in the Strategy Monitor?

With the Strategy Monitor, there's no need to open and run multiple strategies that you want to trade. Add and activate multiple Strategies in the Strategy Monitor and you are ready to begin.

Strategies are displayed in a scroll bar at the top of the Strategy Monitor, with alerts window below, contained within the Strategy Monitor. If there are active alerts, they are grouped by the strategy that generated them.

When clicked, the "Review" link for a strategy within the Strategy Monitor displays strategy settings to you with an option to ‘Modify Settings’. When the ‘Review’ link is clicked for an active strategy within the Strategy Monitor, the link dynamically changes to a ‘Close’ link. When you click on the ‘Close’ button the expanded view showing the strategy settings will collapse to only show the strategy name, and account number.

You are presented with the following strategy activation settings: Account Number, Time Scale, Test Period, Trade Size, Strategy Parameters, and Symbol/Symbol Set.

Whenever a strategy is modified within the Strategy Monitor, the previous alerts (if any) are removed and replaced by new alerts related to the strategy changes. In the case of changing the account, when you change the account number, the current alerts would be replaced by the new alerts with the new account number.

The ‘Run Now’ button is provided on the Strategy Monitor. When an inactive strategy is selected, and ‘Run Now’ is clicked, the inactive strategy will be activated and run.

Top

How do I deactivate a Strategy?

When you have active strategies in the Strategy Monitor, you can stop receiving alerts by selecting the ‘Deactivate’ button.

The Strategy becomes inactive and a check mark is unchecked from next to the strategy name, denoting that the strategy is inactive. The ‘Deactivate’ button updates to become an ‘Activate’ button.

‘Run this Strategy Now’ button will remain – you will be able to click on the ‘Run Now’ button in order to run a strategy immediately. If clicked, the strategy will be automatically activated and run. If left un-clicked, the strategy will remain inactive.

Top

How do I trade an alert from the Strategy Monitor?

The Alerts Pane displays the current Alerts generated from the active strategies. Alerts are grouped by strategy and display the Buy/Sell (Based on color) Symbol, number of Shares, and Price. To see all the alerts for all the strategies, enable the ‘Show all Alerts’ button. Alerts are automatically refreshed each time the Strategy is executed.

Place a trade for an individual alert or choose several alerts and drag and drop the selected alerts into the Trade Manager. When you select a single alert, you should see the data from the alert populated to the trade ticket.

When you have multi-selected alerts and drag and drop them into the Trade Manager, the ‘Place Orders’ button becomes available. On-click, the alerts are submitted and the valid trades are presented to you in a series of trade tickets.

Once trades are placed, the alert icons will move back from the Trade Manager, up to the alerts view, where they were originally moved from and the alert changes color.

Top

The Trading Strategies and Backtesting feature and trade signals generated by the strategies are provided for educational purposes and as examples only, and they should not be used or relied upon to make decisions about your individual situation. You may modify the backtesting parameters as you see fit. Fidelity is not adopting, making a recommendation for or endorsing any trading or investment strategy or particular security. The Backtesting feature provides a hypothetical calculation of how a security or portfolio of securities, subject to an example trading strategy, would have performed over a historical time period. Only securities that were in existence during the historical time period and that have historical pricing data are available for use in the Backtesting feature. The feature has only a limited ability to calculate hypothetical trading commissions, and it does not account for any other fees or for tax consequences that could result from a trading strategy. You should not assume that Backtesting of a trading strategy will provide any indication of how your portfolio of securities, or a new portfolio of securities, might perform over time. You should choose your own trading strategies based on your particular objectives and risk tolerances. Be sure to review your decisions periodically to make sure they are still consistent with your goals. Past performance is no guarantee of future results.