THRESHER / METHODOLOGY← back to the desk

Methodology

Methodology Reference

Every number the engine produces, derived from first principles.

This document serves two purposes: it is the implementation spec for packages/engine, and it is the source content for the public /methodology documentation pages. If a calculation isn't in this document, the engine doesn't do it.

Companion to THRESHER-DESIGN.md. Version 1.0.

Docs site structure (each Part I/II section below = one page):

/methodology                    → overview + pipeline diagram
/methodology/indicators/{slug}  → sma, ema, macd, rsi, atr, adx, obv,
                                  relative-volume, bollinger, pivots
/methodology/engine/{slug}      → families, weights, composite, confidence,
                                  stops, targets, gates, sizing
/methodology/example            → worked end-to-end trade derivation
/methodology/limitations        → what this engine cannot see

Pipeline overview

Everything flows one direction. No step can reach backward.

OHLCV bars (per timeframe)
   │
   ▼
[Part I]  Indicators ───── pure math on bars; no opinions yet
   │
   ▼
[Part II] Signal families ─ each indicator's reading becomes a scored,
   │                        directional vote with a written reason
   ▼
Composite score S ────────  weighted sum of family scores
   │
   ▼
Direction ────────────────  long / short / none (threshold on S)
   │
   ▼
Confidence C ─────────────  base from |S|, minus itemized penalties
   │
   ▼
Trade plan ───────────────  stop from structure, target from structure,
   │                        R:R from those two
   ▼
Refusal gates G1–G5 ──────  trade emitted only if all pass;
                            otherwise: which gate failed, and why

Conventions used throughout: C_t = close of bar t, H_t/L_t/V_t = high/low/volume, n = lookback period. "Bar" means one unit of the selected timeframe (1 h, 1 d, or 1 w).

Part I — Indicators

Part II — Determination

Appendix