PathSignatureTransform<T>

Models & Types · AiDotNet.Finance.Portfolio

Truncated path signatures for SIT (Hwang and Zohren, “Signature-Informed Transformer for Asset Allocation”, arXiv:2510.03129), including the pairwise signed area that measures lead-lag.

For Beginners

This turns a stretch of price history into a small set of numbers describing its shape. For a PAIR of assets it also measures who tends to move first, which a correlation cannot tell you.

How It Works

The signature of a path is the collection of its iterated integrals, Sig(X) = (1, ∫dX, ∫∫dX⊗dX, ...), truncated at level M. It is invariant to reparameterization of time, which is what makes it robust to irregular sampling: two paths that trace the same shape at different speeds have the same signature.

Level 2 is not a tuning choice. The second-order terms of a joint signature over two asset paths encode their SIGNED AREA (the Lévy area), and that signed area is the lead-lag measure the whole architecture is built around — a strict lead-lag relationship implies a strictly positive second-order cross term. A level-1 signature is just the total increment, which carries no interaction information at all, so truncating lower removes the model’s entire inductive bias. The paper fixes the level at 2 rather than searching it.

The signed area is ANTI-symmetric: A(j,l) = -A(l,j). That is precisely why it can express lead-lag when a correlation cannot — correlation is symmetric and so cannot say which asset moved first. A pair moving in exact lockstep traces a straight line and encloses zero area.

Constructors

Constructor Summary
PathSignatureTransform(int level) Creates a signature transform.

Properties

Property Summary
int Level { get; } Gets the truncation level M.

Methods

Method Summary
T SignedArea(Vector<T> first, Vector<T> second) Signed (Lévy) area between two scalar paths: the lead-lag measure.
Tensor<T> CrossSignedAreas(Tensor<T> panel) Pairwise signed-area matrix over a panel of asset paths: entry (j, l) is the signed area of asset j against asset l.
Vector<T> Signature(Tensor<T> path) Truncated signature of a discretely sampled path.
int FeatureCount(int pathDimension) Number of signature terms produced by Signature for a path of the given dimension, EXCLUDING the constant leading 1.

Fields

Field Summary
int PaperTruncationLevel The paper’s truncation level.