Repository: vacanza/python-holidays

Issue:
NYSE holidays incorrectly includes new years eve (2021/12/31) when new years day (2022/01/01) falls on Saturday
The NYSE 2021 holiday calendar lists new years eve (2021/12/31) as a holiday for new years day observed (2022/01/01) as the latter falls on a Saturday.  However, per [NYSE Rule 7.2](https://www.nyse.com/publicdocs/nyse/regulation/nyse/NYSE_Rules.pdf):

`The Exchange will not be open for business on New Year's Day, Martin Luther King Jr. Day, Presidents' Day, Good Friday, Memorial Day, Independence Day, Labor Day, Thanksgiving Day and Christmas Day. When a holiday observed by the Exchange falls on a Saturday, the Exchange will not be open for business on the preceding Friday and when any holiday observed by the Exchange falls on a Sunday, the Exchange will not be open for business on the succeeding Monday, unless unusual business conditions exist, such as the ending of a monthly or yearly accounting period. Adopted: December 30, 2015 (NYSE-2015-67)`

Because 2021/12/31 is the end of the yearly accounting period, new years day is not observed on that date and should not be included as a holiday for the NYSE calendar. 

See also 

https://capital.com/no-new-year-s-holiday-for-wall-street#:~:text=Rule%207.2%20was%20adopted%20in,an%20exception%20to%20the%20rule.

https://www.nasdaqtrader.com/content/technicalsupport/2021tradingcalendar.pdf

https://www.businesswire.com/news/home/20181204005629/en/NYSE-Group-Announces-2019-2020-and-2021-Holiday-and-Early-Closings-Calendar


Discussion:
@ryanlardinois, thank you for your suggestion! It seems that Friday, December 31, was not a holiday even before 2015 (Rule 7.2 adoption), according to Rule 51. So I think it would be right to remove holiday shift to December 31 completely. It will be fixed in next release.

Resolving patch:
diff --git a/holidays/financial/ny_stock_exchange.py b/holidays/financial/ny_stock_exchange.py
--- a/holidays/financial/ny_stock_exchange.py
+++ b/holidays/financial/ny_stock_exchange.py
@@ -45,7 +45,6 @@ def _populate(self, year):
         # New Year's Day.
         name = "New Year's Day"
         self._move_holiday(self._add_new_years_day(name))
-        self._add_observed(self._next_year_new_years_day, name)
 
         # MLK, 3rd Monday of January.
         if year >= 1998:
@@ -169,7 +168,6 @@ class NewYorkStockExchangeStaticHolidays:
             (JAN, 28, "Heatless Day"),
             (FEB, 4, "Heatless Day"),
             (FEB, 11, "Heatless Day"),
-            (JUN, 14, "Heatless Day"),
             (SEP, 12, "Draft Registration Day"),
             (NOV, 11, "Armistice Day"),
         ),
@@ -183,7 +181,10 @@ class NewYorkStockExchangeStaticHolidays:
             (AUG, 10, "Funeral of President Warren G. Harding"),
         ),
         1927: (JUN, 13, "Parade for Colonel Charles Lindbergh"),
-        1929: (NOV, 29, "Catch Up Day"),
+        1929: (
+            (NOV, 1, "Catch Up Day"),
+            (NOV, 29, "Catch Up Day"),
+        ),
         1933: (
             (MAR, 6, "Special Bank Holiday"),
             (MAR, 7, "Special Bank Holiday"),
@@ -215,7 +216,7 @@ class NewYorkStockExchangeStaticHolidays:
         ),
         1972: (DEC, 28, "Funeral for President Harry S. Truman"),
         1973: (JAN, 25, "Funeral for President Lyndon B. Johnson"),
-        1977: (JUL, 14, "Blackout in New Yor City"),
+        1977: (JUL, 14, "Blackout in New York City"),
         1985: (SEP, 27, "Hurricane Gloria"),
         1994: (APR, 27, "Funeral for President Richard M. Nixon"),
         2001: (


Test patch:
diff --git a/tests/financial/test_ny_stock_exchange.py b/tests/financial/test_ny_stock_exchange.py
--- a/tests/financial/test_ny_stock_exchange.py
+++ b/tests/financial/test_ny_stock_exchange.py
@@ -44,21 +44,18 @@ def test_new_years(self):
             date(1930, JAN, 1),
             date(1950, JAN, 2),
             date(1999, JAN, 1),
-            date(1999, DEC, 31),
             date(2010, JAN, 1),
             date(2018, JAN, 1),
             date(2019, JAN, 1),
             date(2020, JAN, 1),
             date(2021, JAN, 1),
-            date(2021, DEC, 31),
-            date(2027, DEC, 31),
         ):
             self.assertHoliday(dt)
             self.assertNoHoliday(dt + td(days=-1))
             self.assertNoHoliday(dt + td(days=+1))
             self.assertNoHoliday(dt + td(days=+7))
 
-        # observed on previous year Dec 31
+        # no observed on previous year Dec 31
         for dt in (
             date(1994, JAN, 1),
             date(2000, JAN, 1),
@@ -67,7 +64,7 @@ def test_new_years(self):
             date(2022, JAN, 1),
         ):
             self.assertNoHoliday(dt)
-            self.assertHoliday(dt + td(days=-1))
+            self.assertNoHoliday(dt + td(days=-1))
 
     def test_mlk(self):
         for dt in (
@@ -398,7 +395,6 @@ def test_special_holidays(self):
             date(1918, JAN, 28),  # Heatless Day
             date(1918, FEB, 4),  # Heatless Day
             date(1918, FEB, 11),  # Heatless Day
-            date(1918, JUN, 14),  # Heatless Day
             date(1918, SEP, 12),  # Draft Registration Day
             date(1918, NOV, 11),  # Armistice Day
             date(1919, MAR, 25),  # Homecoming Day for 27th Division
@@ -407,6 +403,7 @@ def test_special_holidays(self):
             date(1923, AUG, 3),  # Death of President Warren G. Harding
             date(1923, AUG, 10),  # Funeral of President Warren G. Harding
             date(1927, JUN, 13),  # Parade for Colonel Charles Lindbergh
+            date(1929, NOV, 1),  # Catch Up Day
             date(1929, NOV, 29),  # Catch Up Day
             date(1945, AUG, 15),  # V-J Day (WWII)
             date(1945, AUG, 16),  # V-J Day (WWII)
@@ -424,7 +421,7 @@ def test_special_holidays(self):
             date(1969, JUL, 21),  # National Participation in Lunar Exploration
             date(1972, DEC, 28),  # Funeral for President Harry S. Truman
             date(1973, JAN, 25),  # Funeral for President Lyndon B. Johnson
-            date(1977, JUL, 14),  # Blackout in New Yor City
+            date(1977, JUL, 14),  # Blackout in New York City
             date(1985, SEP, 27),  # Hurricane Gloria
             date(1994, APR, 27),  # Funeral for President Richard M. Nixon
             date(2001, SEP, 11),  # Closed for Sept 11, 2001 Attacks