Skip to content
Imputation of Financial Time Series with Missing Values
R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Link to vignette added. Dec 16, 2019
R_buildignore Small fixes before CRAN submission. Dec 5, 2019
data-raw
data Data fixed and also typo in documentation Dec 6, 2019
inst Revising package structure, description, citation, readme, and so. Jun 21, 2019
man Added vignette link. Dec 22, 2019
tests Revising tests after change of function names. Dec 4, 2019
vignettes Final vignette before CRAN submission. Dec 5, 2019
.Rbuildignore Small details for CRAN submission. Dec 4, 2019
.gitignore Revising package structure, description, citation, readme, and so. Jun 21, 2019
DESCRIPTION Updating version and date Dec 5, 2019
LICENSE Creating initial package structure Oct 23, 2018
NAMESPACE Updating version and date Dec 5, 2019
NEWS.md Updating version and date Dec 5, 2019
README.Rmd Added vignette link. Dec 22, 2019
README.html Added vignette link. Dec 22, 2019
README.md
cran-comments.md Updating version and date Dec 5, 2019
imputeFin.Rproj

README.md

imputeFin

CRAN_Status_Badge CRAN Downloads CRAN Downloads Total

Missing values often occur in financial data due to a variety of reasons (errors in the collection process or in the processing stage, lack of asset liquidity, lack of reporting of funds, etc.). However, most data analysis methods expect complete data and cannot be employed with missing values. One convenient way to deal with this issue without having to redesign the data analysis method is to impute the missing values. This package provides an efficient way to impute the missing values based on modeling the time series with a random walk or an autoregressive (AR) model, convenient to model log-prices and log-volumes in financial data. In the current version, the imputation is univariate-based (so no asset correlation is used).

The package is based on the paper:
J. Liu, S. Kumar, and D. P. Palomar (2019). Parameter Estimation of Heavy-Tailed AR Model With Missing Data Via Stochastic EM. IEEE Trans. on Signal Processing, vol. 67, no. 8, pp. 2159-2172. https://doi.org/10.1109/TSP.2019.2899816

Installation

The package can be installed from CRAN or GitHub:

# install stable version from CRAN
install.packages("imputeFin")

# install development version from GitHub
devtools::install_github("dppalomar/imputeFin")

To get help:

library(imputeFin)
help(package = "imputeFin")
?impute_AR1_Gaussian

To cite imputeFin in publications:

citation("imputeFin")

Quick Start

Let's load some time series data with missing values for illustration purposes:

library(imputeFin)
data(ts_AR1_Gaussian)
names(ts_AR1_Gaussian)
#> [1] "y_missing" "phi0"      "phi1"      "sigma2"

We can then impute one of the time series and plot it:

y_missing <- ts_AR1_Gaussian$y_missing[, 3]
y_imputed <- impute_AR1_Gaussian(y_missing)
plot_imputed(y_imputed)

Documentation

For more detailed information, please check the vignette.

Links

Package: CRAN and GitHub.

README file: GitHub-readme.

Vignette: CRAN-vignette.

You can’t perform that action at this time.