get_portfolio_metrics
Compute risk/return metrics for a weighted stock portfolio, including cumulative and annualized return, volatility, Sharpe ratio, and max drawdown.
Instructions
Compute risk/return metrics for a weighted portfolio of stocks.
Args: tickers: Ticker symbols in the portfolio, e.g. ['AAPL', 'MSFT']. weights: Portfolio weight per ticker, same order, must sum to 1.0. period: Lookback window: one of '1mo','3mo','6mo','1y','2y','5y','10y','ytd','max'. risk_free_rate: Annualized risk-free rate for the Sharpe ratio (e.g. 0.1075 for 10.75%).
Returns cumulative return, annualized return, annualized volatility, Sharpe ratio, and max drawdown for the combined portfolio.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | 1y | |
| tickers | Yes | ||
| weights | Yes | ||
| risk_free_rate | No |