AccrInt {BondValuation} R Documentation

## AccrInt (calculation of accrued interest)

### Description

AccrInt returns the amount of interest accrued from some starting date up to some end date and the number of days of interest on the end date.

### Usage

```AccrInt(StartDate = as.Date(NA), EndDate = as.Date(NA),
Coup = as.numeric(NA), DCC = as.numeric(NA), RV = as.numeric(NA),
CpY = as.numeric(NA), Mat = as.Date(NA), YearNCP = as.Date(NA),
EOM = as.numeric(NA), DateOrigin = as.Date("1970-01-01"),
InputCheck = 1)
```

### Arguments

 `StartDate` Calendar date on which interest accrual starts. Date class object with format "%Y-%m-%d". (required) `EndDate` Calendar date up to which interest accrues. Date class object with format "%Y-%m-%d". (required) `Coup` Nominal interest rate per year in percent. (required) `DCC` The day count convention for interest accrual. (required) `RV` The redemption value of the bond. Default: 100. `CpY` Number of interest payments per year (non-negative integer; element of the set {1,2,3,4,6,12}. Default: 2. `Mat` So-called "maturity date" i.e. date on which the redemption value and the final interest are paid. Date class object with format "%Y-%m-%d". `YearNCP` Year figure of the next coupon payment date after `EndDate`. `EOM` Boolean indicating whether the bond follows the End-of-Month rule. `DateOrigin` Determines the starting point for the daycount in "Date" objects. Default: "1970-01-01". `InputCheck` If 1, the input variables are checked for the correct format. Default: 1.

### Details

 `DCC` required input _____________________ _____________________________________________ 1,3,5,6,8,10,11,12,15,16 `StartDate`, `EndDate`, `Coup`, `DCC`, `RV` 2,14 `StartDate`, `EndDate`, `Coup`, `DCC`, `RV`, `CpY`, `EOM` 4 `StartDate`, `EndDate`, `Coup`, `DCC`, `RV`, `CpY`, `EOM`, `YearNCP` 7 `StartDate`, `EndDate`, `Coup`, `DCC`, `RV`, `Mat` 9,13 `StartDate`, `EndDate`, `Coup`, `DCC`, `RV`, `EOM` =================== ========================================

Assuming that there is no accrued interest on `StartDate` the function AccrInt computes the amount of interest accrued up to `EndDate` under the terms of the specified day count convention `DCC`. The function returns a list of two numerics `AccrInt`, and `DaysAccrued`. If `InputCheck = 1` the input variables are checked for the correct format. The core feature of this function is the proper handling of the day count conventions presented below. The type of the day count convention determines the amount of the accrued interest that has to be paid by the buyer in the secondary market if the settlement takes place between two coupon payment dates.

• Many different day count conventions are used in the market. Since there is no central authority that develops these conventions there is no standardized nomenclature. The tables below provide alternative names that often are used for the respective conventions. Type `View(List.DCC)` for a list of the day count methods currently implemented.

• Detailed descriptions of the conventions and their application may be found in Djatschenko (2018), and the other provided references.

Day Count Conventions

 Actual/Actual (ISDA) ___________ | ___ ________________________________________________ DCC | = 1 ___________ | ___ ________________________________________________ other names | Actual/Actual, Act/Act, Act/Act (ISDA) ___________ | ___ ________________________________________________ references | ISDA (1998); ISDA (2006) section 4.16 (b) ========== | === ===========================================
 Actual/Actual (ICMA) ___________ | ___ ________________________________________________ DCC | = 2 ___________ | ___ ________________________________________________ other names | Actual/Actual (ISMA), Act/Act (ISMA), | Act/Act (ICMA), ISMA-99 ___________ | ___ ________________________________________________ references | ICMA Rule 251; ISDA (2006) section 4.16 (c); | SWX (2003) ========== | === ===========================================
 Actual/Actual (AFB) ___________ | ___ ________________________________________________ DCC | = 3 ___________ | ___ ________________________________________________ other names | AFB Method, Actual/Actual (Euro), | Actual/Actual AFB FBF, ACT/365-366 (leap day) ___________ | ___ ________________________________________________ references | ISDA (1998); EBF (2004) ========== | === ===========================================
 Actual/365L ___________ | ___ ________________________________________________ DCC | = 4 ___________ | ___ ________________________________________________ other names | Act/365-366, ISMA-Year ___________ | ___ ________________________________________________ references | ICMA Rule 251; SWX (2003) ========== | === ===========================================
 30/360 ___________ | ___ ________________________________________________ DCC | = 5 ___________ | ___ ________________________________________________ other names | 360/360, Bond Basis, 30/360 ISDA ___________ | ___ ________________________________________________ references | ISDA (2006) section 4.16 (f); | MSRB (2017) Rule G-33 ========== | === ===========================================
 30E/360 ___________ | ___ ________________________________________________ DCC | = 6 ___________ | ___ ________________________________________________ other names | Eurobond Basis, Special German (30S/360), | ISMA-30/360 ___________ | ___ ________________________________________________ references | ICMA Rule 251; ISDA (2006) section 4.16 (g); | SWX (2003) ========== | === ===========================================
 30E/360 (ISDA) ___________ | ___ ________________________________________________ DCC | = 7 ___________ | ___ ________________________________________________ other names | none ___________ | ___ ________________________________________________ references | ISDA (2006) section 4.16 (h) ========== | === ===========================================
 30/360 (German) ___________ | ___ ________________________________________________ DCC | = 8 ___________ | ___ ________________________________________________ other names | 360/360 (German Master); German (30/360) ___________ | ___ ________________________________________________ references | EBF (2004); SWX (2003) ========== | === ===========================================
 30/360 US ___________ | ___ ________________________________________________ DCC | = 9 ___________ | ___ ________________________________________________ other names | 30/360, US (30U/360), 30/360 (SIA) ___________ | ___ ________________________________________________ references | Mayle (1993); SWX (2003) ========== | === ===========================================
 Actual/365 (Fixed) ___________ | ___ ________________________________________________ DCC | = 10 ___________ | ___ ________________________________________________ other names | Act/365 (Fixed), A/365 (Fixed), A/365F, English ___________ | ___ ________________________________________________ references | ISDA (2006) section 4.16 (d); SWX (2003) ========== | === ===========================================
 Actual(NL)/365 ___________ | ___ ________________________________________________ DCC | = 11 ___________ | ___ ________________________________________________ other names | Act(No Leap Year)/365 ___________ | ___ ________________________________________________ references | Krgin (2002); Thomson Reuters EIKON ========== | === ===========================================
 Actual/360 ___________ | ___ ________________________________________________ DCC | = 12 ___________ | ___ ________________________________________________ other names | Act/360, A/360, French ___________ | ___ ________________________________________________ references | ISDA (2006) section 4.16 (e); SWX (2003) ========== | === ===========================================
 30/365 ___________ | ___ ________________________________________________ DCC | = 13 ___________ | ___ ________________________________________________ references | Krgin (2002); Thomson Reuters EIKON ========== | === ===========================================
 Act/365 (Canadian Bond) ___________ | ___ ________________________________________________ DCC | = 14 ___________ | ___ ________________________________________________ references | IIAC (2018); Thomson Reuters EIKON ========== | === ===========================================
 Act/364 ___________ | ___ ________________________________________________ DCC | = 15 ___________ | ___ ________________________________________________ references | Thomson Reuters EIKON ========== | === ===========================================
 BusDay/252 (Brazilian) ___________ | ___ ________________________________________________ DCC | = 16 ___________ | ___ ________________________________________________ other names | BUS/252, BD/252 ___________ | ___ ________________________________________________ references | Caputo Silva et al. (2010), | Itau Unibanco S.A. (2017) ========== | === ===========================================

### Value

AccrInt

Accrued interest on `EndDate`, given the other characteristics.

DaysAccrued

The number of days of interest from `StartDate` to `EndDate`.

### References

1. Banking Federation of the European Union (EBF), 2004, Master Agreement for Financial Transactions - Supplement to the Derivatives Annex - Interest Rate Transactions.

2. Caputo Silva, Anderson, Lena Oliveira de Carvalho, and Octavio Ladeira de Medeiros, 2010, Public Debt: The Brazilian Experience (National Treasury Secretariat and World Bank, Brasilia, BR).

3. Djatschenko, Wadim, The Nitty Gritty of Bond Valuation: A Generalized Methodology for Fixed Coupon Bond Analysis Allowing for Irregular Periods and Various Day Count Conventions (November 5, 2018). Available at SSRN: https://ssrn.com/abstract=3205167.

4. International Capital Market Association (ICMA), 2010, Rule 251 Accrued Interest Calculation - Excerpt from ICMA's Rules and Recommendations.

5. Investment Industry Association of Canada (IIAC), 2018, Canadian Conventions in Fixed Income Markets - A Reference Document of Fixed Income Securities Formulas and Practices; Release: 1.3.

6. International Swaps and Derivatives Association (ISDA), Inc., 1998, "EMU and Market Conventions: Recent Developments".

7. International Swaps and Derivatives Association (ISDA), 2006, Inc., 2006 ISDA Definitions., New York.

8. Itau Unibanco S.A., 2017, Brazilian Sovereign Fixed Income and Foreign Exchange Markets - Handbook (First Edition).

9. Krgin, Dragomir, 2002, The Handbook of Global Fixed Income Calculations. (Wiley, New York).

10. Mayle, Jan, 1993, Standard Securities Calculation Methods: Fixed Income Securities Formulas for Price, Yield, and Accrued Interest, volume 1, New York: Securities Industry Association, third edition.

11. Municipal Securities Rulemaking Board (MSRB), 2017, MSRB Rule Book, Washington, DC: Municipal Securities Rulemaking Board.

12. SWX Swiss Exchange and D. Christie, 2003, "Accrued Interest & Yield Calculations and Determination of Holiday Calendars".

### Examples

```StartDate<-rep(as.Date("2011-08-31"),16)
EndDate<-rep(as.Date("2012-02-29"),16)
Coup<-rep(5.25,16)
DCC<-seq(1,16)
RV<-rep(10000,16)
CpY<-rep(2,16)
Mat<-rep(as.Date("2021-08-31"),16)
YearNCP<-rep(2012,16)
EOM<-rep(1,16)

DCC_Comparison<-data.frame(StartDate,EndDate,Coup,DCC,RV,CpY,Mat,YearNCP,EOM)

AccrIntOutput<-apply(DCC_Comparison[,c('StartDate','EndDate','Coup','DCC',
'RV','CpY','Mat','YearNCP','EOM')],1,function(y) AccrInt(y[1],y[2],y[3],
y[4],y[5],y[6],y[7],y[8],y[9]))
# warnings are due to apply's conversion of the variables' classes in
# DCC_Comparison to class "character"
Accrued_Interest<-do.call(rbind,lapply(AccrIntOutput, function(x) x[[1]]))
Days_Accrued<-do.call(rbind,lapply(AccrIntOutput, function(x) x[[2]]))
DCC_Comparison<-cbind(DCC_Comparison,Accrued_Interest,Days_Accrued)
DCC_Comparison

```

[Package BondValuation version 0.1.0 Index]