Skip to content

Credit Card Transaction Data Signal Construction

credit-card-transaction-data-signal-constructionsource

Use when forecasting a consumer company's quarterly revenue from card transaction panels ahead of the earnings release, normalising panel bias and computing year-on-year growth against consensus.

Version
1.2.0
Reading
4 min
Hands off to
2
Handed off from
3
License
Apache-2.0
CoversPython DataclassesYodleeBloomberg Second MeasureEarnest AnalyticsFacteus

When to Use

Use this skill when processing consumer credit/debit card transaction panel feeds (e.g. Yodlee, Bloomberg Second Measure, Earnest Analytics, Facteus) to forecast public retail and consumer sector quarterly revenues ahead of official earnings releases. Because consumer card panel data provides high-frequency daily spending signals, this module normalizes sample panel coverage, calculates Year-over-Year (YoY) sales growth decomposed into ticket-size and transaction-volume components, and generates directional earnings surprise signals (BEAT_BUY / MISS_SELL) against point-in-time Wall Street consensus estimates.

When NOT to Use

  • Intraday or execution decisions. This engine produces quarterly pre-earnings research signals with a vendor delivery lag of hours-to-days; it is not a timing or execution tool.
  • Position sizing off confidence_score. That field is a naive linear heuristic rank in [0, 1], not a calibrated probability — size positions from your own backtested statistics only.
  • Companies without meaningful card-panel coverage (B2B, wholesale-driven, or heavily cash markets) — panel noise dominates any signal.
  • Backtesting without point-in-time discipline. This engine has no availability-lag or revision handling; use backtesting-alt-data-strategies-with-realistic-availability-lag to enforce the vendor's actual delivery lag and as-delivered snapshots.

Prerequisites

  • Aggregated transaction panel feed (ticker, date, total_spend_usd, transaction_count).
  • Fiscal-quarter labels in YYYY-Qn form (e.g. 2025-Q1) so the engine can verify t vs t-4 alignment; other labelling schemes are accepted but the alignment check is skipped with a warning.
  • Point-in-time Wall Street consensus revenue estimate for the upcoming fiscal quarter (restated consensus leaks information).
  • Historical panel-to-reported-revenue scaling factor ($\gamma_{\text{panel}}$), calibrated against reported 10-Q revenue.

Workflow

  1. Panel Normalization:
    • Scale raw panel spend by coverage multiplier: $\text{Implied Revenue} = \text{Panel Spend} \times \gamma_{\text{panel}}$.
  2. YoY Growth Calculation & Decomposition (seasonality-aligned quarters, $t$ vs $t-4$):
    • $\text{YoY Growth} = \frac{\text{Implied Revenue}t - \text{Implied Revenue}{t-4}}{\text{Implied Revenue}_{t-4}}$.
    • Decompose multiplicatively: $(1 + g_{\text{revenue}}) = (1 + g_{\text{ticket}}) \times (1 + g_{\text{volume}})$ via decompose_growth — average ticket = panel spend / transaction count.
    • The engine enforces the alignment: prior-year data must be the same ticker and exactly four quarters earlier, otherwise generate_signal/decompose_growth raise ValueError rather than labelling sequential growth as YoY.
    • Decision point: volume growth collapsing while ticket growth stays stable suggests a panel composition shift, not true demand contraction — recalibrate $\gamma$ before trading the signal.
  3. Consensus Surprise Model:
    • Calculate $\text{Surprise Pct} = \frac{\text{Implied Revenue} - \text{Consensus Revenue}}{\text{Consensus Revenue}} \times 100%$.
  4. Signal Generation (classification uses the unrounded surprise, boundaries inclusive; the reported predicted_surprise_pct is rounded to 2 dp, so a reported 2.50 can still be NEUTRAL. Threshold is a calibratable default, not a regulatory constant — tune it to measured panel noise):
    • If $\text{Surprise Pct} \ge +2.5% \implies$ BEAT_BUY.
    • If $\text{Surprise Pct} \le -2.5% \implies$ MISS_SELL.
    • Else $\implies$ NEUTRAL.

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Unadjusted Panel Shift: Ignoring panel composition shifts (e.g. card provider losing market share), leading to false revenue contraction signals — credit-card panels demonstrably moved retail stocks on such artifacts (WSJ, 2017). The ticket/volume decomposition is the first-line diagnostic.
  • Assuming a universal vendor lag: delivery lags range from ~12 hours to 5-7 days or weekly depending on vendor and product tier; a blanket 3-day assumption both under- and over-states availability. Always use the vendor's documented availability timestamps.
  • Ignoring Panel Revisions: card panels restate as late-posting transactions settle — backtesting on final restated values rather than as-delivered snapshots introduces look-ahead bias.
  • Ignoring Availability Lag: Backtesting using transaction data on the date it occurred rather than the date it became available from the vendor.
  • Overlooking Seasonality Gaps: Comparing Q4 holiday spending directly against non-aligned periods produces sequential growth mislabelled as YoY — the engine rejects YYYY-Qn pairs that are not exactly four quarters apart, but it cannot police custom labels, so align on fiscal (e.g. NRF 4-5-4) calendars and handle 53-week-year restatements yourself.
  • Silent data errors: a zero or negative prior-year panel base is a data problem, not 0% growth — the engine raises ValueError rather than emitting a false flat-growth number; missing prior-year data yields NaN, distinguishable from a true 0.0.

Verification

  • Instantiate CreditCardTransactionSignalEngine(panel_scaling_multiplier=50.0). For ticker CMG (Chipotle), current quarter panel spend $40M ($\text{Implied Revenue} = $2.0\text{B}$), consensus $$1.90\text{B}$: verify signal BEAT_BUY, predicted surprise $+5.26%$, heuristic confidence $0.76$, and yoy_growth_pct = NaN (no prior year supplied).
  • With prior year 2024-Q1 panel spend $30M / 1.5M transactions and current $33M / 1.6M: verify YoY $= +10.0%$, ticket-size growth $+3.125%$, transaction-volume growth $+6.6667%$, and $1.03125 \times 1.066667 - 1 = 10%$ (multiplicative identity).
  • Pass a 2024-Q4 prior against a 2025-Q1 current: verify ValueError (misaligned quarters), not a silently mislabelled 10% "YoY".
  • Run python -m unittest discover -s skills/credit-card-transaction-data-signal-construction/scripts.

Verify it, from the repository root

python -m unittest discover -s skills/credit-card-transaction-data-signal-construction/scripts

Hands off to 2

Skills this document names, usually in When NOT to Use, as the owner of a case it excludes.

Handed off from 3

Skills that name this one as the place a case belongs. The reverse edges of the graph.