Names:
The name of this convention is 30/360 US; Also known as
Computation Method:
The number of accrued days is calculated on the basis of a year of 360 days with 12 30-day months.
The year fraction is calculated as the number of accrued days divided by 360. Here is the general formula:
\[YearFraction = \frac{360*\left( Y_{2} - Y_{1}\right ) + 30*\left( M_{2} - M_{1}\right ) + \left( D_{2} - D_{1}\right )}{360} \]
Where:
\(Y_{1}\) is the year, expressed as a number, in which the first day of the calculation period falls;
\(Y_{2}\) is the year, expressed as a number, in which the day immediately following the last day included
in the calculation period falls;\(M_{1}\) is the calendar month, expressed as a number, in which the first day of the calculation period falls;
\(M_{2}\) is the calendar month, expressed as a number, in which the day immediately following the last day included
in the calculation period falls;\(D_{1}\) is the first calendar day, expressed as a number, of the calculation period or compounding period, unless
- that day is the last day of February, or
- such number would be 31, in which case \(D_{1}\) will be 30;
\(D_{2}\) is the calendar day, expressed as a number, immediately following the last day included
in the calculation period or compounding period, unless
- that day is the last day of February and \(D_{1}\) is the last day of February or
- such number would be 31 and \(D_{1}\) is 30 or 31, in which case \(D_{2}\) will be 30;
Given the dates {start date} and {end date}
When the Thirty360(US) day count convention is used
Then the year fraction should be {day count fraction}
Given the dates {start date} and {end date}
When the Thirty360(US) day count convention is used
Then the year fraction should be {day count fraction}
Examples:
start date | end date | day count fraction | |
---|---|---|---|
2006-02-28 | 2006-08-31 | 0.50277778 | |
2006-08-31 | 2007-02-28 | 0.49444444 | |
2007-02-28 | 2007-08-31 | 0.50277778 | |
2007-08-31 | 2008-02-29 | 0.49722222 | |
2008-02-29 | 2008-08-31 | 0.50277778 | |
2008-08-31 | 2009-02-28 | 0.49444444 | |
2009-02-28 | 2009-08-31 | 0.50277778 | |
2009-08-31 | 2010-02-28 | 0.49444444 | |
2010-02-28 | 2010-08-31 | 0.50277778 | |
2010-08-31 | 2011-02-28 | 0.49444444 | |
2011-02-28 | 2011-08-31 | 0.50277778 | |
2011-08-31 | 2012-02-29 | 0.49722222 |
Given the dates {start date} and {end date}
When the Thirty360(US) day count convention is used
Then the year fraction should be {day count fraction}
Examples:
start date | end date | day count fraction | |
---|---|---|---|
2006-01-31 | 2006-02-28 | 0.077777778 | |
2006-01-30 | 2006-02-28 | 0.077777778 | |
2006-02-28 | 2006-03-03 | 0.008333333 | |
2006-02-14 | 2006-02-28 | 0.03888889 | |
2006-09-30 | 2006-10-31 | 0.083333333 | |
2006-10-31 | 2006-11-28 | 0.077777778 | |
2007-08-31 | 2008-02-28 | 0.49444444 | |
2008-02-28 | 2008-08-28 | 0.50000000 | |
2008-02-28 | 2008-08-30 | 0.50555556 | |
2008-02-28 | 2008-08-31 | 0.50833333 | |
2007-02-28 | 2008-02-28 | 0.99444444 | |
2007-02-28 | 2008-02-29 | 1.00000000 | |
2008-02-29 | 2009-02-28 | 1.00000000 | |
2008-02-29 | 2008-03-30 | 0.083333333 | |
2008-02-29 | 2008-03-31 | 0.086111111 |
Number of Scenarios | 3 | Total Duration | 923ms |
Total Number of Test Cases | 33 | Fastest Test | 16ms |
Number of Manual Test Cases | 0 | Slowest Test | 47ms |
Tests Started | Apr 11, 2023 10:42:13 | Average Execution Time | 22ms |
Tests Finished | Apr 11, 2023 10:42:14 | Total Execution Time | 914ms |
feature | Scenario | Context | Steps | Started | Total Duration | Result |
---|---|---|---|---|---|---|
Thirty360 (US) day count convention |
1: The end dates do not involve last day of February
start date=2006-08-20, end date=2007-02-20, day count fraction=0.500000 |
3 | 10:42:13 | 017ms | ||
Thirty360 (US) day count convention |
2: The end dates do not involve last day of February
start date=2007-02-20, end date=2007-08-20, day count fraction=0.500000 |
3 | 10:42:13 | 016ms | ||
Thirty360 (US) day count convention |
3: The end dates do not involve last day of February
start date=2007-08-20, end date=2008-02-20, day count fraction=0.500000 |
3 | 10:42:13 | 021ms | ||
Thirty360 (US) day count convention |
4: The end dates do not involve last day of February
start date=2008-02-20, end date=2008-08-20, day count fraction=0.500000 |
3 | 10:42:13 | 018ms | ||
Thirty360 (US) day count convention |
5: The end dates do not involve last day of February
start date=2008-08-20, end date=2009-02-20, day count fraction=0.500000 |
3 | 10:42:13 | 021ms | ||
Thirty360 (US) day count convention |
6: The end dates do not involve last day of February
start date=2009-02-20, end date=2009-08-20, day count fraction=0.500000 |
3 | 10:42:13 | 018ms | ||
Thirty360 (US) day count convention |
1: The end dates include some end-February dates
start date=2006-02-28, end date=2006-08-31, day count fraction=0.50277778 |
3 | 10:42:13 | 021ms | ||
Thirty360 (US) day count convention |
2: The end dates include some end-February dates
start date=2006-08-31, end date=2007-02-28, day count fraction=0.49444444 |
3 | 10:42:13 | 022ms | ||
Thirty360 (US) day count convention |
3: The end dates include some end-February dates
start date=2007-02-28, end date=2007-08-31, day count fraction=0.50277778 |
3 | 10:42:13 | 021ms | ||
Thirty360 (US) day count convention |
4: The end dates include some end-February dates
start date=2007-08-31, end date=2008-02-29, day count fraction=0.49722222 |
3 | 10:42:13 | 035ms | ||
Thirty360 (US) day count convention |
5: The end dates include some end-February dates
start date=2008-02-29, end date=2008-08-31, day count fraction=0.50277778 |
3 | 10:42:13 | 029ms | ||
Thirty360 (US) day count convention |
6: The end dates include some end-February dates
start date=2008-08-31, end date=2009-02-28, day count fraction=0.49444444 |
3 | 10:42:13 | 026ms | ||
Thirty360 (US) day count convention |
7: The end dates include some end-February dates
start date=2009-02-28, end date=2009-08-31, day count fraction=0.50277778 |
3 | 10:42:13 | 019ms | ||
Thirty360 (US) day count convention |
8: The end dates include some end-February dates
start date=2009-08-31, end date=2010-02-28, day count fraction=0.49444444 |
3 | 10:42:13 | 022ms | ||
Thirty360 (US) day count convention |
9: The end dates include some end-February dates
start date=2010-02-28, end date=2010-08-31, day count fraction=0.50277778 |
3 | 10:42:13 | 022ms | ||
Thirty360 (US) day count convention |
10: The end dates include some end-February dates
start date=2010-08-31, end date=2011-02-28, day count fraction=0.49444444 |
3 | 10:42:13 | 047ms | ||
Thirty360 (US) day count convention |
11: The end dates include some end-February dates
start date=2011-02-28, end date=2011-08-31, day count fraction=0.50277778 |
3 | 10:42:13 | 032ms | ||
Thirty360 (US) day count convention |
12: The end dates include some end-February dates
start date=2011-08-31, end date=2012-02-29, day count fraction=0.49722222 |
3 | 10:42:13 | 025ms | ||
Thirty360 (US) day count convention |
1: Miscellaneous calculation
start date=2006-01-31, end date=2006-02-28, day count fraction=0.077777778 |
3 | 10:42:13 | 024ms | ||
Thirty360 (US) day count convention |
2: Miscellaneous calculation
start date=2006-01-30, end date=2006-02-28, day count fraction=0.077777778 |
3 | 10:42:13 | 019ms | ||
Thirty360 (US) day count convention |
3: Miscellaneous calculation
start date=2006-02-28, end date=2006-03-03, day count fraction=0.008333333 |
3 | 10:42:13 | 025ms | ||
Thirty360 (US) day count convention |
4: Miscellaneous calculation
start date=2006-02-14, end date=2006-02-28, day count fraction=0.03888889 |
3 | 10:42:13 | 021ms | ||
Thirty360 (US) day count convention |
5: Miscellaneous calculation
start date=2006-09-30, end date=2006-10-31, day count fraction=0.083333333 |
3 | 10:42:13 | 022ms | ||
Thirty360 (US) day count convention |
6: Miscellaneous calculation
start date=2006-10-31, end date=2006-11-28, day count fraction=0.077777778 |
3 | 10:42:13 | 022ms | ||
Thirty360 (US) day count convention |
7: Miscellaneous calculation
start date=2007-08-31, end date=2008-02-28, day count fraction=0.49444444 |
3 | 10:42:13 | 021ms | ||
Thirty360 (US) day count convention |
8: Miscellaneous calculation
start date=2008-02-28, end date=2008-08-28, day count fraction=0.50000000 |
3 | 10:42:13 | 021ms | ||
Thirty360 (US) day count convention |
9: Miscellaneous calculation
start date=2008-02-28, end date=2008-08-30, day count fraction=0.50555556 |
3 | 10:42:13 | 017ms | ||
Thirty360 (US) day count convention |
10: Miscellaneous calculation
start date=2008-02-28, end date=2008-08-31, day count fraction=0.50833333 |
3 | 10:42:13 | 019ms | ||
Thirty360 (US) day count convention |
11: Miscellaneous calculation
start date=2007-02-28, end date=2008-02-28, day count fraction=0.99444444 |
3 | 10:42:13 | 023ms | ||
Thirty360 (US) day count convention |
12: Miscellaneous calculation
start date=2007-02-28, end date=2008-02-29, day count fraction=1.00000000 |
3 | 10:42:13 | 023ms | ||
Thirty360 (US) day count convention |
13: Miscellaneous calculation
start date=2008-02-29, end date=2009-02-28, day count fraction=1.00000000 |
3 | 10:42:13 | 019ms | ||
Thirty360 (US) day count convention |
14: Miscellaneous calculation
start date=2008-02-29, end date=2008-03-30, day count fraction=0.083333333 |
3 | 10:42:14 | 023ms | ||
Thirty360 (US) day count convention |
15: Miscellaneous calculation
start date=2008-02-29, end date=2008-03-31, day count fraction=0.086111111 |
3 | 10:42:14 | 021ms |