- ago
In his latest book "Trading Retirement Accounts" Laurens Bensdorp shows a trading strategy (System #4: Trend Following on Energy Stocks) that uses the S&P 1500 Energy Sector (sector index)

Is there a data provider that makes this available for WL?

Also: How can I construct a WL DataSet that contains all stocks of this sector?
0
239
1 Replies

Reply

Bookmark

Sort
rainfield8
 ( -8.13% )
- ago
#1
Norgate has sector information. However, it's the current classification for the stock (for delisted stocks, it's the last one that was available). So the data is not point-in-time. Just keep in mind that since this changes sometime for a company, using this in backtests might not reflect real trading.

CODE:
public override void Initialize(BarHistory bars) {          String classificationCode = Metadata.Classification(bars.Symbol, "GICS");          String sector = Metadata.ClassificationDescriptionAtLevel(bars.Symbol, "GICS", 1);          WriteToDebugLog($"GICS code for {bars.Symbol} is {classificationCode}, {sector}"); }



0

Reply

Bookmark

Sort