This is a trading object shared by a member. You can use this object as well as hundreds of others with QuantShare - Trading Software.
Click on the Like button or on one of the share buttons to share this object and spread the word about QuantShare.
QuantShare is an advanced trading software for stock, forex, futures, ETF and options markets. It is the best and the most complete EOD trading software software and it is FREE (beta version).
This item loads and saves a list of all US holidays. The data is retrieved from the (ice.com) website. The market closes on these US holiday dates and thus the list can be helpful if you need to conduct some analysis on the how the market behaves near these dates.
The first reported holiday is 'The New Year's Eve' and it occurred in 2001, while the last holiday is 'Christmas' and it will occur in 2012. You can adjust the start and end date of the downloader. You just need to update the item (Update in the Download Manager form), click on 'Fields' button, and then change the 'DateFrom' and 'DateTo' fields.
The data is saved into a custom database and is associated with the following symbol: ^Holidays_US. The database name is 'holidays_us'; it has three columns:
Date: The date of the holiday
IsHoliday: Always set to one
Summary: The holiday name
The website where the data is retrieved from provides the data in XLS format. Thus, the downloader will work only if you have Microsoft Excel installed on your computer.
In order to properly format and insert the data into the database, I had to create a Pre-Script item. This is mainly because the holiday date and the holiday name were not located on the same line. The script reads each parsed line and initializes a variable whenever it finds a date on a line. This variable tells the script whether the next line will contain the holiday summary or not.