Skip to content

About

Streamlit app for building optimal portfolios using Sharpe Ratio and financial data

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

📈 Portfolio Optimizer (Sharpe Ratio)

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.

🔍 Features

  • 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

🖼 Preview

Efficient Frontier:
Efficient Frontier

Portfolio Allocation:
Portfolio Pie Chart

▶️ How to Run

pip install -r requirements.txt
python app.py

📂 Files

  • app.py – Main code for simulation and visualization
  • optimal_portfolio_weights.csv – CSV of best asset allocation
  • portfolio_summary.txt – Expected return, volatility, Sharpe
  • efficient_frontier.png – Frontier of simulated portfolios
  • portfolio_pie_chart.png – Allocation breakdown
  • run_log.txt – Console output of the run

👤 Author

Saman Dadkhah
Master's in Artificial Intelligence – University of Verona
🔗 LinkedIn

About

Streamlit app for building optimal portfolios using Sharpe Ratio and financial data

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages