A Sequential Approach to Time-Series Analysis