Start with a rolling-volatility dashboard, a factor exposure analysis, or a simple timing-rule backtest. Each can use publicly accessible data and a few familiar pandas operations. Pick one project with a clear question, a data dictionary, and a result you can check manually. Add complexity after you can explain exactly how your first result was produced.
If you're choosing your first one, start with the volatility chart. You can verify it with a calculator and finish it without learning order execution or buying a data feed. Write down whether the input is a price index or a total-return series, because those answer different questions. Once the chart works, choose a second project that makes you explain an estimate or decision, such as why a fund's market exposure changes when you alter the estimation window.
Three projects, three concrete deliverables
| Project | Public input | First result to produce |
|---|---|---|
| Rolling volatility | FRED S&P 500 daily closing index values | Plot 20- and 60-observation rolling volatility over the same dates |
| Equity factor exposure | Monthly returns on an accessible fund and the monthly Fama–French factors | Estimate market and size coefficients on overlapping dates |
| Index timing rule | A daily index price series and a simple cost assumption | Compare a moving-average rule with a buy-and-hold price-return benchmark |
| Yield-curve regimes | FRED 2-year and 10-year constant-maturity Treasury yields | Compute the 10-year minus 2-year spread and count episodes below zero |
Keep a small readme that describes the data frequency, units, missing values, and evaluation dates. Use downloaded, dated snapshots when reproducibility matters. If you later publish the inputs as part of your project, check the provider's redistribution terms.
A 20-observation volatility chart starts by converting prices to returns. If the last five returns are , their mean is zero. Their sample standard deviation is about per observation. Multiplying by gives about annualised under the usual trading-day scaling convention. That is an annualised description of past variability.
Calculate rolling volatility from dated prices
import pandas as pd
data = pd.read_csv("SP500.csv")
dates = pd.to_datetime(data.iloc[:, 0])
close = pd.Series(pd.to_numeric(data["SP500"], errors="coerce").to_numpy(),
index=dates).dropna().sort_index()
daily = close.pct_change(fill_method=None)
vol = daily.rolling(20).std() * 252**0.5
print(vol.dropna().tail().map("{:.2%}".format))The Strategy Lab gives you working backtests to read alongside your own implementation.