This project simulates and evaluates 10,000 randomly weighted portfolios composed of AAPL, MSFT, and GOOGL stocks. It selects the one with the highest Sharpe Ratio and visualizes both the portfolio allocation and the efficient frontier.
- Simulates 10,000 portfolios using random weight allocations
- Computes expected return, volatility, and Sharpe Ratio
- Identifies the optimal portfolio based on maximum Sharpe Ratio
- Generates and saves:
- Efficient Frontier chart
- Portfolio Allocation Pie Chart
- Final weights as
.csv - Portfolio summary and performance
pip install -r requirements.txt
python app.pyapp.py– Main code for simulation and visualizationoptimal_portfolio_weights.csv– CSV of best asset allocationportfolio_summary.txt– Expected return, volatility, Sharpeefficient_frontier.png– Frontier of simulated portfoliosportfolio_pie_chart.png– Allocation breakdownrun_log.txt– Console output of the run
Saman Dadkhah
Master's in Artificial Intelligence – University of Verona
🔗 LinkedIn

