A data-driven comparison of Bitcoin (BTC) and Ethereum (ETH) across three dimensions: trend analysis, risk profile assessment, and correlation analysis.
comparative_analysis.ipynb # Main analysis notebook
crypto_data_20251019_142608.csv # Source dataset (required)
README.md # This file
Reports.md # Full findings and insights
| Property | Value |
|---|---|
| Source file | crypto_data_20251019_142608.csv |
| Date range | October 20, 2024 – October 19, 2025 |
| Records | 732 rows (366 per coin) |
| Coins | Bitcoin (bitcoin), Ethereum (ethereum) |
| Column | Description |
|---|---|
date |
Trading date |
coin |
Asset identifier (bitcoin or ethereum) |
price |
Daily closing price (USD) |
volume |
Daily trading volume (USD) |
market_cap |
Market capitalisation (USD) |
daily_return |
Day-over-day percentage return |
ma_7 |
7-day moving average of price |
ma_30 |
30-day moving average of price |
volatility_30d |
30-day rolling standard deviation of returns |
cumulative_return |
Cumulative return since start of period |
Note on missing values:
daily_returnandcumulative_returnareNaNfor the first row of each coin (no prior day).volatility_30disNaNfor the first ~30 rows. These are expected for time-series calculations and are handled via.dropna()throughout.
Compares price performance, moving averages, and trading volume between the two assets.
- A1: Basic price statistics (mean, median, min, max, total return)
- A2: Raw price trend visualisation
- A3: Normalised price comparison (base 100)
- A4: Moving average analysis (7-day and 30-day MA with trend signals)
- A5: Volume analysis and comparison
Quantifies the risk characteristics of each asset.
- B1: Daily returns distribution (skewness, kurtosis, range)
- B2: Volatility analysis (daily, annualised, rolling 30-day)
- B3: Drawdown analysis (maximum drawdown, current drawdown, longest recovery)
- B4: Value at Risk — VaR and CVaR at 95% confidence
- B5: Risk-adjusted returns (Sharpe Ratio, Sortino Ratio, win rate)
Examines the relationship between BTC and ETH returns.
- C1: Data preparation (date-aligned merged return series)
- C2: Pearson and Spearman correlation coefficients
- C3: Scatter plot with regression line
- C4: 30-day rolling correlation
- C5: Correlation by market condition (bull, bear, mixed days)
- C6: Lead-lag relationship analysis (up to ±5 days)
- C7: Cumulative returns comparison ($1 invested)
- C8: Monthly correlation breakdown
pip install pandas numpy matplotlib seaborn scipy| Library | Purpose |
|---|---|
pandas |
Data loading, transformation, grouping |
numpy |
Numerical calculations (VaR, annualisation) |
matplotlib |
All chart generation |
seaborn |
Styling and palette |
scipy.stats |
Pearson/Spearman correlation, skewness, kurtosis |
- Update the path in Cell 2.
- Install dependencies listed above.
- Run all cells sequentially — cells are designed to execute top-to-bottom.
All charts display inline. No files are written to disk by the notebook itself.
| Metric | Bitcoin | Ethereum |
|---|---|---|
| Total Return | +58.49% | +50.61% |
| Annualised Volatility | 44.49% | 76.83% |
| Maximum Drawdown | -28.12% | -63.36% |
| Sharpe Ratio | 1.256 | 0.912 |
| Sortino Ratio | 1.942 | 1.445 |
| 95% VaR (daily) | -3.39% | -5.62% |
Overall correlation (Pearson): 0.7792 — strong positive, statistically significant.
See report.md for the full analysis narrative and interpretation.