This project involves creating an optimal portfolio of stocks based on the Sharpe Ratio, a measure used to calculate risk-adjusted return.
The application uses historical stock price data to calculate portfolio returns, variances, and the Sharpe Ratio. It employs optimization techniques to determine the optimal weights of each stock in the portfolio that maximize the Sharpe Ratio.
- Calculation of the maximum Sharpe Ratio and the corresponding portfolio return and volatility.
- Visualization of the optimal portfolio weights using a Pie chart.
- Interactive interface for users to input their own investment amount and stock choices.
These instructions will help you run this application on your local machine.
To run this application, you'll need:
- Python
- Streamlit
- Pandas
- Numpy
- Scipy
- Plotly
These can be installed via pip:
pip install streamlit pandas numpy scipy plotly
To run the app, navigate to the directory containing the app file in your terminal and type:
streamlit run main.py
This should open a new tab in your web browser where you can interact with the application.
This project is a great tool for anyone interested in financial analytics, portfolio management, and data visualization. It demonstrates the power of Python and Streamlit for developing interactive web applications. Please note that these results are based on historical data and do not guarantee future performance. Always consult with a financial advisor or do your own research before making investment decisions.
This should provide a comprehensive overview of your project and how to use it. You may adjust it as necessary to match your application's specific features and requirements.