Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 22:00:34 +0000



[Programming Help] - options strategy backtesting based on spreadsheet

View Count: 450

[2021-10-11 14:16:23]
AndyB - Posts: 96
This is a shot in the dark, but was curious if there was anyway to backtest an options strategy? I have a spreadsheet setup that gives me weekly levels that I would like to be automatically traded at the open every week, and closed at the friday close. I need to backtest this, but I have 10 years of data, so manually doing it would be a fools errand. Unfortunately even with my couple of years with sierra, I still am not versed enough to know where to begin or even if this is possible, but I do know most things are possible with sierra so i figured i'd as here!
[2021-10-11 19:26:49]
Sawtooth - Posts: 3993
Is your spreadsheet setup in Excel or in one of Sierra's spreadsheet studies?

In terms of doing this with a spreadsheet, you'd have to use the Spreadsheet System for Trading study.
And since there is no interface from Excel into a spreadsheet study, the setup would need to be done within this spreadsheet study.

If the order can be placed manually with Sierra Chart, it can be placed automatically with this spreadsheet study.
The 10 years of data would need to be in a format accessible by Sierra Chart, and not from an external file.

Formulas can limit the entries to the Monday opening and exits to the Friday close, but you might need to create a table of dates of the Mondays and Fridays that were holidays.

It should be possible but it could get complex.
[2021-10-11 19:28:48]
AndyB - Posts: 96
Yes it is in spreadsheet. It’s 10 years of weekly bars that I am deriving my levels from, I should specify. I don’t need intraday data for this
[2021-10-11 19:29:40]
AndyB - Posts: 96
And really, these would be weekly options that would just be left to expire (premium play) so the close isn’t necessary
[2021-10-11 19:40:51]
Sawtooth - Posts: 3993
To replay an automated strategy, the chart must use Intraday Data.
Replaying Charts: Replaying Historical Daily and Higher Timeframe Charts

However, you can backtest a weekly chart using only the Bar Based Back Test:
Replaying Charts: Replaying Historical Daily and Higher Timeframe Charts
The problem here is the open of an Historical chart is at midnight, so there'd be no way to chose the time of day to entry/exit.
Date Time Of Last Edit: 2021-10-11 19:51:29
[2021-10-11 22:02:56]
AndyB - Posts: 96
for an index i thought that wouldnt matter. but the real challenge here is figuring out how to tell the platform to choose different strikes for this study. i've only done futures based back tests where the product being traded is the same as the actual chart im doing the analysis on.
[2021-10-11 23:36:13]
Sawtooth - Posts: 3993
the real challenge here is figuring out how to tell the platform to choose different strikes for this study
I don't trade options, so I am not qualified to answer this.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account