{"id":26686448,"url":"https://github.com/dppalomar/riskparityportfolio","last_synced_at":"2025-04-12T16:52:43.121Z","repository":{"id":46869903,"uuid":"145556497","full_name":"dppalomar/riskParityPortfolio","owner":"dppalomar","description":"Design of Risk Parity Portfolios","archived":false,"fork":false,"pushed_at":"2022-11-15T08:52:05.000Z","size":89038,"stargazers_count":108,"open_issues_count":9,"forks_count":27,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-26T11:18:54.850Z","etag":null,"topics":["optimization","portfolio","risk","risk-parity"],"latest_commit_sha":null,"homepage":"https://CRAN.R-project.org/package=riskParityPortfolio","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dppalomar.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-21T11:47:16.000Z","updated_at":"2025-03-18T09:36:29.000Z","dependencies_parsed_at":"2023-01-22T03:03:24.623Z","dependency_job_id":null,"html_url":"https://github.com/dppalomar/riskParityPortfolio","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FriskParityPortfolio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FriskParityPortfolio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FriskParityPortfolio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dppalomar%2FriskParityPortfolio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dppalomar","download_url":"https://codeload.github.com/dppalomar/riskParityPortfolio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248601309,"owners_count":21131608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["optimization","portfolio","risk","risk-parity"],"created_at":"2025-03-26T11:19:00.154Z","updated_at":"2025-04-12T16:52:43.099Z","avatar_url":"https://github.com/dppalomar.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput:\n  html_document:\n    variant: markdown_github\n    keep_md: true\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nlibrary(knitr)\nopts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  fig.align = \"center\",\n  fig.retina = 2,\n  out.width = \"75%\",\n  dpi = 96\n)\nknit_hooks$set(pngquant = hook_pngquant)\n```\n\n\n# riskParityPortfolio\n\n[![codecov](https://codecov.io/gh/mirca/riskParityPortfolio/branch/master/graph/badge.svg?token=NhOMM6MOAv)](https://codecov.io/gh/mirca/riskParityPortfolio)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/riskParityPortfolio)](https://CRAN.R-project.org/package=riskParityPortfolio)\n[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/riskParityPortfolio)](https://CRAN.R-project.org/package=riskParityPortfolio)\n[![CRAN Downloads Total](https://cranlogs.r-pkg.org/badges/grand-total/riskParityPortfolio?color=brightgreen)](https://CRAN.R-project.org/package=riskParityPortfolio)\n[![Rcpp](https://img.shields.io/badge/powered%20by-Rcpp-orange.svg?style=flat)](http://www.rcpp.org/)\n\n\n**riskParityPortfolio** provides tools to design risk parity portfolios.\nIn its simplest form, we consider the convex formulation with a unique solution proposed by\n[Spinu (2013)](https://dx.doi.org/10.2139/ssrn.2297383) and use a cyclical method inspired by\n[Griveau-Billion (2013)](https://arxiv.org/pdf/1311.4057.pdf). For more general formulations,\nwhich are usually nonconvex, we implement the successive convex approximation\nmethod proposed by [Feng \u0026 Palomar (2015)](https://doi.org/10.1109/TSP.2015.2452219).\n\nThe latest stable version of **riskParityPortfolio** is available at https://CRAN.R-project.org/package=riskParityPortfolio.\n\nThe latest development version of **riskParityPortfolio** is available at https://github.com/dppalomar/riskParityPortfolio.\n\n**Check out the documentation here: [https://mirca.github.io/riskParityPortfolio](https://mirca.github.io/riskParityPortfolio/).**\n\n## Installation\nTo install the latest stable version of **riskParityPortfolio** from CRAN, run the following commands in R:\n```{r, eval = FALSE}\n\u003e install.packages(\"riskParityPortfolio\")\n```\n\nTo install the development version of **riskParityPortfolio** from GitHub, run the following commands in R:\n```{r, eval = FALSE}\n\u003e install.packages(\"devtools\")\n\u003e devtools::install_github(\"dppalomar/riskParityPortfolio\")\n```\n\nTo get help:\n```{r, eval = FALSE}\n\u003e library(riskParityPortfolio)\n\u003e help(package = \"riskParityPortfolio\")\n\u003e package?riskParityPortfolio\n\u003e ?riskParityPortfolio\n```\n\nPlease cite **riskParityPortfolio** in publications:\n```{r, eval = FALSE}\n\u003e citation(\"riskParityPortfolio\")\n```\n\nYou can also get **riskParityPortfolio** from Docker as follows:\n```\n$ docker pull mirca/riskparityportfolio\n```\n\n#### Microsoft Windows\nOn MS Windows environments, make sure to install the most recent version of\n**Rtools**.\n\n### Python\n\nA Python3 implementation of this package is currently under development at [https://github.com/dppalomar/riskparity.py](https://github.com/dppalomar/riskparity.py).\nIts stable version is available in PYPI and can be installed as follows:\n```\n$ pip install riskparityportfolio\n```\n\nAlternatively, the development version can be installed as\n```\n$ git clone https://github.com/dppalomar/riskparity.py\n$ cd riskparity.py\n$ pip install -e .\n```\n\n### Rust\n\nA Rust version is avaiable at: [https://github.com/mirca/riskparity.rs](https://github.com/mirca/riskparity.rs).\n\n## Basic usage\n\n```{r}\nlibrary(riskParityPortfolio)\n\nset.seed(42)\n# create covariance matrix\nN \u003c- 5\nV \u003c- matrix(rnorm(N^2), ncol = N)\nSigma \u003c- cov(V)\n\n# risk parity portfolio\nres \u003c- riskParityPortfolio(Sigma)\nnames(res)\nres$w\n\n# risk budgeting portfolio\nres \u003c- riskParityPortfolio(Sigma, b = c(0.4, 0.4, 0.1, 0.05, 0.05))\nres$relative_risk_contribution\n```\n\n## Documentation\nFor more detailed information, please check the\n[vignette](https://CRAN.R-project.org/package=riskParityPortfolio/vignettes/RiskParityPortfolio.html).\n\n## Citation\nIf you find this package useful in your research, please consider citing the following works:\n\n- J. V. de M. Cardoso and D. P. Palomar (2019). riskParityPortfolio:\n  Design of Risk Parity Portfolios. R package version 0.2.1.\n  \u003chttps://CRAN.R-project.org/package=riskParityPortfolio\u003e\n- Y. Feng, and D. P. Palomar (2015). SCRIP: Successive Convex Optimization Methods for\n  Risk Parity Portfolio Design. _IEEE Trans. on Signal Processing_, vol. 63, no. 19,\n  pp. 5285-5300. \u003chttps://doi.org/10.1109/TSP.2015.2452219\u003e\n- F. Spinu (2013). An Algorithm for Computing Risk Parity Weights.\n  \u003chttps://dx.doi.org/10.2139/ssrn.2297383\u003e\n- T. Griveau-Billion, J. Richard, and T. Roncalli (2013). A fast algorithm for computing High-dimensional risk parity portfolios. \u003chttps://arxiv.org/pdf/1311.4057.pdf\u003e\n\n\n## Contributing\nWe welcome all sorts of contributions. Please feel free to open an issue\nto report a bug or discuss a feature request.\n\n\n## Links\nPackage: [CRAN](https://CRAN.R-project.org/package=riskParityPortfolio) and [GitHub](https://github.com/dppalomar/riskParityPortfolio).\n\nREADME file: [GitHub-readme](https://github.com/dppalomar/riskParityPortfolio/blob/master/README.md).\n\nVignettes: [CRAN-vignette](https://CRAN.R-project.org/package=riskParityPortfolio/vignettes/RiskParityPortfolio.html),\n[slides R/Finance 2019](https://docs.google.com/viewer?url=https://github.com/dppalomar/riskParityPortfolio/raw/master/vignettes/RFinance2019-slides.pdf),\n[slides RPP - Convex Optimization Course (HKUST)](https://docs.google.com/viewer?url=https://github.com/dppalomar/riskParityPortfolio/raw/master/vignettes/slides-ConvexOptimizationCourseHKUST.pdf),\n[slides HKML meetup 2020](https://speakerdeck.com/mirca/breaking-down-risk-parity-portfolios-a-practical-open-source-implementation), and\n[tutorial - Data-driven Portfolio Optimization Course (HKUST)](https://www.youtube.com/watch?v=xb1Xxf5LQks)\n\n\n## Disclaimer\nThe information, software, and any additional resources contained in this repository are not intended as,\nand shall not be understood or construed as, financial advice.\nPast performance is not a reliable indicator of future results and investors may not recover the full\namount invested.\nThe [authors](https://github.com/dppalomar/riskParityPortfolio/blob/master/AUTHORS.md) of this repository\naccept no liability whatsoever for any loss or damage you may incur.  Any opinions expressed in this repository\nare from the personal research and experience of the [authors](https://github.com/dppalomar/riskParityPortfolio/blob/master/AUTHORS.md) and are intended as educational material.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdppalomar%2Friskparityportfolio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdppalomar%2Friskparityportfolio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdppalomar%2Friskparityportfolio/lists"}