Skip to content

HDShOP

High-Dimensional Shrinkage Optimal Portfolios

v0.1.7 · Nov 14, 2025 · GPL-3

Description

Constructs shrinkage estimators of high-dimensional mean-variance portfolios and performs high-dimensional tests on optimality of a given portfolio. The techniques developed in Bodnar et al. (2018 <doi:10.1016/j.ejor.2017.09.028>, 2019 <doi:10.1109/TSP.2019.2929964>, 2020 <doi:10.1109/TSP.2020.3037369>, 2021 <doi:10.1080/07350015.2021.2004897>) are central to the package. They provide simple and feasible estimators and tests for optimal portfolio weights, which are applicable for 'large p and large n' situations where p is the portfolio dimension (number of stocks) and n is the sample size. The package also includes tools for constructing portfolios based on shrinkage estimators of the mean vector and covariance matrix as well as a new Bayesian estimator for the Markowitz efficient frontier recently developed by Bauder et al. (2021) <doi:10.1080/14697688.2020.1748214>.

Downloads

CRAN

324

Last 30 days

14133rd

788

Last 90 days

3.7K

Last year

Trend: +52.1% (30d vs prior 30d)

r2u CRAN

0

Last 30 days

26

Last 90 days

135

Last year

Trend: -100% (30d vs prior 30d)

autoCRAN

8

Last 7 days

19

Last 30 days

2

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

c2d4u legacy CRAN

5

Last 30 days

17

Last 90 days

21

Last year

Trend: -58.3% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Line coverage

Expression

Tests / Examples

Functions

65 22 exported

Complexity

1.8 avg / 17 max

Call network

65 nodes / 82 edges

Test coverage has not been measured for this package yet; nodes fall back to a neutral fill.

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Compare versions

Code

Structure

Lines of code

4,093

Files

58

Compiled share

0%

Has compiled src

No

Language breakdown

R 2,099 (51.3%)Tests 887 (21.7%)Docs 1,107 (27%)

API

Exported functions

22

Internal functions

43

Recent export changes

v0.1.3+3 new_GMV_portfolio_weights_BDPS19_pgn, new_MV_portfolio_traditional_pgn, new_MV_portfolio_weights_BDOPS21_pgn

Testing & CI

Has tests

Yes

Test-to-code ratio

0.42

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.5.0

System requirements

C++ standard

License

GPL-3

License flags

SPDX valid, OSI approved

History

Versions

7

First release

2021-08-02

Latest release

2025-11-14

Avg cadence

216 days

Cold removal rate

Dep drift

1

LOC over versions

v0.1.0: 3,036 LOCv0.1.1: 3,038 LOCv0.1.2: 3,048 LOCv0.1.3: 3,451 LOCv0.1.5: 4,088 LOCv0.1.6: 4,093 LOCv0.1.7: 4,093 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (1)

suggests

Dependency Network

Dependencies Reverse dependencies Rdpack lattice DOSPortfolio HDShOP

Version History

8 tracked
new 0.1.7 Mar 10, 2026
updated 0.1.7 ← 0.1.6 diff Nov 13, 2025
updated 0.1.6 ← 0.1.5 diff Oct 18, 2025
updated 0.1.5 ← 0.1.3 diff Mar 24, 2024
updated 0.1.3 ← 0.1.2 diff Nov 7, 2022
updated 0.1.2 ← 0.1.1 diff Oct 22, 2021
updated 0.1.1 ← 0.1.0 diff Sep 2, 2021
new 0.1.0 Aug 1, 2021