14
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill terrylica/cc-skills --skill adaptive-wfo-epoch- SKILL.md57.6 KB
Overview
This skill implements adaptive epoch selection for Walk-Forward Optimization (WFO), picking per-fold training epochs by optimizing Walk-Forward Efficiency (WFE). It sweeps log-spaced epoch candidates, computes WFE = OOS_Sharpe / IS_Sharpe with data-driven IS thresholds, and selects Pareto-efficient epochs to reduce overfitting and carry priors between folds. The configuration derives all parameters from the search space and sample sizes rather than magic numbers.
How this skill works
For each WFO fold the skill generates a log-spaced set of epoch candidates and trains models at those epoch counts. It computes IS and OOS Sharpe, applies a signal-to-noise-derived IS_Sharpe threshold, and calculates WFE for valid candidates. The efficient frontier of WFE versus training cost is identified and an optimal epoch is chosen; that epoch can be warm-started or used as a prior for the next fold. All variance, granularity, and annualization factors are computed from first principles and the search bounds.
When to use it
- Selecting per-fold training epochs in temporal WFO pipelines
- Mitigating overfitting by measuring transfer from in-sample to out-of-sample
- Building an efficient frontier of epoch versus performance/cost trade-offs
- Carrying epoch priors or warm-starts across sequential WFO folds
- Evaluating robustness of model training regimes with principled thresholds
Best practices
- Generate epoch candidates with log spacing to cover early rapid-change and late diminishing-return regimes
- Use compute_is_sharpe_threshold(n_samples) to adapt IS thresholds to fold sample size
- Prefer carrying selected epoch as a prior with derived prior/observation variances to avoid hyperparameter churn
- Classify WFE with guideline thresholds (0.30, 0.50, 0.70) but adjust to domain risk tolerance
- Annualize Sharpe correctly via the provided market/time_unit factors before comparing across datasets
Example use cases
- Walk-forward evaluation of trading models where per-fold training length matters
- Comparing training epoch cost versus OOS robustness for resource-constrained pipelines
- Automating epoch selection in CI/CD model training for sequential production updates
- Warm-starting training in adjacent folds using a principled prior variance derived from the search range
- Computing alerting rules when WFE falls below investigate/reject thresholds across folds
FAQ
It uses a signal-to-noise derivation: threshold = 2/√n (fallback 0.1 when n unknown) so the minimum IS_Sharpe adapts to fold sample size.
Is this early stopping or Bayesian optimization?
No. This evaluates discrete epoch candidates post-hoc (not continuous early stopping) and does not use a surrogate model; it directly computes WFE per candidate.
Why log-spaced epoch candidates?
Log spacing covers the region where small epoch changes matter early and captures diminishing returns later, improving frontier discovery with fewer candidates.