Two ordered series · explicit signed lag scan

Lagged Cross-Correlation Calculator

Enter two aligned equal-frequency numeric series and a maximum lag to calculate pairwise Pearson correlation at every signed displacement. The page exposes row starts, retained pair counts and withheld constant slices while refusing best-lag, causal-lead, predictive-edge, forecast, signal and trading conclusions.

Signed lag conventionPair counts visibleNo best-lag verdict

Enter two ordered equal-frequency series

Row order matters. Positive lag pairs an earlier X row with a later Y row under the displayed convention.

Entered

Whole rows only; every lag must retain at least five pairs.

Enter 5 to 500 finite values without percent signs; one complete aligned observation per row.

The Y row count and original order must match X exactly.

Lag boundary: The largest absolute coefficient is only the observed maximum in the entered scan. Multiple-lag searching, common trends and autocorrelation can create chance peaks; no causal or predictive lead is inferred.

Signed-lag Pearson arithmetic

Entered Rank and Lag Correlation 1.0.0.

Derived
No lagged cross-correlation calculated yetEnter at least five aligned ordered X and Y observations plus a supported maximum lag, or load the audited example.

How signed lagged cross-correlation is calculated

h ≥ 0: pair X[1…n−h] with Y[1+h…n]
h < 0: pair X[1−h…n] with Y[1…n+h]
rh = SXY,h ÷ √(SXX,hSYY,h)

The calculator scans every integer lag from minus the entered maximum through plus that maximum. At positive h, the paired Y observation occurs h rows later than X; at negative h, the paired X observation occurs minus h rows later than Y.

Each lag keeps n minus the absolute lag paired rows. The model recalculates the X and Y means and centered sums for that exact slice, then applies the centered Pearson product-moment formula. A constant paired slice is withheld rather than reported as zero.

The summary identifies the greatest absolute coefficient among valid rows. Deterministic ties prefer the smaller absolute lag and then the smaller signed lag. This is an audit convenience only and receives no multiple-testing adjustment or best-lag interpretation.

Worked example from the audited fixture

The audited fixture contains 12 aligned equal-frequency X and Y observations and scans maximum lag 3, producing seven lag rows with 9 to 12 retained pairs.

  1. Lag zero correlation is −0.22973063. At positive lag 1, X rows 1 through 11 pair with Y rows 2 through 12 and produce correlation 0.99215364 from 11 pairs.
  2. The page highlights lag +1 because it has the largest observed absolute coefficient in this entered scan. It does not claim X leads, causes or predicts Y.

Reproduce it: select “Load audited example” above. The governed engine retains full precision and rounds only the visible interface.

How to interpret the result

  • Read the signed lag first: positive values move Y later relative to X, while negative values move X later relative to Y.
  • Compare retained pair counts because larger absolute lags use fewer rows and can be more unstable.
  • Lag zero provides the contemporaneous entered Pearson reference under the same original row alignment.
  • A peak away from zero can arise from shared trends, serial dependence, seasonality, selected windows or chance across multiple inspected lags.
  • Inspect the complete lag table rather than treating the highlighted row as an optimal trading setting.

Assumptions and limits

  • Enter 5 to 500 aligned equally spaced observations; maximum lag is capped at 50 and must leave at least five pairs.
  • The calculator cannot verify timestamps, missing intervals, timezone alignment, stationarity or preprocessing consistency.
  • Pearson correlation at each lag measures linear association only and remains sensitive to outliers and structural changes.
  • Autocorrelation within either series can make cross-correlation peaks appear more persistent than the independent evidence supports.
  • The scan makes no multiple-testing correction and does not estimate confidence intervals or p-values.
  • No best-lag, causal lead, predictive edge, hedge ratio, forecast, grade, signal, position instruction or recommendation is generated.

Which relationship diagnostic answers which question?

Average-rank association, pairwise concordance, signed-lag Pearson correlation and contemporaneous Pearson uncertainty describe different evidence. The comparison keeps ties, original magnitude, row order and inference boundaries visible. A bounded coefficient is not a universal dependence or trading score.

Comparison of entered evidence, output and main boundary
ToolEvidence enteredPrimary outputMain boundary
Spearman Rank CorrelationTwo aligned numeric or ordinal seriesPearson correlation of average ranksMagnitude information is discarded.
Kendall Tau-bTwo aligned numeric or ordinal seriesTie-corrected concordant-minus-discordant balancePairwise agreement is not a significance verdict.
Lagged Cross-CorrelationTwo ordered equal-frequency numeric seriesPearson coefficient at each signed displacementLag peaks do not establish lead, cause or prediction.
Pearson Confidence IntervalTwo contemporaneous numeric seriesOriginal-value Pearson coefficient plus Fisher limitsLinear inference remains assumption-sensitive.

Frequently asked questions

  • At positive lag h, X rows one through n minus h pair with Y rows one plus h through n, so the paired Y row occurs later.
  • At negative lag h, X begins at row one minus h while Y begins at row one, so the paired X row occurs later.
  • Every lagged slice uses its own paired rows, means and centered sums before the standard Pearson product-moment formula is applied.
  • A displacement of absolute size h removes h unmatched edge rows, leaving n minus absolute h paired observations.
  • That coefficient is undefined and is visibly withheld rather than converted to zero or silently removed from the lag table.
  • No. It is only the observed maximum in the entered scan and receives no multiple-testing adjustment, stability test or trading interpretation.
  • No. Shared trends, autocorrelation, alignment choices, selected windows and chance scanning can create off-zero peaks without causality or prediction.
  • No. It generates no best-lag verdict, causal conclusion, predictive-edge claim, hedge ratio, forecast, grade, signal or recommendation.

Sources and methodology

  • NIST — Lag Plot — Published fixed-displacement definition and two-series signed-lag construction.
  • NIST — Correlation — Published centered Pearson formula applied independently to each paired slice.

Version 1.0.0 was locked only after the rank, tie and lag conventions were checked against the cited NIST and SciPy material. Canonical fixtures were independently recomputed with SciPy 1.13.1 before comparison with the browser engine. The calculator performs arithmetic locally and does not upload the entered observations.

Verify the ordered evidence before interpreting relationships

Reconcile the exact statement window, sampling frequency, timestamps, missing rows, realized P&L, spread, commission, financing, currency conversion, rounding and preprocessing across every series. Correct rank, pair-count or lag arithmetic cannot repair mismatched, selected or cost-inconsistent evidence.

XM

Review applicable statements, symbol specifications and execution terms.

Check XM terms

FBS

Confirm account-history and trading-cost conventions for your region.

Check FBS terms

FXOpen

Verify statement, charge and execution records before deriving inputs.

Check FXOpen terms

Risk and affiliate disclosure: Leveraged forex and CFD trading can result in substantial losses. These are affiliate links, so ForexMT4Indicators.com may receive compensation if you register or trade through them, at no additional cost to you. Availability and terms vary by jurisdiction and broker entity.

Disclaimer: The results from this tool are estimates for educational and informational purposes only and may differ from your broker's figures. This is not financial or investment advice. Trading forex and CFDs carries a high level of risk and can result in the loss of all your capital. Always verify calculations with your broker and trade within your risk tolerance.