time-series-analysis
Skill16 starsChanged 8 months agoMITView on GitHub
name: time-series-analysis description: Time series analysis for financial data — ARIMA, GARCH, cointegration, stationarity. Use when modeling financial time series. Most statistical models require stationarity. Financial prices are non-stationary (unit root); returns are generally stationary. Augmented Dickey-Fuller (ADF) test: - H0: Unit root exists (non-stationary) - Reject H0 at p < 0.05 to confirm stationarity - Choose appropriate lag length (AIC/BIC criteria) - Include trend/intercept terms based on visual inspection KPSS test: - H0: Series is stationary (opposite of ADF)…
4 other projects use a version of this.
Adopted by
Most recently taken up by
- sp1e/claude-skillstheir own version, first seen Oct 12, 2026
- chaakresh/claude-skillstheir own version, first seen Sep 7, 2026
- xjtulyc/awesome-rosetta-skillstheir own version, first seen Mar 17, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- xjtulyc/awesome-rosetta-skills★ 34same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- sp1e/claude-skills★ 1same name
- chaakresh/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- live-trading-monitoringSkill
- monte-carlo-simulationSkill
- overfitting-preventionSkill
- research-notebooksSkill
- strategy-evaluationSkill
- walk-forward-optimizationSkill
- cross-chain-arbitrageSkill
- crypto-derivativesSkill
- defi-protocolsSkill
- mev-strategiesSkill
- on-chain-analyticsSkill
- stablecoin-analysisSkill
- tokenomicsSkill
- yield-farmingSkill
- alternative-dataSkill
- data-qualitySkill
- data-vendorsSkill
- feature-engineeringSkill
- sentiment-analysisSkill
- web-scraping-financeSkill
- binomial-treesSkill
- black-scholesSkill
- credit-derivativesSkill
- exotic-optionsSkill
- hedging-strategiesSkill
- interest-rate-derivativesSkill
- monte-carlo-pricingSkill
- structured-productsSkill
- vol-surfacesSkill
- vol-tradingSkill
- execution-algosSkill
- latency-optimizationSkill
- market-microstructure-theorySkill
- order-flow-analysisSkill
- performance-metricsSkill
- smart-order-routingSkill
- tick-data-processingSkill
- transaction-cost-analysisSkill
- central-bank-analysisSkill
- commodities-fundamentalsSkill
- economic-indicatorsSkill
- fx-fundamentalsSkill
- geopolitical-riskSkill
- yield-curve-analysisSkill
- alternative-allocationsSkill
- benchmark-trackingSkill
- black-littermanSkill
- factor-investingSkill
- markowitz-optimizationSkill
- portfolio-attributionSkill
- rebalancing-strategiesSkill
- risk-paritySkill
- alpha-researchSkill
- bayesian-methodsSkill
- deep-learning-tradingSkill
- factor-modelsSkill
- kalman-filtersSkill
- ml-for-financeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Use ADF and KPSS together for robustness
- Distinctive: line 38
If ADF rejects but KPSS does not: stationary
- Distinctive: line 39
If both reject: trend-stationary (difference to remove trend)
- Distinctive: line 40
If neither rejects: inconclusive, need more data
- Distinctive: line 101
Start with GARCH(1,1) — it captures 90% of volatility dynamics
- Distinctive: line 102
Use GJR-GARCH for equity indices (leverage effect)
- Distinctive: line 103
Use EGARCH when you need guaranteed positive variance
- Distinctive: line 124
Use for baskets, sector relationships, term structure
- Distinctive: line 142
Use dummy variables or seasonal differencing to account for these patterns
- Distinctive: line 198
Before deploying a time series model in production:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Time Series Analysis
name: time-series-analysis description: Time series analysis for financial data — ARIMA, GARCH, cointegration, stationarity. Use when modeling financial time series.
When to Activate
- User needs to model or forecast financial time series (prices, returns, volatility)
- Testing for stationarity before applying statistical models
- Modeling conditional volatility (GARCH family)
- Testing for cointegration between two or more assets
- Diagnosing autocorrelation, seasonality, or structural breaks in data
- Building econometric models for trading signals
First Questions
- What is the data frequency (tick, minute, daily, weekly, monthly)?
- Are you modeling returns, prices, spreads, or volatility?
- What is the purpose — forecasting, signal generation, risk modeling, or hypothesis testing?
- How much historical data is available (observations and time span)?
- Is this univariate (single series) or multivariate (multiple related series)?
Core Concepts
Stationarity
Most statistical models require stationarity. Financial prices are non-stationary (unit root); returns are generally stationary.
Augmented Dickey-Fuller (ADF) test:
- H0: Unit root exists (non-stationary)
- Reject H0 at p < 0.05 to confirm stationarity
- Choose appropriate lag length (AIC/BIC criteria)
- Include trend/intercept terms based on visual inspection
KPSS test:
- H0: Series is stationary (opposite of ADF)
- Use ADF and KPSS together for robustness
- If ADF rejects but KPSS does not: stationary
- If both reject: trend-stationary (difference to remove trend)
- If neither rejects: inconclusive, need more data
Achieving stationarity:
- First-differencing: y_t = price_t - price_{t-1} (returns)
- Log-differencing: y_t = ln(price_t / price_{t-1}) (log returns, preferred)
- Seasonal differencing for periodic data
- Fractional differencing for long-memory processes (preserves more information)
Autocorrelation
- ACF (Autocorrelation Function): Correlation between y_t and y_{t-k} at various lags k
- PACF (Partial ACF): Direct correlation at lag k, removing intermediate lag effects
- ACF decaying slowly suggests AR process; ACF cutting off suggests MA process
- PACF cutting off at lag p suggests AR(p); ACF cutting off at lag q suggests MA(q)
- Financial returns typically show weak autocorrelation, but squared returns show strong persistence (volatility clustering)
Detailed Methodology
ARIMA Modeling
ARIMA(p, d, q): AutoRegressive Integrated Moving Average
Step 1: Plot the series. Visual inspection for trends, seasonality, breaks.
Step 2: Test stationarity (ADF, KPSS). Difference if needed (d = 0 or 1).
Step 3: Examine ACF/PACF of stationary series to identify p (AR order) and q (MA order).
Step 4: Fit candidate models. Use AIC/BIC for model selection.
Step 5: Diagnostic checks:
- Ljung-Box test on residuals (H0: no autocorrelation, want p > 0.05)
- Normality test on residuals (Jarque-Bera)
- Plot residual ACF — should be white noise
Step 6: Forecast with confidence intervals.Practical note: ARIMA rarely produces profitable trading signals on raw returns due to low signal-to-noise ratio. More useful for modeling spreads, basis, or macro variables.
GARCH Family for Volatility Modeling
Volatility clustering is the dominant stylized fact of financial returns: large moves follow large moves.
GARCH(1,1):
sigma_t^2 = omega + alpha * epsilon_{t-1}^2 + beta * sigma_{t-1}^2
alpha: reaction to recent shock (typically 0.05-0.15)
beta: persistence of volatility (typically 0.80-0.95)
alpha + beta < 1: covariance stationarity required
alpha + beta close to 1: high persistence (near-IGARCH)EGARCH (Exponential GARCH):
- Models log(sigma^2), so variance is always positive without parameter constraints
- Captures leverage effect: negative returns increase volatility more than positive returns
- Preferred for equity markets where leverage effect is strong
GJR-GARCH (Glosten-Jagannathan-Runkle):
- Adds asymmetric term: gamma * I(epsilon < 0) * epsilon^2
- gamma > 0 indicates negative shocks increase volatility more
- Simpler than EGARCH, often sufficient for practical applications
Model selection guidance:
- Start with GARCH(1,1) — it captures 90% of volatility dynamics
- Use GJR-GARCH for equity indices (leverage effect)
- Use EGARCH when you need guaranteed positive variance
- Higher-order GARCH(p,q) rarely improves fit meaningfully
Cointegration
Two non-stationary series are cointegrated if a linear combination is stationary. Critical for pairs trading and spread modeling.
Engle-Granger two-step method:
Step 1: Regress y1_t = alpha + beta * y2_t + epsilon_t (OLS)
Step 2: Test residuals epsilon_t for stationarity (ADF test)
Use Engle-Granger critical values (NOT standard ADF critical values)
Step 3: If residuals are stationary, series are cointegrated
Step 4: Beta is the hedge ratio; epsilon_t is the spreadJohansen method (preferred for multiple series):
- Tests for number of cointegrating vectors simultaneously
- Provides trace statistic and max-eigenvalue statistic
- Returns cointegrating vectors and adjustment speeds
- Handles more than two series naturally
- Use for baskets, sector relationships, term structure
Structural Breaks
Financial time series often contain regime changes that invalidate models estimated on full samples.
Chow test: Tests for a break at a known date. Compare unrestricted model (separate regressions before/after) vs restricted (single regression).
Bai-Perron test: Detects multiple unknown break dates. Estimates break locations and confidence intervals. Essential for understanding when relationships change.
CUSUM test: Monitors cumulative sum of recursive residuals. Detects gradual structural change.
Seasonality
- Intraday: U-shaped volume/volatility pattern (high at open/close, low midday)
- Day-of-week: Monday effect (negative returns), Friday effect
- Month-of-year: January effect (small caps), Halloween effect (sell in May)
- Turn-of-month: Positive returns in last/first days of month
- Use dummy variables or seasonal differencing to account for these patterns
Templates / Examples
Time Series Diagnostic Report
Series: [Asset/Spread Name]
Frequency: Daily | Period: 2010-01-01 to 2024-12-31 | N = 3,780
--- Stationarity ---
ADF Statistic: -2.85 (p = 0.051) [Borderline]
KPSS Statistic: 0.42 (p = 0.08) [Borderline]
Action: First-difference (log returns)
Post-diff ADF: -42.1 (p < 0.001) [Stationary]
--- Autocorrelation (Returns) ---
Lag 1 ACF: -0.03 (not significant)
Ljung-Box(10): p = 0.32 (no serial correlation)
--- Autocorrelation (Squared Returns) ---
Lag 1 ACF: 0.18 (significant)
Ljung-Box(10): p < 0.001 (volatility clustering present)
--- GARCH(1,1) Fit ---
omega: 0.000003 alpha: 0.08 beta: 0.90
Persistence (a+b): 0.98
Half-life of vol shock: 34 days
AIC: -18,452
--- Residual Diagnostics ---
Ljung-Box(10) on std residuals: p = 0.45 (adequate)
Jarque-Bera on std residuals: p < 0.001 (fat tails remain)
Recommendation: Use Student-t innovations for better tail fitCointegration Test Template
Pair: [Asset A] vs [Asset B]
Period: [Start] to [End]
Engle-Granger:
Hedge ratio (beta): 1.32
ADF on residuals: -3.85 (p = 0.003) [Cointegrated]
Half-life of spread: 14 days
Johansen (Trace):
r=0: stat=22.4, cv(5%)=15.5 [Reject: at least 1 cointegrating vector]
r=1: stat=3.1, cv(5%)=3.8 [Fail to reject: exactly 1 vector]
Spread stationarity confirmed. Proceed with mean-reversion strategy.Quality Gate
Before deploying a time series model in production:
- Stationarity confirmed (or appropriate differencing applied)
- Model order selected by information criteria (AIC/BIC), not overfitting
- Residual diagnostics pass: no autocorrelation, homoscedastic (or GARCH captures heteroscedasticity)
- Out-of-sample forecast evaluation performed (RMSE, MAE, directional accuracy)
- Structural break analysis confirms model stability over intended period
- Cointegration tests use correct critical values (Engle-Granger, not standard ADF)
- GARCH parameters satisfy stationarity condition (alpha + beta < 1)
- Model re-estimation schedule defined (rolling window vs expanding window)
- Fat tails addressed (Student-t or skewed-t innovations for GARCH)
- Economic interpretation of model parameters is documented
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

