Exclude Earning Report Dates in Back Testing - futures io
futures io



Exclude Earning Report Dates in Back Testing


Discussion in EasyLanguage Programming

Updated
    1. trending_up 682 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 3 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Exclude Earning Report Dates in Back Testing

(login for full post details)
  #1 (permalink)
buzzkeeto60
Spring, Texas USA
 
 
Posts: 6 since Oct 2015
Thanks: 0 given, 0 received

Is there a method in strategies to identify past earnings dates? I want to close open trades prior to announcements. My positions are maintained through them and often stopped for way more than my assigned risk. As such, my strategy doesn't replicate real life.

I am new to EasyLanguage but not new to programming. I am get it pretty fast.

Thank in advance...

Reply With Quote

Can you help answer these questions
from other members on futures io?
in depth understanding of last, bid, and ask volume in c …
NinjaTrader
help with take profit several targets
TradeStation
Big Mo Indicator for NT8
NinjaTrader
How do I create Strategy with the Second Entry indicator
NinjaTrader
Market on Close data within IB
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Is anyone actually making money?
88 thanks
An embarrassing, honest confession
25 thanks
Sierra vs. Ninja : why I chose .....
8 thanks
ApexTraderFunding.com experience and review
8 thanks
Want your NinjaTrader indicator created, free?
7 thanks
 
(login for full post details)
  #2 (permalink)
buzzkeeto60
Spring, Texas USA
 
 
Posts: 6 since Oct 2015
Thanks: 0 given, 0 received

I found a non-programatic work around. I am hoping someone has found a way to program this. Should be a way since the dates can be made visible by downloading and installing the 'Next Earnings Date Studies ( Version 1 )_8945241.tsw' workspace from the Trading App store. Also, I think the 'EPS Postings' study is included.
This provides a visual on the chart of the past earnings.
After downloading to Excel the Strategy Performance Report, I am reviewing the trading dates for any overlap of the EPS date. I am highlighting those days. I inserted a new row at the top and added some 'subtotal' formula to provide adjusted more true numbers.
Not very elegant, but it makes me much more confident in my back tests.

Reply With Quote
 
(login for full post details)
  #3 (permalink)
buzzkeeto60
Spring, Texas USA
 
 
Posts: 6 since Oct 2015
Thanks: 0 given, 0 received


I am attaching to images of the excel modifications to get a real picture.

Attached Thumbnails
Click image for larger version

Name:	EPS TS 1 2022-12-01_17-32-50.png
Views:	20
Size:	90.8 KB
ID:	328325   Click image for larger version

Name:	EPS TS 2 2022-12-01_17-33-34.png
Views:	18
Size:	81.9 KB
ID:	328326  
Reply With Quote
 
(login for full post details)
  #4 (permalink)
 kevinkdog   is a Vendor
 
 
Posts: 3,465 since Jul 2012
Thanks: 1,827 given, 6,985 received

Isn't the Trading App store closed now?

Follow me on Twitter Reply With Quote
 
(login for full post details)
  #5 (permalink)
buzzkeeto60
Spring, Texas USA
 
 
Posts: 6 since Oct 2015
Thanks: 0 given, 0 received

Well, don't know anything about that. I think that is where I found it. I downloaded it, found it in my folder, executed it, and then installed it. I don't remember precisely where I found it. I didn't think that was all that relevant, so i didn't track my steps, but maybe it is. Maybe I found a back door, or something? It was in the workspace that I downloaded, called the name above.
There is documentation on Tradestation Help with Studies and Strategies about these two studies on the WS.
Sorry, I don't know how I got the download. But, If I found it, I am sure anyone can with some effort.
Subsequent: Maybe what I am using is the EPS Postings Show Me to go back and see. I think so, now that I read the documentation. Anyway it works to accomplish my needs. Be lovely if this process I do was automated in a strategy as option to click in Customize.
If anyone has more skill in EasyLanguage (I am a true newby, but an ancient VBA programmer), I would live to collaborate.

Reply With Quote
 
(login for full post details)
  #6 (permalink)
buzzkeeto60
Spring, Texas USA
 
 
Posts: 6 since Oct 2015
Thanks: 0 given, 0 received

Here is an image of the Customize Studies & Strategies container.

Attached Thumbnails
Click image for larger version

Name:	Customize Studies N Stratgies pop-up 2022-12-02_6-37-20.png
Views:	15
Size:	16.4 KB
ID:	328334  
Reply With Quote
 
(login for full post details)
  #7 (permalink)
buzzkeeto60
Spring, Texas USA
 
 
Posts: 6 since Oct 2015
Thanks: 0 given, 0 received

NOT SO ELEGANT SOLUTION - BUT IT WORKS!
I am sure there are better methods to do this, but here is my version of a solution.

I want to make sure that I exit positions the close of the day before earnings. I want to NOT enter a trade on the day of earnings.

I created a custom Function "_isEPSDate" that does a simple if then statement with multiple OR statements. If the date of the bar passed to the function is contained in the list of OR statement, then it returns then number 1 to the strategy, if not then it returns the number 0 to the strategy.

In the strategy, I have added assigned a variable to equal this value that I use in an IF statement to then close any open positions, or to not open any new ones.

The function module:

inputs:
int BarDate (numeric);

if BarDate = 1181023 or BarDate = 1181024 or bardate = 1190423 or bardate = 11 or BarDate = 1191021 or BarDate = 1200204 or BarDate = 1220425 or BarDate = 1221026 then
Begin
_isEPSDate = 1;
End
Else Begin
_isEPSDate = 0 ;
end;

I plan to use Excel to capture the dates with my manual entry and then concatenate the or string to then copy paste into here. That will save a little time.

Does anyone know if there exists and where data for past EPS dates?
I know that somewhere in TS this information is stored because of the 'EPS Posting' Show me. I just don't have the knowledge of how to access it. If anyone wants to give me a lesson, I will then code this using that and this will be a snap.
Please let me know if I can help anyone.

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Exclude Earning Report Dates in Back Testing


Last Updated on December 3, 2022


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2023 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts