YearBasis
Year basis to be used in financial calculations
You're viewing an older version of this page (#268). View the current version.
Interface
#include <codecogs/finance/banking/yearbasis.h>
using namespace Finance::Banking;
<div align="center"> <table border="0"> <tr align="center"><td><strong>Type</strong></td><td><strong>Value</strong></td><td><strong>Description</strong></td></tr> <tr><td align="center" valign="top"><em>yb_US</em></td><td valign="top">0</td><td>US (NASD) 30/360 - As with the European 30/360 (yb_EU, with the additional provision that if the end date occurs on the 31st of a month it is moved to the 1st of the next month if the start date is earlier than the 30th.</td> </tr> <tr> <td align="center" valign="top"><em>yb\_Act</em></td> <td valign="top">1</td> <td>Uses the exact number of elapsed days between the two dates, as well as the exact length of the year.</td> </tr> <tr> <td align="center" valign="top"><em>yb\_Act360</em></td> <td valign="top">2</td> <td>Uses the exact number of elapsed days between two dates but assumes the year only have 360 days</td> </tr> <tr> <td align="center" valign="top"><em>yb\_Act365</em></td> <td valign="top">3</td> <td>Uses the exact number of elapsed days between two dates but assumes the year always has 365 days</td> </tr> <tr> <td align="center" valign="top"><em>yb\_EU</em></td> <td valign="top">4</td> <td>European 30/360 - Each month is assumed to have 30 days, such that the year has only 360 days. Start and end dates that occur on the 31st of a month become equal to the 30th of the same month.</td> </tr> </table> </div>