Notation Guide¶
Standard notation used throughout temporalcv documentation and code.
Time Series Variables¶
Symbol |
Python Variable |
Meaning |
|---|---|---|
y_t |
|
Target value at time t |
ŷ_t |
|
Predicted value at time t |
e_t |
|
Forecast error: y_t - ŷ_t |
Δy_t |
|
First difference: y_t - y_{t-1} |
Forecast Parameters¶
Symbol |
Python Parameter |
Meaning |
Typical Values |
|---|---|---|---|
h |
|
Forecast horizon (steps ahead) |
1, 2, 4, 8 |
n |
|
Sample size |
50-500 |
k |
|
Number of lagged features |
3-10 |
w |
|
Training window size |
52-104 (weeks) |
Statistical Parameters¶
Symbol |
Python Parameter |
Meaning |
Typical Values |
|---|---|---|---|
α |
|
Significance level (Type I error) |
0.05, 0.10 |
1-α |
|
Target coverage probability |
0.90, 0.95 |
γ |
|
Learning rate (adaptive conformal) |
0.01-0.1 |
AR(1) Process Parameters¶
Symbol |
Python Variable |
Meaning |
Typical Values |
|---|---|---|---|
φ |
|
Persistence coefficient |
0.9-0.99 |
σ |
|
Innovation standard deviation |
Data-dependent |
ε_t |
|
Innovation (white noise) |
N(0, 1) |
AR(1) Process: y_t = φ × y_{t-1} + σ × ε_t
Test Statistics¶
Symbol |
Python Variable |
Meaning |
|---|---|---|
d_t |
|
Loss differential: L(e₁,ₜ) - L(e₂,ₜ) |
d̄ |
|
Mean loss differential |
DM |
|
Diebold-Mariano test statistic |
PT |
|
Pesaran-Timmermann test statistic |
p̂ |
|
Observed directional accuracy |
p* |
|
Expected accuracy under null |
Variance Estimators¶
Symbol |
Python Variable |
Meaning |
|---|---|---|
γ_j |
|
Autocovariance at lag j |
V̂(·) |
|
Estimated variance |
w(j) |
|
Bartlett kernel weight |
HAC Variance: V̂ = (1/n) × [γ₀ + 2 Σⱼ w(j) × γⱼ]
Regime Classification¶
Symbol |
Python Value |
Meaning |
|---|---|---|
τ |
|
Move threshold |
UP |
|
Upward move: value > τ |
DOWN |
|
Downward move: value < -τ |
FLAT |
|
No significant move: |value| ≤ τ |
LOW |
|
Low volatility regime |
MED |
|
Medium volatility regime |
HIGH |
|
High volatility regime |
Skill Scores¶
Symbol |
Python Variable |
Formula |
Range |
|---|---|---|---|
SS |
|
1 - (model_error / baseline_error) |
(-∞, 1] |
MC-SS |
|
1 - (model_MAE_moves / persistence_MAE_moves) |
(-∞, 1] |
Interpretation:
SS > 0: Model beats baseline
SS = 0: Model equals baseline
SS < 0: Model worse than baseline
SS = 1: Perfect forecast
Conformal Prediction¶
Symbol |
Python Variable |
Meaning |
|---|---|---|
s_i |
|
Nonconformity score |
q̂ |
|
Empirical quantile of scores |
Ĉ(x) |
|
Conformal prediction set |
Prediction Interval: Ĉ(x) = [ŷ(x) - q̂, ŷ(x) + q̂]
Cross-Validation¶
Symbol |
Python Variable |
Meaning |
|---|---|---|
K |
|
Number of CV splits |
g |
|
Gap between train and test |
Gap Requirement: train_end + gap < test_start
Gate Results¶
Symbol |
Python Value |
Meaning |
Action |
|---|---|---|---|
HALT |
|
Critical failure |
Stop and investigate |
WARN |
|
Caution |
Continue with verification |
PASS |
|
Validation passed |
Proceed |
SKIP |
|
Insufficient data |
Cannot validate |
Common Constants¶
Value |
Meaning |
Source |
|---|---|---|
√(2/π) ≈ 0.798 |
E[|Z|] for Z ~ N(0,1) |
Standard result |
0.70 |
Default move threshold percentile |
v2 empirical |
0.20 |
Suspicious improvement threshold |
v2 empirical |
13 |
Default volatility window (weeks) |
Quarterly assumption |
30 |
Minimum n for DM test |
Convention |
20 |
Minimum n for PT test |
Convention |
Variable Naming Conventions¶
Pattern |
Meaning |
Example |
|---|---|---|
|
Training data only |
|
|
Test data only |
|
|
Computed on moves only |
|
|
Estimated quantity |
|
|
Expected under null |
|
|
Count of |
|
Code-to-Math Mapping¶
# DM Test
d_bar = np.mean(d) # d̄
var_d = compute_hac_variance(d) # V̂(d̄)
dm_stat = d_bar / np.sqrt(var_d) # DM
# PT Test
p_hat = np.mean(correct) # p̂
p_star = p_y * p_x + (1-p_y) * (1-p_x) # p*
# MC-SS
mc_ss = 1 - (model_mae_moves / persistence_mae_moves) # MC-SS
# AR(1) Optimal MAE
optimal_mae = sigma * np.sqrt(2 / np.pi) # σ × √(2/π)