ucsb-nlp-chang/federatedskill/economic-time-series-analysis
Claude Code and agent skill by ucsb-nlp-chang/federatedskill
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Analyze economic time series by deflating nominal values, extracting cyclical components via HP filter, and computing correlations. Use when tasks involve real vs nominal indicators, detrending, business cycle analysis, or cross-series correlation of macroeconomic data.
Install
npx vskill@latest install ucsb-nlp-chang/federatedskill/economic-time-series-analysisSKILL.md
Time Series Detrending with HP Filter
Quick Start
Critical Import Note
HP filter is in statsmodels, NOT scipy.
Standard Workflow
- Handle mixed-frequency data: If quarterly data appears in annual series (e.g., "2025:I", "II", "III"), average them to get annual value.
- Convert nominal to real: Divide by price index:
real = nominal / price_index - Log transform: Apply
np.log()to real values before HP filter - Apply HP filter: Use
lamb=100for annual data,lamb=1600for quarterly - Extract cyclical component: The
cycleoutput is the detrended series - Compute correlation: Use
pearsonr()on cyclical components
Lambda Values by Frequency
| Data Frequency | λ (lambda) | |
|---|---|---|
| Annual | 100 | |
| Quarterly | 1600 | |
| Monthly | 14400 |
Common Patterns
Averaging Quarterly Data
Real Value Conversion
Validation Checklist
- [ ] Series lengths match before correlation
- [ ] No NaN values in cyclical components
- [ ] Lambda matches data frequency
- [ ] Log transformation applied before HP filter
- [ ] Correlation computed on cycle component, not trend
Output precision
Never round, truncate, or fixed-format numeric values when writing outputs (Excel cells, JSON, CSV). Pass raw float values directly. Concretely:
- DO NOT:
round(x, N),format(x, ".2f"),f"{x:.2f}",.toFixed(N) - DO:
ws.cell(row=r, column=c, value=x)with x as a raw float - The verifier's tolerance (often 1e-4) decides acceptable precision; the
skill's job is to give it full precision and let it decide.
Known invariants (by sub-task)
economic-hp-correlation
- Clean year columns that may contain trailing dots (e.g.,
1994.→1994) - Price index base year typically equals 1.0; verify before dividing
- Verify cyclical component mean ≈ 0 after HP filter
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpaper_logs/3_fed_hetero_cc/glm-5/Industry-Correlation-Analysis/round_001/.snapshots/u1/economic-time-series-analysis/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ucsb-nlp-chang/federatedskill/economic-time-series-analysis)