Repository navigation
Conversation
…er before 2000 TARGET only closed on New Year's Day and Christmas Day in 1999 (plus 31 December 1999). Good Friday, Easter Monday, 1 May and 26 December became closing days from 2000.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calendar(CalendarTypes.TARGET)treats Good Friday and Easter Monday of 1999 (2 and 5 April) as holidays, sois_business_dayandadjustskip them. TARGET was open on those days. In 1999 its closing days were New Year's Day, Christmas Day and the one-off 31 December 1999. Good Friday, Easter Monday, 1 May and 26 December only became closing days from 2000.The ECB's July 1999 press release lists the six closing days for 2000 and notes that 31 December 1999 was added to the 1999 calendar (New Year's Day and Christmas Day only):
https://www.ecb.europa.eu/press/pr/date/1999/html/pr990715_1.en.html
The 2001 and long-term (from 2002) calendars keep the same days, with 31 December 2001 added once:
QuantLib's TARGET calendar uses the same
y >= 2000condition for these four days.In
holiday_targetthe Easter check, 1 May and 26 December now requirey >= 2000. 1 May and 26 December 1999 fell on a Saturday and a Sunday, so only the Easter days change any result, but the rule is now stated correctly.Added
test_target_closing_days_start_in_2000intests/unit/test_calendar.py; it fails on master and passes with the change.Tests:
pytest tests/unit(1976 passed). I also ran the regression tests that use the TARGET calendar (calendar, equity_swap, fx_forward, fx_vanilla_option, ibor_single_curve, ibor_swap, ois_curve, schedule, swap_legs). They match their golden logs apart from timestamps and timings, so no golden files needed updating. (fx_vanilla_option differs from its golden log on my machine, but identically with and without this change.)