sameign
Sameign is a term used in time-series analysis and signal processing to describe the extent to which two real-valued sequences share the same directional movement over time. In practice, it captures how often the signs of the two sequences agree, ignoring their magnitudes.
Formally, for sequences x_t and y_t defined over a common index set T, the sign function sgn(z)
Variants include a windowed sameign, computed over a sliding window to reflect local alignment, and a magnitude-weighted
Interpretation: S ranges from 0 to 1. Values near 1 indicate strong directional coherence between the two
Applications: in finance to compare asset moves, in neuroscience to compare the direction of neural signals,
See also: sign correlation, cross-correlation, directional similarity.