Non-Linear Shrinkage Estimator from Ledoit and Wolf (2018)
Project description
Non-Linear Shrinkage
Provides a function that calculates an estimate of the covariance matrix shrunk using a non-linear analytic formula provided by the working paper Ledoit and Wolf (2018), entitled ['Analytical Nonlinear Shrinkage of Large-Dimensional Covariance Matrices'] (http://www.econ.uzh.ch/static/wp/econwp264.pdf).
Installation
pip install nonlinshrink
Usage
import numpy as np
import nonlinshrink as nls
p = 2
n = 10
sigma = np.eye(p, p)
data = np.random.multivariate_normal(np.zeros(p), sigma, n)
sigma_tilde = nls.shrink_cov(data)
Developing
Please submit a PR! The shrinkage function itself is located in import nonlinshrink.py
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file nonlinshrink-0.5-py3-none-any.whl
.
File metadata
- Download URL: nonlinshrink-0.5-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.19.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13ae080e7c1be430ed652db1b4d85a6a0135f3beac98dbe94d2fccdfae28088a |
|
MD5 | cea9d47701841ebc1b3f21fea6cecec2 |
|
BLAKE2b-256 | 0e406ef120d2f184751e420ce3e532c4ff33908cf87e0c961219733e5ad26cb2 |