Financial ML & Market Analytics Mar 31, 2026 Published project
Stock Market EDA with yfinance

Multi-asset market exploration and risk comparison

This project analyzes seven large-cap assets across sectors to compare prices, returns, volatility, cumulative performance, and cross-asset relationships.

PythonyfinancePandasNumPyMatplotlibSeaborn

Challenge

  • Multi-asset market behavior needs comparison across returns, volatility, and correlation rather than price charts alone.
  • Assets from different sectors can show different risk and diversification behavior.
  • Exploratory analysis needs a clean reproducible workflow before modeling.

System architecture

Market data
Returns
Volatility
Correlation

Data and inputs

Daily data from 2019 onward for AAPL, MSFT, AMZN, JPM, XOM, PFE, and TSLA, with engineered returns, moving averages, Bollinger Bands, cumulative returns, and normalized prices.

Technical approach

  • Download historical market data with yfinance.
  • Clean missing trading-day values and reshape into tidy format.
  • Compute return, volatility, cumulative performance, and normalized metrics.
  • Visualize distributions, risk, correlations, and cumulative performance.

Evaluation and results

Key indicators

7 large-cap assets

Key indicators

Daily data from 2019 onward

Key indicators

AAPL/MSFT return correlation ~0.69

  • TSLA showed the highest daily-return volatility in the selected group.
  • PFE showed the lowest volatility among the selected assets.
  • AAPL and MSFT had a strong positive return correlation of about 0.69.

Implementation and code

Implementation focus

The implementation connects data preparation, modeling, evaluation, and interpretation in a structured workflow that makes the technical decisions clear.

Source code

The code is available for exploring the implementation details and extending the experiment when needed.

Open source code

Scope and responsible use

The analysis is intended for modeling and evaluation, not investment advice. Real trading use would require risk controls, transaction-cost modeling, out-of-sample validation, and continuous monitoring.

Future development

  • Add sector-level aggregation and rolling-correlation analysis.
  • Add risk-adjusted metrics such as Sharpe and downside deviation.
  • Use the EDA outputs as a foundation for later modeling experiments.

Technical contribution

The project builds a clean foundation for financial analysis by comparing risk, return, and correlation across assets.