Home / Learn / Path signatures for trading
Path signatures for trading
Short answer: A path signature turns a chunk of price history into a fixed list of numbers that describe its shape – how far it moved, in which order, and how much it zig-zagged on the way. Those numbers are excellent features for a model. SigPath feeds the signature of the last 24 candles into a ridge regression, checks the result out-of-sample, and only issues a long or short signal when the model shows an edge. Otherwise it says hold.
What is a path signature?
Take any path X that moves through d dimensions over time – for example (time, price). Its signature is the infinite collection of iterated integrals of the path:
- Level 1 – one number per dimension: the total change
∫ dXⁱ = Xⁱ(end) − Xⁱ(start). For price, that is simply the net move. - Level 2 – one number per pair of dimensions:
∫∫ dXⁱ dXʲover all times s < t. These terms remember which move came first. - Level 3 and up – triples, quadruples and so on, capturing finer and finer structure of the path.
The idea comes from Terry Lyons’ rough path theory (1998). Two properties make it useful for markets. First, the signature is invariant to how fast the path was travelled – it depends on the shape, not on the clock, unless you add time as a channel on purpose. Second, once time is included as a channel, a linear function of the signature can approximate any continuous function of the path on compact sets of paths (the universal approximation property). That second property is why a simple linear model on signature features can be surprisingly expressive.
Why traders care: order and area
Classic indicators mostly look at levels and averages: where is the price relative to its moving average, how wide is the range. Two price paths can end at the same price with the same average and still mean completely different things – a slow grind up versus a sharp drop followed by a recovery.
Level-2 signature terms separate exactly those cases. For two channels a and b, the antisymmetric part ½(Sab − Sba) is the signed area enclosed between the path and its chord. Positive area means a tended to move before b; negative area means the opposite. With time as one channel and price as the other, this area tells you whether the move was front-loaded or back-loaded – momentum versus late reversal.
The lead-lag transform and Lévy area
A single price series has no “second asset” to compare against. The lead-lag transform solves this by pairing the series with a delayed copy of itself. The signed area between the lead and the lag – the Lévy area – grows with every back-and-forth move, so it acts as a path-wise measure of realised oscillation (closely related to quadratic variation).
SigPath uses a simple version of this idea. Each point of the path has three channels:
| Channel | Definition | What it adds |
|---|---|---|
| Time | k / 24 for candle k of the window | Breaks time-invariance so the model sees when things happened |
| Price | log price change since window start, divided by volatility × √24 | Makes BTC and EUR/USD comparable |
| Lagged price | the same value one candle earlier | Lévy area between price and lag ≈ oscillation |
The volatility used for normalisation is the rolling standard deviation of 1-candle log returns over the previous 100 candles, computed causally (no look-ahead).
Computing signatures with Chen’s identity
For a piecewise-linear path you do not need numerical integration. The signature of one straight segment with increment Δ is the tensor exponential (1, Δ, Δ⊗Δ/2, Δ⊗Δ⊗Δ/6, …), and Chen’s identity says the signature of two joined paths is the tensor product of their signatures. So you walk the path segment by segment and update the running levels. This is the core of SigPath’s implementation (TypeScript, runs in a Supabase Edge Function):
// Running signature levels L1 (d), L2 (d²), L3 (d³) for a d-dimensional path
for (let k = 1; k < path.length; k++) {
const D = path[k].map((v, i) => v - path[k - 1][i]); // segment increment
// L3 += L2⊗Δ + L1⊗(Δ⊗Δ/2) + Δ⊗Δ⊗Δ/6 (uses the old L1, L2)
for (i…) for (j…) for (m…)
L3[i][j][m] += L2[i][j]*D[m] + L1[i]*D[j]*D[m]/2 + D[i]*D[j]*D[m]/6;
// L2 += L1⊗Δ + Δ⊗Δ/2
for (i…) for (j…) L2[i][j] += L1[i]*D[j] + D[i]*D[j]/2;
// L1 += Δ
for (i…) L1[i] += D[i];
}
A quick sanity check: splitting one straight segment into two halves must give the same signature. In SigPath’s tests the maximum difference is about 2 × 10⁻¹⁶ – floating-point noise. In Python you would typically use a library such as iisignature, esig or signatory instead of writing this by hand.
From signature to signal: SigPath’s pipeline
- Data. Up to 1,500 candles: Binance market data for crypto, Yahoo Finance for forex and gold (gold uses the COMEX future GC=F as a proxy for XAUUSD).
- Features. For every window of 24 candles: the 39 signature terms plus one extra feature, the log ratio of short-term to long-term volatility.
- Target. The forward log return over a fixed horizon (8 candles on 15m, 6 on 1h and 4h, 5 on 1d), divided by volatility and clipped to ±3.
- Model. Ridge regression (λ = 10) on standardised features – regularisation matters because many signature terms are highly correlated.
- Validation. Walk-forward: fit on the first 75 % of windows, leave a gap equal to the horizon, test on the last 25 %. The out-of-sample information coefficient (IC) and hit rate are reported with every signal.
- Decision. The final model is refitted on all data. If the out-of-sample IC is ≤ 0, the answer is hold regardless of the score. Otherwise a standardised score above +0.75 gives long, below −0.75 gives short.
- Risk levels. Stop-loss at 1.5 × ATR(14), take-profit at 2.5 × ATR(14) – a fixed 1 : 1.67 reward-to-risk. Try it yourself with the ATR stop-loss calculator.
Honest results and limitations
On a test run across BTC, EUR/USD and gold on all four timeframes (5 Nov 2026), the out-of-sample IC ranged from about −0.12 to +0.21. Most combinations sat between 0 and 0.15 – a weak but real edge in some markets and none in others. That is typical for any short-horizon price model and the reason SigPath returns hold far more often than long or short.
- Raw signatures are not magic. Research such as the 2025 paper on signature decomposition for pair trading reports that the plain signature can perform poorly as a trading signal; how you build the path matters more than the level you truncate at.
- Regimes change. A model fitted on the last 1,500 candles assumes the near future resembles that period.
- Costs are not included. Spreads, fees and slippage reduce any edge, especially on 15-minute charts.
- Stops can be skipped. Gaps and thin liquidity can fill a stop far from its level.
Signals are statistical model output, not investment advice. Read the risk disclosure.
See the pipeline run live on 17 markets – one free analysis, no card needed.
Get a signalFAQ
What is a path signature in trading?
A sequence of iterated integrals that summarises the shape of a price path – its net moves, the order in which they happened and the area it swept. Truncated at a fixed level it becomes a fixed-length feature vector that a model can learn from.
Do path signatures predict prices?
Not on their own. Signatures are features, not forecasts. In SigPath’s own out-of-sample tests the information coefficient ranged from about −0.12 to +0.21 depending on asset and timeframe, so many runs end in hold.
What is the lead-lag transform?
It pairs a price series with a delayed copy of itself. The signed (Lévy) area between the two measures how much the price oscillated, which is closely related to realised volatility.
Which signature level should I use?
Levels 2 to 4 are common. For a d-dimensional path the number of terms grows as d + d² + … + dⁿ, so a 3-channel path at level 3 already has 39 features. Higher levels add detail but also noise and overfitting risk.
Further reading
- Chevyrev, Kormilitzin – A Primer on the Signature Method in Machine Learning (arXiv 1603.03788)
- Futter, Horvath, Wiese – Signature Trading: A Path-Dependent Extension of the Mean-Variance Framework (arXiv 2308.15135)
- Signature Decomposition Method Applying to Pair Trading (arXiv 2505.05332)
- Double-Execution Strategies Using Path Signatures (SIAM Journal on Financial Mathematics)