Date: January 21, 2024
Topic: How to Optimize a Portfolio
Recall
Using metrics, find a combination of stocks to get the highest return
Notes
Portfolio Optimization
- Given some assets and a time period, find an allocation of funds to assets to maximize performance
- Performance can be measured by: cumulative return, volatility or risk, risk adjust return (Sharpe ratio)
We can apply ranges and constraints on the value to optimize so that the optimizers conver faster
Optimizing Sharpe Ratio
Steps
- Provide a function to minimize $f(x)$
- Provide an initial guess for $x$
- Call the optimizer
$f(x)$ is the allocations of stocks, and we want to find the best allocation that optimizes this function
- We want the optimize $f(x)$ = -(Sharpe ratio)
- Since we want to obtain the maximum Sharpe ratio, we look at it as a negative minimization example
- The number of dimensions depends on the number of stocks (4 stocks = 4 dimensions)
Ranges and Constraints
To help the optimizer, we can introduce certain ranges to look at, or constrain the problem
- Ranges: limits on values for $x$
- 0 to 1 max allocation for an asset, as its allocation cannot go beyond 100%
- Constraints: properties of $x$ that must be True
- Total allocation of all assets should add up to 1 (otherwise it exceeds 100% of portfolio)
<aside>
📌 SUMMARY: When optimizing a portfolio, we may consider optimizing for some metrics used like Sharpe Ratio
</aside>