Earnings scan based on calendar days instead of trading days


Category:
0
0

Hi Pete,

How might one create a scan for stocks whose earnings announcement is x “calendar” days out?  My strategies use calendar days, not trading days.  For example, scan for stocks whose earnings announcement is 14 days hence, or 7 days hence.

thanks again, and sorry for posting in the “answers” area earlier.  won’t happen again.

David

Marked as spam
Posted by (Questions: 6, Answers: 5)
Asked on January 7, 2021 10:17 am
166 views
0
Private answer

Earnings are handled by a built-in function named "HasEarnings()". Full details here:

https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Corporate-Actions/HasEarnings

That function is reading data from the chart, even when you use it in a scan. On Thinkorswim, the days available to any solution is based on trading days. Weekends and Holidays are excluded. You might find a very complicated solution to work around this. The code would need to keep track of all Holidays (hard coded and updated each year). And you would need to perform some computations to insert weekend days based on the day of week the scan is being run and how many days forward the scan is looking.

I would not attempt doing something like this for a fee. I value my sanity far more than money. And given that, it is light-years beyond the scope of anything I can provide free of charge in the Q&A Forum.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on January 7, 2021 11:12 am