# riskParityPortfolio
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/riskParityPortfolio)](https://CRAN.R-project.org/package=riskParityPortfolio)
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/riskParityPortfolio)](https://CRAN.R-project.org/package=riskParityPortfolio)
[![CRAN Downloads Total](https://cranlogs.r-pkg.org/badges/grand-total/riskParityPortfolio?color=brightgreen)](https://CRAN.R-project.org/package=riskParityPortfolio)
[![Rcpp](https://img.shields.io/badge/powered%20by-Rcpp-orange.svg?style=flat)](http://www.rcpp.org/)
[![codecov](https://codecov.io/gh/mirca/riskParityPortfolio/branch/master/graph/badge.svg)](https://codecov.io/gh/mirca/riskParityPortfolio)
[![Travis (.org) branch](https://img.shields.io/travis/mirca/riskParityPortfolio/master.svg?label=travis-ci&style=flat-square)](https://travis-ci.org/mirca/riskParityPortfolio)
[![Build status](https://img.shields.io/appveyor/ci/mirca/riskParityPortfolio.svg?label=windows&style=flat-square&logo=appveyor)](https://ci.appveyor.com/project/mirca/riskparityportfolio/branch/master)
[![CircleCI](https://circleci.com/gh/mirca/riskParityPortfolio.svg?style=svg)](https://circleci.com/gh/mirca/riskParityPortfolio)
[![Docker Build Status](https://img.shields.io/docker/build/mirca/riskparityportfolio.svg)](https://hub.docker.com/r/mirca/riskparityportfolio/)
[![Build Status](https://dev.azure.com/jvmirca/riskParityPortfolio/_apis/build/status/mirca.riskParityPortfolio?branchName=master)](https://dev.azure.com/jvmirca/riskParityPortfolio/_build/latest?definitionId=1&branchName=master)
**riskParityPortfolio** provides tools to design risk parity portfolios.
In its simplest form, we consider the convex formulation with a unique solution proposed by
[Spinu (2013)](https://dx.doi.org/10.2139/ssrn.2297383) and use a cyclical method inspired by
[Griveau-Billion (2013)](https://arxiv.org/pdf/1311.4057.pdf). For more general formulations,
which are usually nonconvex, we implement the successive convex approximation
method proposed by [Feng & Palomar (2015)](https://doi.org/10.1109/TSP.2015.2452219).
The latest stable version of **riskParityPortfolio** is available at https://CRAN.R-project.org/package=riskParityPortfolio.
The latest development version of **riskParityPortfolio** is available at https://github.com/dppalomar/riskParityPortfolio.
**Check out the documentation here: [https://mirca.github.io/riskParityPortfolio](https://mirca.github.io/riskParityPortfolio).**
## Installation
To install the latest stable version of **riskParityPortfolio** from CRAN, run the following commands in R:
```r
> install.packages("riskParityPortfolio")
```
To install the development version of **riskParityPortfolio** from GitHub, run the following commands in R:
```r
> install.packages("devtools")
> devtools::install_github("dppalomar/riskParityPortfolio")
```
To get help:
```r
> library(riskParityPortfolio)
> help(package = "riskParityPortfolio")
> package?riskParityPortfolio
> ?riskParityPortfolio
```
Please cite **riskParityPortfolio** in publications:
```r
> citation("riskParityPortfolio")
```
You can also get **riskParityPortfolio** from Docker as follows:
```
$ docker pull mirca/riskparityportfolio
```
#### Microsoft Windows
On MS Windows environments, make sure to install the most recent version of
**Rtools**.
### Python
A Python3 implementation of this package is currently under development at [https://github.com/dppalomar/riskparity.py](https://github.com/dppalomar/riskparity.py).
Its stable version is available in PYPI and can be installed as follows:
```
$ pip install riskparityportfolio
```
Alternatively, the development version can be installed as
```
$ git clone https://github.com/dppalomar/riskparity.py
$ cd python
$ pip install -e .
```
## Basic usage
```r
library(riskParityPortfolio)
set.seed(42)
# create covariance matrix
N <- 5
V <- matrix(rnorm(N^2), ncol = N)
Sigma <- cov(V)
# risk parity portfolio
res <- riskParityPortfolio(Sigma)
names(res)
#> [1] "w" "relative_risk_contribution"
#> [3] "is_feasible"
res$w
#> [1] 0.32715962 0.27110678 0.14480081 0.09766356 0.15926922
# risk budgeting portfolio
res <- riskParityPortfolio(Sigma, b = c(0.4, 0.4, 0.1, 0.05, 0.05))
res$relative_risk_contribution
#> [1] 0.40 0.40 0.10 0.05 0.05
```
## Documentation
For more detailed information, please check the
[vignette](https://CRAN.R-project.org/package=riskParityPortfolio/vignettes/RiskParityPortfolio.html).
## Citation
If you find this package useful in your research, please consider citing the following works:
- J. V. de M. Cardoso and D. P. Palomar (2019). riskParityPortfolio:
Design of Risk Parity Portfolios. R package version 0.2.1.
<https://CRAN.R-project.org/package=riskParityPortfolio>
- Y. Feng, and D. P. Palomar (2015). SCRIP: Successive Convex Optimization Methods for
Risk Parity Portfolio Design. _IEEE Trans. on Signal Processing_, vol. 63, no. 19,
pp. 5285-5300. <https://doi.org/10.1109/TSP.2015.2452219>
- F. Spinu (2013). An Algorithm for Computing Risk Parity Weights.
<https://dx.doi.org/10.2139/ssrn.2297383>
- T. Griveau-Billion, J. Richard, and T. Roncalli (2013). A fast algorithm for computing High-dimensional risk parity portfolios. <https://arxiv.org/pdf/1311.4057.pdf>
## Contributing
We welcome all sorts of contributions. Please feel free to open an issue
to report a bug or discuss a feature request.
## Links
Package: [CRAN](https://CRAN.R-project.org/package=riskParityPortfolio) and [GitHub](https://github.com/dppalomar/riskParityPortfolio).
README file: [GitHub-readme](https://github.com/dppalomar/riskParityPortfolio/blob/master/README.md).
Vignettes: [CRAN-vignette](https://CRAN.R-project.org/package=riskParityPortfolio/vignettes/RiskParityPortfolio.html),
[slides R/Finance 2019](https://docs.google.com/viewer?url=https://github.com/dppalomar/riskParityPortfolio/raw/master/vignettes/RFinance2019-slides.pdf),
[slides RPP - Convex Optimization Course (HKUST)](https://docs.google.com/viewer?url=https://github.com/dppalomar/riskParityPortfolio/raw/master/vignettes/slides-ConvexOptimizationCourseHKUST.pdf),
[slides HKML meetup 2020](https://speakerdeck.com/mirca/breaking-down-risk-parity-portfolios-a-practical-open-source-implementation), and
[tutorial - Data-driven Portfolio Optimization Course (HKUST)](https://www.youtube.com/watch?v=xb1Xxf5LQks)
## Disclaimer
The information, software, and any additional resources contained in this repository are not intended as,
and shall not be understood or construed as, financial advice.
Past performance is not a reliable indicator of future results and investors may not recover the full
amount invested.
The [authors](https://github.com/dppalomar/riskParityPortfolio/blob/master/AUTHORS.md) of this repository
accept no liability whatsoever for any loss or damage you may incur. Any opinions expressed in this repository
are from the personal research and experience of the [authors](https://github.com/dppalomar/riskParityPortfolio/blob/master/AUTHORS.md) and are intended as educational material.
没有合适的资源?快使用搜索试试~ 我知道了~
riskParityPortfolio:风险平价投资组合设计
共91个文件
r:22个
pdf:16个
html:7个
5星 · 超过95%的资源 需积分: 50 16 下载量 145 浏览量
2021-05-28
19:42:01
上传
评论 1
收藏 18.19MB ZIP 举报
温馨提示
riskParityPortfolio riskParityPortfolio提供了用于设计风险平价投资组合的工具。 在最简单的形式中,我们考虑了提出的具有唯一解决方案的凸公式,并使用了受启发的循环方法。 对于通常是非凸的更一般的公式,我们采用提出的逐次凸逼近方法。 最新的RiskParityPortfolio稳定版本可从。 可以从获取RiskParityPortfolio的最新开发版本。 在此处查看文档: https : //mirca.github.io/riskParityPortfolio 。 安装 要从CRAN安装最新稳定版本的riskParityPortfolio ,请在R中运行以下命令: > install.packages( " riskParityPortfolio " ) 要从GitHub安装开发版本的riskParityPortfolio ,请在R中运
资源详情
资源评论
资源推荐
收起资源包目录
riskParityPortfolio-master.zip (91个子文件)
riskParityPortfolio-master
.gitattributes 47B
.roxygenize.R 31B
.github
issue_template.md 578B
vignettes
example.html 1.15MB
figures
EWP-and-RPP-w-and-RRC.png 167KB
RiskParityPortfolio.html 890KB
RiskParityPortfolio.Rmd 40KB
LinearConstraints.html 755KB
slides-RFinance2019.pdf 122KB
RiskParityPortfolio.html.asis 201B
render_vignette.sh 141B
example.Rmd 9KB
Sigma_mu.RData 689B
slides-ConvexOptimizationCourseHKUST.pdf.asis 216B
RFinance2019-slides.pdf 539KB
refs.bib 4KB
ieee.csl 11KB
.gitignore 7B
example.pdf 105KB
slides-ConvexOptimizationCourseHKUST.pdf 409KB
slides-RFinance2019.pdf.asis 190B
NAMESPACE 161B
R_buildignore
EfficientComputations.Rmd 28KB
sparse
_sparseSuccessiveConvexApprox.R 4KB
_sparseRiskParityPortfolio.R 3KB
jss.cls 15KB
developer_commands.R 2KB
EfficientComputations.html 173KB
README.html 641KB
NEWS.md 1KB
riskParityPortfolio.Rproj 303B
cran-comments.md 317B
DESCRIPTION 2KB
src
risk_parity_with_constraints.cc 3KB
newton_nesterov.cc 2KB
objfunctions.cc 612B
objfunctions.h 406B
cyclical_coordinate_descent.cc 5KB
RcppExports.cpp 10KB
risk_parity_with_constraints.h 1KB
cyclical_coordinate_descent.h 582B
newton_nesterov.h 498B
Dockerfile 100B
.circleci
config.yml 2KB
inst
CITATION 2KB
R
riskFormulations.R 8KB
genSolver.R 6KB
riskParityPortfolio.R 28KB
rppWithConstraints.R 2KB
RcppExports.R 2KB
plotting.R 5KB
riskParityPortfolio-package.R 2KB
.compileAttributes.R 46B
.travis.yml 237B
.Rbuildignore 660B
LICENSE 34KB
AUTHORS.md 57B
README.md 7KB
Makefile 275B
azure-pipelines.yml 464B
man
riskParityPortfolio-package.Rd 2KB
riskParityPortfolio.Rd 9KB
barplotPortfolioRisk.Rd 2KB
papers
GiselssonDoanKeviczkyDeSchutterRantzer-Automata2013.pdf 1.81MB
MAFS6010R-Rsession_solvers.html 1.44MB
iq-insights-risk-parity-a-new-way-of-viewing-asset-allocation.pdf 150KB
GriveauRichardRoncalli2013.pdf 509KB
risk_parity_notes.tex 6KB
risk_parity_notes.pdf 197KB
RoncalliWeisang2016 - Risk parity portfolios with risk factors.pdf 656KB
FengPalomar-ICASSP2016.pdf 294KB
whitepaper-risk-parity-asset-allocation.pdf 1.2MB
Feng&Palomar - Signal Processing Perspective on Financial Engineering, FnT on Signal Processing, Now Publishers (2016).pdf 3.13MB
FengPalomar-TSP2015 - risk_parity_portfolio.pdf 3.29MB
Spinu2013 - cccp_rp.pdf 273KB
MAFS6010R-slides_risk_parity_portfolio.pdf 687KB
RichardRoncalli2019.pdf 818KB
MAFS6010R-Rsession_risk_parity_portfolio.html 5.33MB
appveyor.yml 762B
tests
testthat
test-checks.R 1KB
test-point-feasibility.R 845B
test-newton-cyclical.R 713B
test-pyrb.R 2KB
test-riskFormulations.R 981B
test-riskFormulationsGradients.R 5KB
test-meanReturn.R 2KB
test-constraints.R 6KB
_testNormLpApproximation.R 399B
testthat.R 82B
.gitignore 189B
README.Rmd 7KB
共 91 条
- 1
皂皂七虫
- 粉丝: 25
- 资源: 4637
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1