OmniVest Forum OmniVest Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniVest User Forums
General Discussion Topics
Trading Day Calculations In Excel
Last Activity 4/15/2019 7:43 PM
3 replies, 1025 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back
Printer friendly version

^ Top
Mark Holstius

Elite
50010010025
Posts: 744

Joined: 10/11/2012
Location: Sleepy Hollow, IL

User Profile
 
Subject : Trading Day Calculations In Excel
Posted : 4/18/2014 12:25 PM
Post #29924

Now that we have export capability (thanks Ed), it may be more accurate to use trading days in many calculations - and this is somewhat difficult in Excel. I’ve put together a SS with 2 tabs that can be copied into any spreadsheet. You can then modify the formulas to find the nearest trading date “on or before” or “after” a date based on Daily, End Of Week, End Of Month, or End Of Quarter. It can also be used to accurately find the # of trading days between 2 dates.



The data is accurate from 12/31/1999 thru 12/31/2015 and accounts for all holidays.

You just need to “Paste Special Values & Number Formats” all the data from the “Dates” tab starting in cell A1 of a new tab on your spreadsheet also named “Dates”.

You can then copy and paste any of the 9 formulas included on the “Lookup Date Example” tab appropriate to your needs and substitute your date cell references in the formulas as necessary.





Hope this helps with everyone’s research (to all of our benefit…)

Mark


[Edited by Mark Holstius on 4/18/2014 12:30 PM]

Attached file : Trading Days Calculations 2000-2015.xlsx (1060KB - 229 downloads)
Attached file : Dates.jpg (119KB - 404 downloads)
Attached file : EOW Example.jpg (791KB - 388 downloads)
Attached file : Trading Days Between Dates Example.jpg (753KB - 387 downloads)

^ Top
Jim Dean

Elite
10002525
Posts: 1059

Joined: 10/11/2012
Location: L'ville, GA

User Profile
 
Subject : RE: Trading Day Calculations In Excel
Posted : 4/18/2014 12:36 PM
Post #29926 - In reply to #29924

Hi, Mark

This is great ... thanks. I'm willing to help you enhance it, so that it deals not just with weekends and holidays, but also knows about all the special market shutdowns related to the year end accounting days, national disasters, presidential funerals, etc etc, since 1990 on through about 2040 or so (of course does not know about emergency stuff for the future ;~)

I created an OLang routine to do this a long time ago, and Nirvana (Cose) used it as the basis to "check" all the US Stocks EOD data in their database to find "holes" ... and filled them (hooray) ... in fact, OmniData is now BETTER in that regard than any other datasource Cose and I investigated (Esig, Yahoo, etc).

The conversion from OLang will be somewhat messy ... probably a macro. I'll need to restructure the routine a little bit so that the output matches what you are doing for the SS. I'll send you the adapted OLang indicator (used for FL column output and debugmsg output) ... you'll need to convert it to Excel-eze as you see fit.

So, let me know if you're interested in incorporating this, just to dot all the i's and cross all the t's.

[Edited by Jim Dean on 4/18/2014 12:41 PM]

^ Top
Mark Holstius

Elite
50010010025
Posts: 744

Joined: 10/11/2012
Location: Sleepy Hollow, IL

User Profile
 
Subject : RE: Trading Day Calculations In Excel
Posted : 4/18/2014 2:14 PM
Post #29927 - In reply to #29926

Thanks for the offer Jim - but this already includes all the market shutdowns and missed dates (2011, funerals, etc) in addition to the standard weekends and holidays as of today.

Glad to hear you were able to help with the Nirvana data too...

Mark
^ Top
kmcintyre

Elite
500100100100252525
Posts: 890

Joined: 10/11/2012
Location: Portland, OR

User Profile
 
Subject : RE: Trading Day Calculations In Excel
Posted : 4/18/2014 4:38 PM
Post #29930 - In reply to #29927

Excellent! Thanks, Mark.

It would be nice to extend the expiration date past 12/31/2015. Time flies...

Cheers

Keith

Jump to page : 1
Now viewing page 1 [25 messages per page]
back

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
(un)/Freeze thread |
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.