Back | Print |
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.
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.
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.
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.
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.
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.
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.
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.
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.
Saved strategies are the customized versions of the pre-built strategies where you can modify the strategy parameters to fit your trading style.
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.
Note:
Interest on uninvested cash is only included in Portfolio Simulation Mode strategy tests.
Note:
Margin is only included in Portfolio Simulation Mode strategy tests.
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.
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.
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.
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.
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.
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.
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.
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.
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%.
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.
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.
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.
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.
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.
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.
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.
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.
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.