NexusFi: Find Your Edge


Home Menu

 





Exclude Earning Report Dates in Back Testing


Discussion in EasyLanguage Programming

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




 
Search this Thread

Exclude Earning Report Dates in Back Testing

  #1 (permalink)
buzzkeeto60
Spring, Texas USA
 
Posts: 6 since Oct 2015
Thanks Given: 0
Thanks Received: 0

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 NexusFi?
How to apply profiles
Traders Hideout
MC PL editor upgrade
MultiCharts
Increase in trading performance by 75%
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
16 thanks
My NQ Trading Journal
14 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #2 (permalink)
buzzkeeto60
Spring, Texas USA
 
Posts: 6 since Oct 2015
Thanks Given: 0
Thanks Received: 0

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
  #3 (permalink)
buzzkeeto60
Spring, Texas USA
 
Posts: 6 since Oct 2015
Thanks Given: 0
Thanks Received: 0


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:	50
Size:	90.8 KB
ID:	328325   Click image for larger version

Name:	EPS TS 2 2022-12-01_17-33-34.png
Views:	48
Size:	81.9 KB
ID:	328326  
Reply With Quote
  #4 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,662 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,351

Isn't the Trading App store closed now?

Follow me on Twitter Reply With Quote
  #5 (permalink)
buzzkeeto60
Spring, Texas USA
 
Posts: 6 since Oct 2015
Thanks Given: 0
Thanks Received: 0

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
  #6 (permalink)
buzzkeeto60
Spring, Texas USA
 
Posts: 6 since Oct 2015
Thanks Given: 0
Thanks Received: 0

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:	45
Size:	16.4 KB
ID:	328334  
Reply With Quote
  #7 (permalink)
buzzkeeto60
Spring, Texas USA
 
Posts: 6 since Oct 2015
Thanks Given: 0
Thanks Received: 0

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




Last Updated on December 3, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts