
A production-ready Excel Add-In (.xlam) that provides a deterministic worksheet function returning official CME/NYMEX CL holiday dates for any given year.
The Add-In exposes a single worksheet function: CrudeOilHoliday(HolidayNumber, Year) . . It returns either:- An Excel error value (#N/A, #VALUE!, #NUM!)
Function ParametersYear: Four-digit integer in the range 1900–9999. HolidayNumber: Integer in the range 1–14 identifying the holiday, as defined below. 1 New Year's Day
2 Martin Luther King Jr. Day (3rd Monday of January)
3 Presidents Day (3rd Monday of February)
4 Good Friday (Easter − 2 days)
5 Memorial Day (Last Monday of May)
6 Juneteenth (June 19, Year ≥ 2022)
7 Day Before Independence Day (conditional early close)
8 Independence Day (July 4, observed rule applied)
9 Labor Day (1st Monday of September)
10 Thanksgiving (4th Thursday of November)
11 Day After Thanksgiving
12 Christmas Eve (conditional early close)
13 Christmas Day (December 25, observed rule applied)
14 New Year's Eve (conditional early close)
A complete explanation of the Add-In is available in the GitHub repository.
Category The Elite Circle
|
|
|