APPLIED STUDY · ORIGINAL LESSON
Learning plan and prerequisites
Before you begin: Complete the trend-state transition table and basic averages.
- Count consecutive states with an explicit sampling unit
- Separate completed runs from a current unfinished run
- Interpret duration summaries without assuming independence
Mechanism and interpretation
A run is a consecutive sequence of the same state in an ordered record. Its length depends on the sampling unit: observations, sessions or state-update events can give very different values. This lesson samples one confirmed state at each completed observation and counts adjacent repeated labels. Mixed and insufficient are retained as their own states and interrupt upward or downward runs. A missing observation is flagged rather than automatically treated as a valid repeated state.
Completed run lengths describe historical persistence under the chosen classifier. The currently active run is right-censored because its final duration is unknown. Reporting only completed runs excludes that unfinished duration; treating it as completed understates it if it continues. A long current upward run does not mechanically make a reversal due. Any claim that reversal probability changes with age needs a separate conditional analysis, including enough observations at each age and attention to overlapping dependence.
Worked case — synthetic data
A synthetic sequence is U, U, U, M, D, D, M, U, U, where U means upward, M mixed and D downward. The completed upward run has length 3. The final upward run has observed length 2 but is unfinished at the sample cutoff. The completed downward run has length 2; the two mixed runs each have length 1. The sequence contains four transitions between distinct runs, but that count is not the number of price reversals or executed trades.
Suppose another completed sample has upward run lengths 2,4 and 6 observations. Their average is 4 and median 4. A newly active run has already lasted 5 observations. It should not be appended as a completed 5 merely to produce a four-run average 4.25. A survival-style study could incorporate its partial information using an explicit censoring method, while a simple completed-run summary should report it separately. Neither approach can infer a universal four-observation expiry for an upward state.
Context and failure modes
Runs from one instrument or overlapping timeframes are not necessarily independent. A classifier with slow pivot confirmation may produce longer runs largely because of its design. Changing bar duration also changes a bar-count run without changing elapsed clock time. Report both the state rule and sampling frequency, and compare distributions rather than only a single average that can hide a few very long episodes.
Practice task
Observe D, D, U, U, U, M, D, D, D, D through the final available observation. List the completed directional runs and the unfinished directional run. If the next observation is M, what changes?
Worked practice answer
Completed directional runs are D length 2 and U length 3. The current D run has observed length 4 and is censored. If the next state is M, that D run becomes completed with length 4 and a new mixed run begins. Its completion is known only when the change arrives.