Robo-Advisor
Recommend stock portfolios based on your financial goals and market data.
Tools & Methods I used:
yfinance API => fetch historical stock prices; calculate key metrics: annual returns, annual risks (standard deviations of returns)
Daily stock returns => covariance matrix to quantify correlations between S&P 500 stocks
Modern Portfolio Theory => simulate 10,000 random portfolios with varying weights; compare expected returns, risks, and Sharpe Ratios - statistical measures of risk-adjusted performance; pick the top 5 that align with the initial investment amount with lowest risk and highest return.
Optimization => matrix operations (NumPy) & covariance analysis to identify portfolios that satisfy user-defined constraints, such as achieving a target annualized return within the given investment budget.
Try it Out
Might take up to 1 minute to generate portfolios for large initial investments