Cumulative Sum Control Chart

RedditHackerNewsX
SUMMARY

A Cumulative Sum (CUSUM) control chart is a statistical quality control tool that detects small shifts in process means by accumulating deviations from a target value over time. Unlike traditional control charts that examine individual observations, CUSUM charts are more sensitive to subtle, persistent changes in the underlying process.

Understanding CUSUM charts

CUSUM charts work by calculating and plotting the cumulative sum of deviations from a target value. The basic CUSUM statistic CiC_i at time ii is calculated as:

Ci=Ci1+(xiμ0)C_i = C_{i-1} + (x_i - \mu_0)

Where:

  • xix_i is the current observation
  • μ0\mu_0 is the target mean
  • Ci1C_{i-1} is the previous CUSUM value

Next generation time-series database

QuestDB is an open-source time-series database optimized for market and heavy industry data. Built from scratch in Java and C++, it offers high-throughput ingestion and fast SQL queries with time-series extensions.

One-sided and two-sided CUSUM

CUSUM charts can be implemented as one-sided or two-sided monitoring schemes:

One-sided CUSUM

Tracks either positive or negative shifts:

Si+=max[0,Si1++(xiμ0K)]S_i^+ = \max[0, S_{i-1}^+ + (x_i - \mu_0 - K)]

Where:

  • KK is the reference value (usually set to δ2\frac{\delta}{2})
  • δ\delta is the shift size to detect

Two-sided CUSUM

Monitors both positive and negative shifts simultaneously:

Si+=max[0,Si1++(xiμ0K)]S_i^+ = \max[0, S_{i-1}^+ + (x_i - \mu_0 - K)] Si=max[0,Si1(xiμ0+K)]S_i^- = \max[0, S_{i-1}^- - (x_i - \mu_0 + K)]

Next generation time-series database

QuestDB is an open-source time-series database optimized for market and heavy industry data. Built from scratch in Java and C++, it offers high-throughput ingestion and fast SQL queries with time-series extensions.

Applications in financial markets

CUSUM charts are particularly valuable in:

  1. Anomaly Detection in Time Series Data for identifying market regime changes
  2. Risk Management in Swaps Trading for monitoring collateral values
  3. Real-time Trade Surveillance for detecting unusual trading patterns

Decision intervals and implementation

The decision interval HH determines when the CUSUM signals an out-of-control condition:

  1. If Si+S_i^+ or SiS_i^- exceeds HH, the process is considered out of control
  2. The choice of HH affects the Average Run Length (ARL) properties
  3. Typical values for HH are between 4 and 5 standard deviations

Performance considerations

When implementing CUSUM charts in real-time systems:

  1. Memory efficiency: Only need to store previous CUSUM value
  2. Computational simplicity: Basic arithmetic operations
  3. Sensitivity adjustment through parameters KK and HH

Next generation time-series database

QuestDB is an open-source time-series database optimized for market and heavy industry data. Built from scratch in Java and C++, it offers high-throughput ingestion and fast SQL queries with time-series extensions.

Extensions and variations

Fast Initial Response (FIR)

Modifies the standard CUSUM to provide faster detection during startup:

Si+=max[0,Si1++(xiμ0K)]+FIRS_i^+ = \max[0, S_{i-1}^+ + (x_i - \mu_0 - K)] + \text{FIR}

Adaptive CUSUM

Dynamically adjusts parameters based on observed data:

  1. Variable reference value KK
  2. Adaptive decision interval HH
  3. Time-varying target mean μ0\mu_0

Best practices

  1. Choose appropriate values for KK and HH based on:

    • Expected shift magnitude
    • Desired ARL properties
    • False alarm tolerance
  2. Regular parameter review:

    • Validate target mean μ0\mu_0
    • Assess detection performance
    • Adjust for changing market conditions
  3. Integration with other monitoring tools:

Subscribe to our newsletters for the latest. Secure and never shared or sold.