mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-28 20:23:36 +00:00
1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[39711],{3905:(t,e,r)=>{r.d(e,{Zo:()=>d,kt:()=>c});var a=r(67294);function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e){if(null==t)return{};var r,a,n=function(t,e){if(null==t)return{};var r,a,n={},o=Object.keys(t);for(a=0;a<o.length;a++)r=o[a],e.indexOf(r)>=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a<o.length;a++)r=o[a],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var p=a.createContext({}),s=function(t){var e=a.useContext(p),r=e;return t&&(r="function"==typeof t?t(e):i(i({},e),t)),r},d=function(t){var e=s(t.components);return a.createElement(p.Provider,{value:e},t.children)},m={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},h=a.forwardRef((function(t,e){var r=t.components,n=t.mdxType,o=t.originalType,p=t.parentName,d=l(t,["components","mdxType","originalType","parentName"]),h=s(r),c=n,u=h["".concat(p,".").concat(c)]||h[c]||m[c]||o;return r?a.createElement(u,i(i({ref:e},d),{},{components:r})):a.createElement(u,i({ref:e},d))}));function c(t,e){var r=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var o=r.length,i=new Array(o);i[0]=h;var l={};for(var p in e)hasOwnProperty.call(e,p)&&(l[p]=e[p]);l.originalType=t,l.mdxType="string"==typeof t?t:n,i[1]=l;for(var s=2;s<o;s++)i[s]=r[s];return a.createElement.apply(null,i)}return a.createElement.apply(null,r)}h.displayName="MDXCreateElement"},42538:(t,e,r)=>{r.r(e),r.d(e,{assets:()=>p,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>l,toc:()=>s});var a=r(87462),n=(r(67294),r(3905));const o={title:"Portfolio Optimization",keywords:["portfolio","optimization","mean variance","risk parity","black litterman","mean risk","hierarchical clustering models"],excerpt:"The Introduction to Portfolio Optimization within the Portfolio menu explains how to use various portfolio optimization techniques and provides a brief description of its sub-menus"},i=void 0,l={unversionedId:"guides/intros/portfolio/po",id:"guides/intros/portfolio/po",title:"Portfolio Optimization",description:"The Portfolio Optimization menu allows the user to apply advanced optimization techniques to a portfolio of any type and of any size. It does so by introducing a multitude of optimization techniques ranging from mean-variance optimization to risk parity models and hierarchical clustering models. By providing Excel templates, the user can make sense of the vast array of parameters that each command has. E.g. think of the historic period you wish to use or which of the more than 10 risk measures and covariance methods should be used? These are questions the templates make easier to answer.",source:"@site/content/sdk/guides/intros/portfolio/po.md",sourceDirName:"guides/intros/portfolio",slug:"/guides/intros/portfolio/po",permalink:"/sdk/guides/intros/portfolio/po",draft:!1,editUrl:"https://github.com/OpenBB-finance/OpenBBTerminal/edit/main/website/content/sdk/guides/intros/portfolio/po.md",tags:[],version:"current",frontMatter:{title:"Portfolio Optimization",keywords:["portfolio","optimization","mean variance","risk parity","black litterman","mean risk","hierarchical clustering models"],excerpt:"The Introduction to Portfolio Optimization within the Portfolio menu explains how to use various portfolio optimization techniques and provides a brief description of its sub-menus"},sidebar:"tutorialSidebar",previous:{title:"Portfolio",permalink:"/sdk/guides/intros/portfolio/"},next:{title:"Quantitative Analysis",permalink:"/sdk/guides/intros/quantitative-analysis"}},p={},s=[{value:"How to use",id:"how-to-use",level:2},{value:"OpenBB Parameters Template",id:"openbb-parameters-template",level:3},{value:"OpenBB Portfolio Template",id:"openbb-portfolio-template",level:3},{value:"Performing optimization",id:"performing-optimization",level:3},{value:"Examples",id:"examples",level:2}],d={toc:s};function m(t){let{components:e,...r}=t;return(0,n.kt)("wrapper",(0,a.Z)({},d,r,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"The Portfolio Optimization menu allows the user to apply advanced optimization techniques to a portfolio of any type and of any size. It does so by introducing a multitude of optimization techniques ranging from ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/m/meanvariance-analysis.asp",target:"_blank",rel:"noreferrer noopener"},"mean-variance optimization")," to ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/r/risk-parity.asp",target:"_blank",rel:"noreferrer noopener"},"risk parity models")," and ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/c/cluster_analysis.asp",target:"_blank",rel:"noreferrer noopener"},"hierarchical clustering models"),". By providing Excel templates, the user can make sense of the vast array of parameters that each command has. E.g. think of the historic period you wish to use or which of the more than 10 risk measures and covariance methods should be used? These are questions the templates make easier to answer."),(0,n.kt)("p",null,"The capabilities of the ",(0,n.kt)("a",{parentName:"p",href:"/terminal/guides/intros/portfolio/po"},"Portfolio Optiminzation menu")," from the OpenBB Terminal are wrapped into a powerful SDK, enabling users to work with the data in a flexible environment that can be fully customized to meet the needs of any user. These functionalities allow the user to apply advanced optimization techniques to a portfolio of any type and of any size. It does so by introducing a multitude of optimization techniques ranging from ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/m/meanvariance-analysis.asp",target:"_blank",rel:"noreferrer noopener"},"mean-variance optimization")," to ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/r/risk-parity.asp",target:"_blank",rel:"noreferrer noopener"},"risk parity models")," and ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/c/cluster_analysis.asp",target:"_blank",rel:"noreferrer noopener"},"hierarchical clustering models"),". By providing Excel templates, the user can make sense of the vast array of parameters that each command has. E.g. think of the historic period you wish to use or which of the more than 10 risk measures and covariance methods should be used? These are questions the templates make easier to answer."),(0,n.kt)("h2",{id:"how-to-use"},"How to use"),(0,n.kt)("p",null,"Start a Python script or Notebook file by importing the module:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},"from openbb_terminal.sdk import openbb\n")),(0,n.kt)("p",null,"This menu requires the usage of the Excel templates to work properly. As there is a lot of complexity involved around these techniques, these templates allow the user to understand what values for each parameter are actually used and allow for an easy way to define the allocation."),(0,n.kt)("admonition",{type:"note"},(0,n.kt)("mdxAdmonitionTitle",{parentName:"admonition"},"For this there are two templates that need to be set, the ",(0,n.kt)("strong",{parentName:"mdxAdmonitionTitle"},"OpenBB Parameters Template")," and the ",(0,n.kt)("strong",{parentName:"mdxAdmonitionTitle"},"60_40_Portfolio.xlsx"),". These files can be found in ",(0,n.kt)("a",{parentName:"mdxAdmonitionTitle",href:"https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/miscellaneous/portfolio_examples"},"here"),". One is in the ",(0,n.kt)("inlineCode",{parentName:"mdxAdmonitionTitle"},"allocation")," folder and the other is in ",(0,n.kt)("inlineCode",{parentName:"mdxAdmonitionTitle"},"optimization"),'. the Select a file and press "Download" on the right, then place it into the OpenBBUserData folder. You can find more about this folder ',(0,n.kt)("a",{parentName:"mdxAdmonitionTitle",href:"/sdk/advanced/data"},"here"),".")),(0,n.kt)("h3",{id:"openbb-parameters-template"},"OpenBB Parameters Template"),(0,n.kt)("p",null,"This template provides the user with the ability to set define values for each parameter based on the optimization technique that is deployed. E.g. if you select ",(0,n.kt)("inlineCode",{parentName:"p"},"riskparity")," for the ",(0,n.kt)("inlineCode",{parentName:"p"},"technique")," parameter, you will notice that some parameters turn ",(0,n.kt)("span",{style:{color:"#BEBEBE"}},"grey"),". This means that the parameter is irrelevant for the selected method."),(0,n.kt)("p",null,"The OpenBB Terminal does, however, allow the user to run any model despite the ",(0,n.kt)("inlineCode",{parentName:"p"},"technique")," you selected. Therefore, if you are interested in running multiple models, consider removing the value for ",(0,n.kt)("inlineCode",{parentName:"p"},"technique"),". Do note that this makes it more difficult to understand which values are used for which model."),(0,n.kt)("a",{target:"_blank",href:"https://user-images.githubusercontent.com/46355364/171144692-dd812efd-1e95-4a71-a93f-7ae8a480fe5d.png"},(0,n.kt)("img",{alt:"OpenBB Parameters Template",src:"https://user-images.githubusercontent.com/46355364/171144692-dd812efd-1e95-4a71-a93f-7ae8a480fe5d.png"})),(0,n.kt)("h3",{id:"openbb-portfolio-template"},"OpenBB Portfolio Template"),(0,n.kt)("p",null,"This template hands the user a format to work with it to define the portfolio. Here, categorization is applied based on asset class, sector, industry, country and currency. By using the dropdown menus within this Excel, you are able to apply the proper categorization. This is based on the same methodology as found in other areas of the terminal."),(0,n.kt)("a",{target:"_blank",href:"https://user-images.githubusercontent.com/46355364/171145061-cd618153-801c-4771-ba57-7ee0ab8c57e8.png"},(0,n.kt)("img",{alt:"OpenBB Portfolio Template",src:"https://user-images.githubusercontent.com/46355364/171145061-cd618153-801c-4771-ba57-7ee0ab8c57e8.png"})),(0,n.kt)("p",null,"You can load in the portfolio template with the following code:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},"import pandas as pd\n\n# Define your own orderbook path here, current value won't work\norder_book_path = \"60_40_Portfolio.xlsx\"\n\n# Read in the file\norder_book = pd.read_excel(order_book_path)\n\n# Adjust the columns accordingly\norder_book_cols = ['Ticker', 'Asset Class', 'Sector', 'Industry', 'Country',\n 'Current Invested Amount', 'Currency']\n\norder_book = order_book[order_book_cols]\n\n# Load in the portfolio\np = openbb.portfolio.po.load(symbols_file_path=order_book_path)\nweights, performance = openbb.portfolio.po.equal(portfolio_engine=p)\n")),(0,n.kt)("h3",{id:"performing-optimization"},"Performing optimization"),(0,n.kt)("p",null,"Based on the parameters and allocation the user has set, the optimization process begins. What optimization technique is ideal depends entirely on the user's risk profile and objectives. As an illustration, ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/r/risk-parity.asp",target:"_blank",rel:"noreferrer noopener"},"Risk Parity")," is presented below:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},"# Perform calculations\nweights_riskparity, data_returns_riskparity = openbb.portfolio.po.riskparity(p)\n\nweights_riskparity\n")),(0,n.kt)("p",null,"Which returns:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"}),(0,n.kt)("th",{parentName:"tr",align:"right"},"Risk Parity"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"AAPL"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.0462")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"AMZN"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04545")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"APTV"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.03177")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"ASML"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.03328")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"BABA"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04192")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"GOOGL"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04758")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"HYG"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.13093")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"NKE"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04909")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"TIP"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.30826")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"TLT"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.21927")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"TSM"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04626")))),(0,n.kt)("p",null,"It is possible to use the commands without loading in the parameters template or by using the parameters template but changing some arguments directly into the terminal. For example, using the same method as described above, the risk measure is changed to ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/c/conditional_value_at_risk.asp",target:"_blank",rel:"noreferrer noopener"},"Conditional Value at Risk (CVaR)")," and the used historic period is increased to 10 years (keeping all other parameters unchanged):"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},'# Perform calculations\nweights_riskparity, data_returns_riskparity = openbb.portfolio.po.riskparity(p, interval="10y", risk_measure="CVaR")\n\nweights_riskparity\n')),(0,n.kt)("p",null,"Which returns:"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"}),(0,n.kt)("th",{parentName:"tr",align:"right"},"Risk Parity"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"AAPL"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04843")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"AMZN"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04302")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"APTV"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.03907")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"ASML"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.03717")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"GOOGL"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04877")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"HYG"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.14643")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"NKE"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.05275")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"TIP"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.33264")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"TLT"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.20371")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"TSM"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.04802")))),(0,n.kt)("h2",{id:"examples"},"Examples"),(0,n.kt)("p",null,"To demonstrate the capabilities of the Portfolio Optimization menu, the entire ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/s/sp500.asp",target:"_blank",rel:"noreferrer noopener"},"S&P 500 index")," (as of 30th of May 2022) is used and optimized and analysed in a variety of ways. Starting by loading in the dataset with the following:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},"import pandas as pd\n\n# Define your own orderbook path here, current value won't work\norder_book_path = \"pathto/SP_500_Portfolio.xlsx\"\n\n# Read in the file\norder_book = pd.read_excel(order_book_path)\n\n# Adjust the columns accordingly\norder_book_cols = ['Ticker', 'Asset Class', 'Sector', 'Industry', 'Country',\n 'Current Invested Amount', 'Currency']\n\norder_book = order_book[order_book_cols]\n\n# Load in the portfolio\ntickers, categories = openbb.portfolio.po.load(symbols_file_path=order_book_path)\n")),(0,n.kt)("p",null,"Then, the ",(0,n.kt)("a",{href:"https://jpm.pm-research.com/content/42/4/59.short",target:"_blank",rel:"noreferrer noopener"},"Hierarchical Risk Parity")," technique is applied by using the following:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-python"},"order_book_path = \"pathto/SP_500_Portfolio.xlsx\"\n\norder_book = pd.read_excel(order_book_path)\n# Adjust the columns accordingly\norder_book_cols = [\n 'Ticker',\n 'Asset Class',\n 'Sector',\n 'Industry',\n 'Country',\n 'Current Invested Amount',\n 'Currency',\n]\n\norder_book = order_book[order_book_cols]\n\np = openbb.portfolio.po.load(symbols_file_path=order_book_path)\nriskparity, data_returns_riskparity = openbb.portfolio.po.hrp(p, interval=\"5y\",\n risk_measure='SLPM',\n risk_aversion=0.8)\n\nprint(riskparity)\nprint(data_returns_riskparity)\n")),(0,n.kt)("p",null,"This results in the following (the result is edited, as it would show 500 tickers, to prevent flooding this page):"),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:"left"}),(0,n.kt)("th",{parentName:"tr",align:"right"},"Hierarchical Risk Parity"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"A"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00199")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"AAL"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00104")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"AAP"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00185")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"AAPL"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00184")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"ABBV"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.0028")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"..."),(0,n.kt)("td",{parentName:"tr",align:"right"},"...")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"NOC"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00228")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"XOM"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00167")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"ZBRA"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00156")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"ZION"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.0014")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:"left"},"ZTS"),(0,n.kt)("td",{parentName:"tr",align:"right"},"0.00225")))),(0,n.kt)("p",null,"It is possible to delve further into these findings with the ",(0,n.kt)("inlineCode",{parentName:"p"},"plot")," functionality for example done by looking at the portfolio's returns ",(0,n.kt)("a",{href:"https://www.investopedia.com/terms/h/histogram.asp",target:"_blank",rel:"noreferrer noopener"},"histogram")," which also includes a variety of risk measures as well as the portfolio's drawdowns."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"openbb.portfolio.po.plot(p, category='SECTOR', chart_type=\"hist\")\n")),(0,n.kt)("a",{target:"_blank",href:"https://user-images.githubusercontent.com/46355364/171145848-5a3f5333-6b7f-4d7a-a96e-0859adb1ce78.png"},(0,n.kt)("img",{alt:"Portfokio Returns Histogram",src:"https://user-images.githubusercontent.com/46355364/171145848-5a3f5333-6b7f-4d7a-a96e-0859adb1ce78.png"})),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"openbb.portfolio.po.plot(p, category='SECTOR', chart_type=\"dd\")\n")),(0,n.kt)("a",{target:"_blank",href:"https://user-images.githubusercontent.com/46355364/171145983-2d2c1c2e-67d2-4839-b43a-51bd22332de8.png"},(0,n.kt)("img",{alt:"Portfolio Drawdowns",src:"https://user-images.githubusercontent.com/46355364/171145983-2d2c1c2e-67d2-4839-b43a-51bd22332de8.png"})))}m.isMDXComponent=!0}}]); |