An interactive quantitative finance dashboard for analyzing historical equity performance, risk, market relationships and return distributions.
Built with Python, pandas, Plotly and Streamlit.
Stock Explorer is an end-to-end financial analysis application that retrieves historical market data, computes professional portfolio metrics and presents the results through an interactive dashboard.
Unlike many introductory stock dashboards that simply display historical prices, this project focuses on quantitative analysis, including risk-adjusted performance, rolling statistics, benchmark comparison and statistical characteristics of return distributions.
The project was developed as the first project in a larger quantitative finance programming portfolio.
One of the biggest differences between looking at a stock chart and performing quantitative analysis is asking why historical performance behaved the way it did.
Instead of answering only:
"What was the return?"
this project also explores questions such as:
- How volatile was the asset?
- How did risk evolve over time?
- How closely did it move with the market?
- Did it outperform what CAPM would predict?
- Were returns normally distributed?
- Which months contributed most to performance?
- How severe were historical drawdowns?
The application also generates automatic rule-based interpretations, transforming numerical metrics into concise analytical observations.
- Historical OHLCV data
- Adjusted closing prices
- Benchmark retrieval
- Data validation
- Daily returns
- Cumulative returns
- Total return
- Annualized return
- Rolling returns
- Annualized volatility
- Rolling volatility
- Drawdown
- Maximum drawdown
- Maximum drawdown period
- Benchmark comparison
- Correlation
- Rolling correlation
- Beta
- Rolling beta
- CAPM Alpha
- Return distribution
- Mean and median returns
- Skewness
- Excess kurtosis
- Best and worst trading days
- Monthly return heatmap
- Interactive price chart
- Moving averages
- Candlestick chart
- Trading volume
- Benchmark comparison
- Regression scatter plot
- Rolling analysis dashboard
- Distribution histogram
- Monthly heatmap
- Interactive Streamlit interface
- Custom theme
- Downloadable market data
- Automatic interpretation engine
- Cached analysis
- Input validation
src/
stock_explorer/
data.py
metrics.py
indicators.py
charts.py
interpretation.py
report.py
tests/
test_metrics.py
test_interpretation.py
assets/
screenshots/
app.py
README.md
requirements.txt
LICENSE
The project separates responsibilities into:
- data retrieval
- financial calculations
- technical indicators
- visualization
- interpretation
- report generation
allowing the dashboard layer to remain lightweight.
The screenshots below show an example analysis of AAPL relative to SPY over a user-selected historical period.
Review headline performance and risk metrics, moving averages, price history, trading volume and automatically generated interpretations.
Track how trailing returns, annualized volatility, correlation and beta evolve over time using a configurable rolling window.
Examine the distribution of daily returns, descriptive statistics and the strongest and weakest trading days in the selected period.
View compounded monthly returns in a calendar heatmap and identify the strongest and weakest months in the sample.
Compare the asset with a selected benchmark through normalized performance, excess return, beta, correlation and CAPM alpha.
- Python
- pandas
- NumPy
- Plotly
- Streamlit
- SciPy
- pytest
- yfinance
git clone https://github.com/enesozs/stock-explorer.git
cd stock-explorer
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtRun:
python -m streamlit run app.pyThe project includes automated unit tests covering:
- return calculations
- rolling metrics
- drawdown calculations
- benchmark statistics
- monthly returns
- interpretation rules
Run:
python -m pytestPossible extensions include:
- Portfolio analysis
- Multi-factor models
- Fama-French factors
- Monte Carlo simulation
- Portfolio optimization
- Efficient frontier
- Value at Risk (VaR)
- Expected Shortfall
- Forecasting models
This project involved:
- modular software design
- financial time series analysis
- statistical analysis
- interactive visualization
- quantitative performance measurement
- automated testing
- dashboard development
It also reinforced the importance of separating calculation, interpretation and presentation into independent components.
This application is intended for educational purposes.
Historical performance does not guarantee future results and the dashboard should not be interpreted as investment advice.




