Files
OpenBB/routines/portfolio_optimization_demo.openbb
Jeroen Bouma b976503860 Auto-fill routine scripts and add new scripts (#1889)
* Auto-fill routine scripts and add new scripts

* Get rid of 'routines' folder in all autocomplete statements

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-06-02 16:57:22 +02:00

26 lines
560 B
Plaintext
Vendored

# Go to the Portfolio Optimization (po) menu
portfolio/po
# Load in an allocation sheet with all S&P 500 tickers
load SP_500_Portfolio.xlsx
# Load in a parameters file
file OpenBB_Parameters_Template_v1.0.0.xlsx
# Apply the Hierarchical Risk Parity (hrp) technique
hrp
# Show HRP results based on sector
show HRP_0 -ct SECTOR
# Plot the sector distribution
plot HRP_0 -ct SECTOR -pi
# Show a histogram of returns and drawdowns
plot HRP_0 -ct SECTOR -hi -dd
# Show assets clustermap and risk contribution
plot HRP_0 -ct SECTOR -rc -he
# Return to home
/