MyNixOS website logo
Description

Access to RFR (Risk-Free Rate).

Provides EIOPA (European Insurance And Occupational Pensions Authority) risk-free rates. Please note that the author of this package is not affiliated with EIOPA. The data is accessed through a REST API available at <https://mehdiechchelh.com/api/>.

eiopaR

Lifecycle:maturing R-CMD-check

A simple package to get the EIOPA rates directly in your script.

The data is accessed through an API which is regularly updated with the latest EIOPA rates.

Note:

  • This package requires an internet connection in order to access the risk-free rates data.
  • The API or the author of this package are not related to EIOPA.

Installation

You can install the released version of eiopaR from CRAN with:

install.packages("eiopaR")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("MehdiChelh/eiopaR")

Note: If you use Excel, you can also use the add-in EIOPA_API.xlam of this repository (in the Excel ribbon: Developer > Add-ins > Browse > EIOPA_API.xlam). It imports a formula called EIOPA that can be used in Excel as follows: EIOPA("with_va", "FR", 2019, 12) or also EIOPA("no_va", "FR", 2019, 12).

Example

The following script gives you the risk-free rates with volatility adjustment:

library(eiopaR)

rfr <- get_rfr_with_va(region = "FR", year = 2017:2018, month = 12)
rfr
#> <eiopa_rfr>
#> 20171231_rfr_spot_with_va_FR > -0.00318, -0.0021, -0.00048 ...
#> 20181231_rfr_spot_with_va_FR > -0.00093, -0.00035, 0.00063 ...

Note: It is recommended to limit the number of calls to the functions get_rfr, get_rfr_with_va, get_rfr_no_va and to store the results of your calls in the environment variables of your session (like in the example above rfr <- get_...). Your IP can be temporary or permanently blocked if too many queries are executed.

The rates are then accessible as a data.frame:

head(rfr$data)
#>   20171231_rfr_spot_with_va_FR 20181231_rfr_spot_with_va_FR
#> 1                     -0.00318                     -0.00093
#> 2                     -0.00210                     -0.00035
#> 3                     -0.00048                      0.00063
#> 4                      0.00109                      0.00194
#> 5                      0.00249                      0.00339
#> 6                      0.00387                      0.00478
plot(
  rfr$data$`20171231_rfr_spot_with_va_FR`,
  ylab = "2017-12",
  type = 'l',
  col = "purple"
)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Credit

See EIOPA | Risk-free interest rate term structures for more information.

License

MIT.

Metadata

Version

0.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows