{"id":26686449,"url":"https://github.com/dppalomar/imputefin","last_synced_at":"2025-06-13T03:37:40.351Z","repository":{"id":118734783,"uuid":"154267481","full_name":"dppalomar/imputeFin","owner":"dppalomar","description":"Imputation of Financial Time Series with Missing Values and/or Outliers","archived":false,"fork":false,"pushed_at":"2021-09-27T06:43:47.000Z","size":15053,"stargazers_count":25,"open_issues_count":3,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-12T17:02:39.549Z","etag":null,"topics":["financial-data","missing-values","outliers","time-series"],"latest_commit_sha":null,"homepage":"https://CRAN.R-project.org/package=imputeFin","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dppalomar.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-10-23T05:27:42.000Z","updated_at":"2024-12-09T19:33:05.000Z","dependencies_parsed_at":"2023-03-14T09:15:33.913Z","dependency_job_id":null,"html_url":"https://github.com/dppalomar/imputeFin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dppalomar/imputeFin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FimputeFin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FimputeFin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FimputeFin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FimputeFin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dppalomar","download_url":"https://codeload.github.com/dppalomar/imputeFin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FimputeFin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259574603,"owners_count":22878749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["financial-data","missing-values","outliers","time-series"],"created_at":"2025-03-26T11:19:00.313Z","updated_at":"2025-06-13T03:37:40.326Z","avatar_url":"https://github.com/dppalomar.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput:\n  html_document:\n    variant: markdown_github\n    keep_md: true\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo=FALSE}\nlibrary(knitr)\nopts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  fig.align = \"center\",\n  fig.retina = 2,\n  out.width = \"75%\",\n  dpi = 96\n)\nknit_hooks$set(pngquant = hook_pngquant)\n```\n\n# imputeFin\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/imputeFin)](https://CRAN.R-project.org/package=imputeFin)\n[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/imputeFin)](https://CRAN.R-project.org/package=imputeFin)\n[![CRAN Downloads Total](https://cranlogs.r-pkg.org/badges/grand-total/imputeFin?color=brightgreen)](https://CRAN.R-project.org/package=imputeFin)\n\nMissing values often occur in financial data due to a variety \nof reasons (errors in the collection process or in the processing stage, \nlack of asset liquidity, lack of reporting of funds, etc.). However, \nmost data analysis methods expect complete data and cannot be employed \nwith missing values. One convenient way to deal with this issue without \nhaving to redesign the data analysis method is to impute the missing \nvalues. This package provides an efficient way to impute the missing \nvalues based on modeling the time series with a random walk or an \nautoregressive (AR) model, convenient to model log-prices and log-volumes \nin financial data. In the current version, the imputation is \nunivariate-based (so no asset correlation is used). In addition,\noutliers can be detected and removed.\n\nThe package is based on the papers:\n\nJ. Liu, S. Kumar, and D. P. Palomar (2019). Parameter Estimation of \nHeavy-Tailed AR Model With Missing Data Via Stochastic EM. _IEEE Trans. on \nSignal Processing_, vol. 67, no. 8, pp. 2159-2172.\nhttps://doi.org/10.1109/TSP.2019.2899816\n\nR. Zhou, J. Liu, S. Kumar, and D. P. Palomar (2020). Student’s t VAR Modeling \nwith Missing Data via Stochastic EM and Gibbs Sampling. _IEEE Trans. on \nSignal Processing_, vol. 68, pp. 6198-6211\nhttps://doi.org/10.1109/TSP.2020.3033378\n\n\n## Installation\nThe package can be installed from [CRAN](https://CRAN.R-project.org/package=imputeFin) or [GitHub](https://github.com/dppalomar/imputeFin):\n```{r, eval=FALSE}\n# install stable version from CRAN\ninstall.packages(\"imputeFin\")\n\n# install development version from GitHub\ndevtools::install_github(\"dppalomar/imputeFin\")\n```\n\nTo get help:\n```{r, eval=FALSE}\nlibrary(imputeFin)\nhelp(package = \"imputeFin\")\n?impute_AR1_Gaussian\nvignette(\"ImputeFinancialTimeSeries\", package = \"imputeFin\")\nRShowDoc(\"ImputeFinancialTimeSeries\", package = \"imputeFin\")\n```\n\nTo cite package `imputeFin` or the base reference in publications:\n```{r, eval=FALSE}\ncitation(\"imputeFin\")\n```\n\n\n## Quick Start\nLet's load some time series data with missing values for illustration purposes:\n```{r, message=FALSE}\nlibrary(imputeFin)\ndata(ts_AR1_t)\nnames(ts_AR1_t)\n```\n\nWe can then impute one of the time series and plot it:\n```{r, echo=FALSE}\nset.seed(42)\n```\n```{r, warning=FALSE, fig.width=9, fig.height=5, out.width = \"80%\"}\ny_missing      \u003c- ts_AR1_t$y_missing[, 3, drop = FALSE]\ny_missing[100] \u003c- 2*y_missing[100]  # create an outlier\nplot_imputed(y_missing, title = \"Original time series with missing values and one outlier\")\ny_imputed \u003c- impute_AR1_t(y_missing, remove_outliers = TRUE)\nplot_imputed(y_imputed)\n```\n\n\n## Documentation\nFor more detailed information, please check the\n[vignette](https://CRAN.R-project.org/package=imputeFin/vignettes/ImputeFinancialTimeSeries.html).\n\n## Links\nPackage: [CRAN](https://CRAN.R-project.org/package=imputeFin) and [GitHub](https://github.com/dppalomar/imputeFin).\n\nREADME file: [GitHub-readme](https://github.com/dppalomar/imputeFin/blob/master/README.md).\n\nVignette: [CRAN-vignette](https://CRAN.R-project.org/package=imputeFin/vignettes/ImputeFinancialTimeSeries.html).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdppalomar%2Fimputefin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdppalomar%2Fimputefin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdppalomar%2Fimputefin/lists"}