Skip to content

BondValuation

0.1.1Package record

Fixed Coupon Bond Valuation Allowing for Odd Coupon Periods and Various Day Count Conventions

0packages dependsuggested by 1
3.2Kdownloads / year
–test coverage
11/13flavors OK

Overview

About

Analysis of large datasets of fixed coupon bonds, allowing for irregular first and last coupon periods and various day count conventions. With this package you can compute the yield to maturity, the modified and MacAulay durations and the convexity of fixed-rate bonds. It provides the function AnnivDates, which can be used to evaluate the quality of the data and return time-invariant properties and temporal structure of a bond.

Install

Health

CRAN checks
2ERROR11OK
Check messages
ERRORexamplesr-oldrel-macos-arm64, r-release-macos-arm64

r-oldrel-macos-arm64

Running examples in ‘BondValuation-Ex.R’ failed
The error most likely occurred in:

> ### Name: AnnivDates
> ### Title: AnnivDates (time-invariant properties and temporal structure)
> ### Aliases: AnnivDates
> 
> ### ** Examples
> 
> data(SomeBonds2016)
> 
> # Applying the function AnnivDates to the data frame SomeBonds2016.
> system.time(
+   FullAnalysis<-apply(SomeBonds2016[,c('Issue.Date','Mat.Date','CpY.Input','FIPD.Input',
+   'LIPD.Input','FIAD.Input','RV.Input','Coup.Input','DCC.Input','EOM.Input')],1,function(y)
+   AnnivDates(y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],RegCF.equal=1)),
+ gcFirst = TRUE)
Warning in InputFormatCheck(Em = Em, Mat = Mat, CpY = CpY, FIPD = FIPD,  :
  The issue date (Em) is supplied as a string of class "character" in the format "yyyy-mm-dd". It is converted to class "Date" using the command "as.Date(Em,"%Y-%m-%d")" and processed as Em = 2016-03-24 .
Warning in InputFormatCheck(Em = Em, Mat = Mat, CpY = CpY, FIPD = FIPD,  :
  The maturity da
...[truncated]...
  Its conversion to class numeric results in EOM = 1 .
Warning in AnnivDates(y[1], y[2], y[3], y[4], y[5], y[6], y[7], y[8], y[9],  :
  The provided EOM = 1 conflicts with one or several provided calendar dates.
                              EOM is set 0 .
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 20 >= vector size 20)
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 21 >= vector size 20)
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 20 >= vector size 20)
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 21 >= vector size 20)
Error in if (index_LIPD >= 1) { : argument is of length zero
Calls: system.time -> apply -> FUN -> AnnivDates
Timing stopped at: 0.008 0.001 0.008
Execution halted

r-release-macos-arm64

Running examples in ‘BondValuation-Ex.R’ failed
The error most likely occurred in:

> ### Name: AnnivDates
> ### Title: AnnivDates (time-invariant properties and temporal structure)
> ### Aliases: AnnivDates
> 
> ### ** Examples
> 
> data(SomeBonds2016)
> 
> # Applying the function AnnivDates to the data frame SomeBonds2016.
> system.time(
+   FullAnalysis<-apply(SomeBonds2016[,c('Issue.Date','Mat.Date','CpY.Input','FIPD.Input',
+   'LIPD.Input','FIAD.Input','RV.Input','Coup.Input','DCC.Input','EOM.Input')],1,function(y)
+   AnnivDates(y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],RegCF.equal=1)),
+ gcFirst = TRUE)
Warning in InputFormatCheck(Em = Em, Mat = Mat, CpY = CpY, FIPD = FIPD,  :
  The issue date (Em) is supplied as a string of class "character" in the format "yyyy-mm-dd". It is converted to class "Date" using the command "as.Date(Em,"%Y-%m-%d")" and processed as Em = 2016-03-24 .
Warning in InputFormatCheck(Em = Em, Mat = Mat, CpY = CpY, FIPD = FIPD,  :
  The maturity da
...[truncated]...
  Its conversion to class numeric results in EOM = 1 .
Warning in AnnivDates(y[1], y[2], y[3], y[4], y[5], y[6], y[7], y[8], y[9],  :
  The provided EOM = 1 conflicts with one or several provided calendar dates.
                              EOM is set 0 .
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 20 >= vector size 20)
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 21 >= vector size 20)
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 20 >= vector size 20)
Warning in DIST(c(DCC, Atom1AD_PreFin, Atom2AD_PreFin, Atom3AD_PreFin, Atom1AD_PreFin,  :
  subscript out of bounds (index 21 >= vector size 20)
Error in if (index_LIPD >= 1) { : argument is of length zero
Calls: system.time -> apply -> FUN -> AnnivDates
Timing stopped at: 0.006 0.001 0.007
Execution halted

CRAN check page ↗

Slowest check: 3.1 min · r-devel-windows-x86_64
Status changes
  • ERROR11 OK, 2 ERRORNow
  • ERROR11 OK, 3 ERROR2026-03-10
Advisories

none known

Documentation

In release 0.1.1
READMENoVignettesNoNEWSYes · 67% structured · does not mention 0.1.1Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
9
Examples that run
100%5 run in a plain check
Exported functions with examples
100%
Documented parameters
94%
Return-value docs
100%
Help pages citing references
78%

Downloads

3.2K
CRAN downloads in the past year
Rank #13,024 · ~9/day · ~263/mo
Daily download trend is not available in this view yet.
31430 days
87590 days
3.2K1 year
Compare downloads with other packages →
Also on374 r2u39 autocran

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)

Installing BondValuation adds 2 packages (1 with compiled code, 2.2 MB of source tarballs). Heaviest: Rcpp 1.8 MB, timeDate 359 KB.

Depends (1)
R >= 2.15.1
Imports (2)
LinkingTo (1)
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

Datasets

People & History

People (1)
Author, Maintainer since 0.1.0 (2018)
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.1.1Latest
    record
    2022-05-28 · current release · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1.0
    record
    2018-11-14
  • R
    R 3.5.0 released · 2018-04-23

Package metadata

First published
2018-11-14
Total releases
2 / 8 yrs
License
GPL-3 OSI
Minimum R
≥ 2.15.1
Bundled data
221 KB / 4 files
Download size
352 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("BondValuation")
Wadim, D. (2022). BondValuation: Fixed Coupon Bond Valuation Allowing for Odd Coupon Periods and Various Day Count Conventions (Version 0.1.1) [Computer software]. https://doi.org/10.32614/CRAN.package.BondValuation

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for BondValuation version 0.1.1 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy