Rolling Optimizations
Overview
Analytical computation of rolling optimization for time-series data. The 'rolloptim' package solves constrained quadratic and linear programs in closed form by applying Lagrangian multipliers and the Karush-Kuhn-Tucker conditions (Kuhn and Tucker, 1951, doi:10.1525/9780520411586-036) to perform mean-variance portfolio optimization (Markowitz, 1952, doi:10.1111/j.1540-6261.1952.tb01525.x) over rolling windows. For each window, the analytical solution computes the optimal weights that minimize variance, maximize expected return, minimize residual sum of squares, or maximize quadratic utility, subject to a total-weight equality constraint and box bounds on each weight. Use cases include mean-variance portfolio optimization, expected-return maximization, and constrained regression. The package supports rolling optimizations with constraints via the total, lower, and upper arguments. The implementation accepts rolling moments computed via the 'roll' package and uses 'RcppArmadillo' for linear algebra, with parallelism across windows provided by 'RcppParallel'.
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK7 OK2026-07-12
Documentation
- Help pages
- 5includes a package overview page
- Examples that run
- 100%4 run in a plain check (4 of them under a condition)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 20%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 4
- Median days to close, 50 most recently updated closed PRs
- not measured
Commits over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/jasonjfoster/rolloptim on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
The repository owner accepts GitHub Sponsors
Dependencies
Installing rolloptim adds 3 packages (3 with compiled code, 3.5 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppArmadillo 1.0 MB, RcppParallel 744 KB.
Code & Tests
People & History
- 1.0.0Latest2026-07-11 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-07-11
- Total releases
- 1 / 1 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 17 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("rolloptim")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.