Staffing and budget decisions at a Portuguese port authority ride on next year's container volumes. You build monthly forecasts accurate enough for those calls and explainable enough that the operations director can defend them to the port commission.
The discipline skills: testing stationarity with ADF tests, decomposing seasonal patterns, fitting ARIMA and SARIMAX models with statsmodels, producing prediction intervals instead of point forecasts, and comparing model performance against a seasonal naive baseline.
The AI-direction lesson: random train/test splitting on time series data is AI's most destructive default in data science -- and this is the project where it matters most. AI will produce forecasts that look good with convincing accuracy numbers, but if validation used random splits, every number is meaningless. You also write your first skill file and configure your first hooks -- infrastructure that makes temporal discipline automatic rather than something you remember to enforce. The skill encodes the verification workflow as a reusable procedure; the hook makes temporal discipline automatic so AI cannot skip it, even when you forget to check.
Your Role
You deliver forecasts with prediction intervals, not point estimates. This is the first project working with time series data, and you also write infrastructure -- skills and hooks -- that makes analytical discipline automatic rather than something you remember each session.
What's New
Last time, you deepened the causal validation for Gabriela's loyalty program -- sensitivity analysis, delegated review through a custom agent, cross-tool verification with Codex CLI. The analytical terrain was familiar; the infrastructure was new.
This time, the analytical terrain is unfamiliar. Time series is where AI's default behavior is most destructive -- random train/test splitting on temporal data produces fictional accuracy that looks impressive but predicts nothing. Stationarity must be tested before any model is fit. Seasonal patterns must be decomposed before model specification. Prediction intervals replace point forecasts.
The hard part is temporal discipline. AI will produce forecasts that look good, and the accuracy numbers will be convincing. But if the validation used random splits instead of temporal splits, every number is meaningless.
Tools
- Python 3.11+ via your conda "ds" environment
- Jupyter Notebook for the analysis
- pandas for data handling
- statsmodels -- familiar library, new methods: ARIMA, SARIMAX, ADF test, seasonal decomposition
- scipy for statistical analysis
- matplotlib / seaborn for visualization
- DuckDB and DuckDB MCP server (carry-forward, available if needed)
- Claude Code -- skills and hooks are new features of an existing tool
- Git / GitHub for version control
Materials
You receive:
- Eight years of monthly container volumes by trade lane
- Economic indicator data (GDP, trade indices, fuel prices)
- A data dictionary
- A methodology page from the port's previous forecasting consultancy (reviewed in Unit 4)
- A project CLAUDE.md
No methodology templates, no analysis specifications, no model configuration guides.