#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

 Difficulty All Easy Intermediate Advanced Section All Application Charting Indicators Watchlist Screener Downloader Composite Analysis Simulator Portfolio Pivot Table Artificial Intelligence
How to perform a basic quantitative analysis using the S&P 500

Updated on 2011-06-10 05:14:00

The number of times the S&P 500 crossed above its moving average and the average performance during the next 10 bars. In this post, we will show you how to create and backtest this trading pattern.

Steps:

- Select "Analysis" then "Rules Manager"
- Create a new list of rules then add the following rule: Cross(close, sma(close, 10))
(Close price crosses above its 10-Bar moving average)
- Click on "Analyze the list"
- Select the Start & End dates then add "^GSPC" (ticker symbol of the S&P 500) in the Symbols Panel.
- Select "Outputs" then click on "Select Outputs/Exit rules"
- Select "Performance, use N-Bar..." then add the following output: Buy then sell after 10 bars
- Click on "Ok" then "Continue" to start the simulation process

The Quantitative Analysis shows that:
- This pattern occurred 132 times
- The average output/return for the next 10 bars is 0.027%
- The percent of positive positions is 53.03%

Important Note:

Patterns that occur while a position is not yet closed are not counted. This means that if at T-10, a pattern occurs then a T-12 another pattern occurs, the second one will be ignored because the holding period of a position, as specified in the output form, is equal to 10. Only patterns that occur at or after T-20 are counted.

 Other how-to articles