Day-count convention is used to calculate accrued interest between coupon payments. This convention helps to determine the number of days between payment, thus helping with calculation of how interest is accrued over a period. This convention dictates how the period between payments is calculated, by deciding numbers of days in a month and a year for below.

**Coupon Value Calculation:**For sub annual coupon payments, day-count convention are used to calculate fraction of year on the payment day to determine payout.**Dirty Price Calculation:**To calculate how to what fraction of next coupon the seller is eligible based upon how long hes kept the security with him.

Most common day-count conventions are as follow.

### 30/360 Method

This method assumes every year to be of 360 days with everything month having 30 days in them. Since 360 is highly factor-able, calculation of payment frequency is easier and payment amount is constant over payment periods. It is often used in calculation of accrued interest for **Corporate, Agency, Municipal Bonds and also MBS**. A simple formula to calculate year fraction between two dates `D1/M1/Y1`

and `D2/M2/Y2`

could be.

$latex

{Fraction =\frac{ 360(Y_2 – Y_1) + 30(M_2 – M_1) + (D_2 – D_1)}{360}}&s=2

$

However, in reality not all the months are of 30 days, hence `D2-D1`

will not render the result we expected. To counter handle this scenario, a more accurate formula will be as below.

$latex

{Fraction =\frac{ 360(Y_2 – Y_1) + 30(M_2 – M_1 – 1) + max(0, 30 – D_1) + min(30, D_2)}{360}}&s=2

$

### Actual/360 Method

This convention calculates actual differences between dates, but assumes year to be of 360 day. It is mostly used in used in money markets for **short-term lending of currencies with maturity of one year or less**. This method is also called the **French convention**.A simple formula to calculate year fraction between two dates `D1/M1/Y1`

and `D2/M2/Y2`

could be.

$latex

{Fraction =\frac{ (D_2/M_2/Y_2 – D_1/M_1/Y_1)Days}{360}}&s=2

$

### Actual/Actual Method

This is the convention used for **US Treasury bonds and Notes**, among other securities. This method calculates fractions of leap and non leap years separately and then combines them.

$latex

{Fraction =\frac{(Days not in leap year)}{365}+\frac{(Days in leap year)}{366}}&s=2

$

Python implementation of day count conventions can be found at my GitHub Bond Concepts repository .

#### Naved

An adept programmer with experience in design, development and deployment of multiple application routines. Knowledge of various software designs paradigms, development frameworks, deployment methodologies, database modelling and process migration. Special focus on business driven design, search optimization, user interface, data access and data storage implementation. A hacker with a penchant for making technological processes more readily and comprehensively accessible.