Type: Package
Title: Czech Interest & Foreign Exchange Rates
Version: 0.2.5
Date: 2025-05-06
Maintainer: Jindra Lacko <jindra.lacko@gmail.com>
Description: Interface to interest and foreign exchange rates published by the Czech National Bank.
URL: https://github.com/jla-data/czechrates
BugReports: https://github.com/jla-data/czechrates/issues
License: MIT + file LICENSE
Encoding: UTF-8
Imports: curl, httr, readr, dplyr (≥ 1.0.0), magrittr, tibble, tidyr
Suggests: testthat, rmarkdown, ggplot2, scales, knitr, covr
RoxygenNote: 7.3.1
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2024-05-06 07:44:42 UTC; jindra
Author: Jindra Lacko ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2024-05-06 08:00:03 UTC

Central bank exchange rate fixing

Description

A function returning data frame of FX rates as fixed by the central bank.

Usage

cnbfxrate(date = Sys.Date() - 1, specific_currency = "ALL")

Arguments

date

Date of publication as date, default is yesterday.

specific_currency

ISO Code of currency, default is ALL / complete list.

Value

a data frame - date_valid, currency ISO code, quoted amount, rate

Examples


  cnbfxrate(as.Date("2002-08-12"), "EUR") # EUR/CZK rate for August 12th, 2002



czechrates: Czech Interest Rates

Description

Interface to interest and FX rates as published by the Czech National Bank.


Internal function - tests availability of internet resources

Description

Internal function - tests availability of internet resources

Usage

ok_to_proceed(remote_file)

Arguments

remote_file

resource to be tested


pribor

Description

A function returning data frame of PRague InterBank OffeRed rates (PRIBOR).

Usage

pribor(date = Sys.Date() - 1, maturity = "1D")

Arguments

date

Date of fixing as date, default is yesterday.

maturity

Maturity of loan as string, default is overnight ("1D").

Details

The function expects date input, and returns data frame of two or more columns - date, and relevant PRIBOR rate (as determined by 'maturity' parameter).

PRIBOR rates are reported as fractions, i.e. not as percentages (i.e. 1% is reported as .01, not 1).

For dates when no PRIBOR was quoted (e.g. weekends, Bank Holidays, such as December 24th on any year, or August 13th, 2002 when no PRIBOR was quoted due to catastrophic floods) no result will be returned.

Value

data frame - first column is date, second is relevant PRIBOR rate.

Examples


  pribor(as.Date("2002-08-12"), "1D")


Two-week Repo Rate

Description

A function returning data frame of two-week repo rate, as set by ČNB.

Usage

repo2w(date = Sys.Date() - 1)

Arguments

date

Date of fixing as date, default is yesterday.

Details

The function expects date input, and returns data frame of two columns - date, and relevant repo rate. It does not require maturity argument, as maturity is by definition 2W.

Repo rates are reported as fractions, i.e. not as percentages (i.e. 1% is reported as .01, not 1).

A single result will be reported for all dates higher than December 8th, 1995.

Value

data frame - first column is date, second is relevant two-week repo rate (the primary CZK policy rate)

Examples


  repo2w(as.Date("2002-08-12"))