PSU Quants Trading Portfolio
This Python script defines a Portfolio class that facilitates portfolio management and financial analysis. Key features include:
- Database Integration: Connects to a MySQL database to manage stock trades and holdings.
- Portfolio Analysis: Calculates metrics such as Assets Under Management (AUM), portfolio returns, Sharpe ratio, and beta.
- Stock Trading: Allows for buying and selling stocks with order management.
- Performance Evaluation: Compares portfolio performance against benchmarks and visualizes stock holdings and sector diversity.
- Moving Averages Strategy: Implements a strategy using short and long-term moving averages to identify buy and sell signals.
- Visualization: Provides graphical representations of portfolio performance, stock diversity, and historical returns using Matplotlib.
The script integrates with Yahoo Finance for data retrieval and supports various financial calculations and reporting functionalities essential for managing and analyzing investment portfolios.