New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Backtesting on Platform...

Familiar with the visuals of the site, I've parameters to input for backtesting an ETF (SPY), viz. in a format styled similarly to the following string (referring to moving avg):

* if close > average (close, 66)

Please point me to the feature set of the platform to display historical data from such an argument.

Comments

  • You can backtest on Stockcharts, but it is a "manual" process, not automated.

    The scan engine only returns symbols that fit the scan condition on the date the scan is run. It does not look at more than one date at a time and it does not return results for multiple dates on its own. And it only returns symbols to a list. It does not return summarized backtest data in a spreadsheet-like format.

    For instance, to test a moving average crossover, you would first construct the scan on the Advanced Scan Workbench:

    [group is sp500] // or your choice

    and [close x sma(10, close)] // or your choice

    Then you would use the calendar drop down (Starting 0 days ago...) to offset the run date of the scan from today some day in the past. The symbol results display in a list which you can save and then inspect the charts. You would do the same for as many dates as you think necessary.

    For a specific symbol, you would write, instead of [group is sp500],

    [symbol is 'SPY']

    This would return the SPY symbol on each day the condition is true. However, saved chart will always be as of the current day, NOT the day you selected for running the scan.

    So, if you are backtesting a single symbol, it probably makes more sense to just inspect a chart, or charts, for the period you want to use. You can adjust the chart dates using the "Start/End" option in the dropdown on the chart workbench.

  • lmkwinlmkwin ✭✭
    Like markd mentioned, it's all manually done on StockCharts.

    Set up a chart with your indicator(s). Activate the Inspect checkbox. This converts your cursor into a crosshair. It also converts your crosshair into a measuring tool. Clicking and dragging vertically will display the Percent change from where you clicked to where you are dragging.

    Clicking and dragging horizontally will diplay the number of periods of the chart from where you clicked to where you are dragging.

    Another thought.

    Create a chart that has the Price Performance Indicator added and use $Symbol as the parameter.

    Add the 66 EMA or SMA or whatever MA you are looking for, or any other indicator for that matter.

    Change the Range to Seclect Start/End



    Activate the Inspect checkbox. This converts your cursor into a crosshair.

    The Price Performance will show the percentage price change for the Range of the chart.

    You can use your crosshair to identify the date of the MA cross above and below to fill in your Start and End date for the Range settings to capture that period.

    You can use these methods using any indicator you may like. Stoch RSI, PPO, MFI, etc




  • These are helpful explanations from you both.
Sign In or Register to comment.