Exclude earnings dates for backtesting
Author: cal777
Creation Date: 2/25/2017 2:53 AM
profile picture

cal777

#1
I wonder if I could exclude earning days for backtesting and/or live trading? I saw EarningsDate, but could not get it to show the past earnings date. Can anyone help me with this? Thank you in advance!
profile picture

Eugene

#2
EarningsDate from Community Components is for next earnings dates. It's meant for live trading. And there you have this excellent discussion:

Reducing overnight risk by avoiding trades around next earnings date

It's good that you discovered EarningsDate. In addition, here's another place to browse - our downloadable Strategies. There you'd find this example easy to learn and modify:

Earnings release dates (Rev.A)

So, for backtesting you should use the built-in FundamentalDataItems collection (QuickRef for more). For the Fidelity fundamental data, it's "earnings per share. Make sure you've updated the fundamental data before running your Strategy (Data Manager > "Update Data" tab > check your fundamental provider > go to "DataSets" tab > click "Update DataSet").

CODE:
Please log in to see this code.
profile picture

cal777

#3
Thank you Eugene, it works perfect!
profile picture

Eugene

#4
You're welcome!