From c3abd9fcc24be4ed539685354a53bd87b3b7cefa Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Mon, 30 Dec 2024 09:25:31 -0600 Subject: [PATCH 1/2] Add President Carter's funeral on 2025-Jan-09 --- ql/time/calendars/unitedstates.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ql/time/calendars/unitedstates.cpp b/ql/time/calendars/unitedstates.cpp index 198ff9a9e7e..eadf1302db1 100644 --- a/ql/time/calendars/unitedstates.cpp +++ b/ql/time/calendars/unitedstates.cpp @@ -7,6 +7,7 @@ Copyright (C) 2017 Peter Caspers Copyright (C) 2017 Oleg Kulkov Copyright (C) 2023 Skandinaviska Enskilda Banken AB (publ) + Copyright (C) 2024 Dirk Eddelbuettel This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ @@ -219,8 +220,10 @@ namespace QuantLib { return false; // Special closings - if (// President Bush's Funeral - (y == 2018 && m == December && d == 5) + if (// President Carter's Funeral + (y == 2025 && m == January && d == 9) + // President Bush's Funeral + || (y == 2018 && m == December && d == 5) // Hurricane Sandy || (y == 2012 && m == October && (d == 29 || d == 30)) // President Ford's funeral @@ -314,8 +317,10 @@ namespace QuantLib { return false; // Special closings - if (// President Bush's Funeral - (y == 2018 && m == December && d == 5) + if (// President Carter's Funeral + (y == 2025 && m == January && d == 9) + // President Bush's Funeral + || (y == 2018 && m == December && d == 5) // Hurricane Sandy || (y == 2012 && m == October && d == 30) // President Reagan's funeral From 4abf6c64d1593e7f208f39248ed8db38cf3e5e0e Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Mon, 30 Dec 2024 16:53:25 -0600 Subject: [PATCH 2/2] Remove President Carter funeral from Govm Bond Mkt holiday Likely going to be a half-day, and prior ones were not marked --- ql/time/calendars/unitedstates.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ql/time/calendars/unitedstates.cpp b/ql/time/calendars/unitedstates.cpp index eadf1302db1..39fa31f2ca5 100644 --- a/ql/time/calendars/unitedstates.cpp +++ b/ql/time/calendars/unitedstates.cpp @@ -317,10 +317,8 @@ namespace QuantLib { return false; // Special closings - if (// President Carter's Funeral - (y == 2025 && m == January && d == 9) - // President Bush's Funeral - || (y == 2018 && m == December && d == 5) + if (// President Bush's Funeral + (y == 2018 && m == December && d == 5) // Hurricane Sandy || (y == 2012 && m == October && d == 30) // President Reagan's funeral