The package features a framework for working with high-dimensional shrinkage optimal portfolios. It allows constructing those in two ways: 1) by applying shrinkage directly to the portfolio weights (function MVShrinkPortfolio
) and 2) by obtaining shrinkage estimates of mean returns and covariance matrices (function MeanVar_portfolio
).
The latest stable release is always on CRAN:
install.packages('HDShOP')
The latest development version can be installed in the following way:
library("remotes") u<-"Otryakhin-Dmitry/" r<-"global-minimum-variance-portfolio" re <- paste(u,r,sep="") remotes::install_github(repo=re, subdir="")
In this example, returns of assets from S&P500 are loaded and an MV portfolio is created, for which methods summary
and plot
are called.
library(HDShOP) # loading S&P daily asset returns data("SP_daily_asset_returns") assets <- t(SP_daily_asset_returns[2:301, 2:201]) gamma<-1 p <- nrow(assets) b<-exp(-0.1*(1:p)) # creating an MV shrinkage portfolio sh_mv_port <- MVShrinkPortfolio(x=assets, gamma=gamma, type='shrinkage', b=b, beta = 0.05) # Making a summary and plotting the portfolio summary(sh_mv_port) plot(sh_mv_port)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4