Stock Market Analysis and Prediction

股市分析与预测

Tools: Python, Pandas, NumPy, Matplotlib, Seaborn, Plotly, Cufflinks

Final Project

NoteBook Link - Recommended to view in Google Colab.

This project analyzes the stock performance of six major U.S. banks—Bank of America, CitiGroup, Goldman Sachs, JPMorgan Chase, Morgan Stanley, and Wells Fargo—from the 2007–2008 financial crisis through early 2016. Using historical stock price data, the analysis focuses on closing price trends, daily return volatility, and inter-bank correlations. Various visualizations such as pair plots, time series charts, heatmaps, and candlestick charts are used to explore long-term stock behaviors and risk patterns during periods of economic turbulence.

Applied techniques

  • Time series construction with pd.concat using multi-level column indexing

  • Daily returns calculated with .pct_change() and volatility measured using .std()

  • Pairplot visualization of return distributions across banks

  • Line plots and interactive Plotly charts for trend analysis

  • Rolling averages to examine smoothed performance over time

  • Heatmaps and cluster maps to evaluate inter-bank stock correlations

  • Candlestick and technical analysis overlays (e.g., SMA, Bollinger Bands) for selected periods