Build Status | Coverage | Documentation |
---|---|---|
StateSpaceModels.jl is a package for modeling, forecasting, and simulating time series in a state-space framework. Implementations were made based on the book "Time Series Analysis by State Space Methods" (2012) by James Durbin and Siem Jan Koopman. The notation of the variables in the code also follows the book.
import Pkg
Pkg.add("StateSpaceModels")
using StateSpaceModels
y = randn(100)
model = LocalLevel(y)
fit!(model)
results(model)
forecast(model, 10)
kf = kalman_filter(model)
v = get_innovations(kf)
ks = kalman_smoother(model)
alpha = get_smoothed_state(ks)
Current features include:
- Kalman filter and smoother
- Maximum likelihood estimation
- Forecasting and Monte Carlo simulation
- User-defined models (user specifies the state-space system)
- Several predefined models, including:
- Exponential Smoothing (ETS, all the linear ones)
- Unobserved components (local level, basic structural, ...)
- SARIMA
- Linear regression
- Completion of missing values
- Diagnostics for the residuals of fitted models
- Visualization recipes
- PRs such as adding new models and fixing bugs are very welcome!
- For nontrivial changes, you'll probably want to first discuss the changes via issue.
If you use StateSpaceModels.jl in your work, we kindly ask you to cite the following paper:
@article{SaavedraBodinSouto2019,
title={StateSpaceModels.jl: a Julia Package for Time-Series Analysis in a State-Space Framework},
author={Raphael Saavedra and Guilherme Bodin and Mario Souto},
journal={arXiv preprint arXiv:1908.01757},
year={2019}
}