Skip to content

Commit

Permalink
New Brazilian holiday (#1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio authored Jan 12, 2024
2 parents 32f57d0 + 6909bfc commit f094be0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ql/time/calendars/brazil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ namespace QuantLib {
|| (d == 2 && m == November)
// Republic Day
|| (d == 15 && m == November)
// Black Awareness Day
|| (d == 20 && m == November && y >= 2024)
// Christmas
|| (d == 25 && m == December)
// Passion of Christ
Expand Down
1 change: 1 addition & 0 deletions ql/time/calendars/brazil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace QuantLib {
<li>Nossa Sra. Aparecida Day, October 12th</li>
<li>All Souls Day, November 2nd</li>
<li>Republic Day, November 15th</li>
<li>Black Awareness Day, November 20th (since 2024)</li>
<li>Christmas, December 25th</li>
<li>Passion of Christ</li>
<li>Carnival</li>
Expand Down
5 changes: 4 additions & 1 deletion test-suite/amortizingbond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ BOOST_AUTO_TEST_CASE(testBrazilianAmortizingFixedRateBond) {
1.38600825, 1.23425366, 1.39521333, 1.06968563,
1.03950542, 1.00065409, 0.90968563, 0.81871706,
0.79726493, 0.63678002, 0.57187676, 0.49829046,
0.32913418, 0.27290565, 0.19062560, 0.08662552
// data changed as source (pentagonotrustee.com.br) does not include newly introduced
// "Black Awareness Day" holiday
0.31177086,
0.27290565, 0.19062560, 0.08662552
};

Natural settlementDays = 0;
Expand Down

0 comments on commit f094be0

Please sign in to comment.