Skip to content
All library documents

Estimating the Chance of a Fourth Up Bar After Three

Article BigQuant

Summary

The document presents a way to estimate how often a one-minute Chinese convertible-bond bar closes above its open after three consecutive up bars. It converts each bar’s return into a binary up-or-not indicator, scans the series for three up bars, and counts whether the following bar is also up. The code additionally requires the three-bar run to begin after a non-up bar, or at the start of the series, so it counts run beginnings rather than every overlapping three-bar window.

The example queries one instrument over a specified historical date range, but it reports no resulting counts or probability. The displayed counters would need to be divided by their total to produce a probability. The method is a historical frequency estimate, not a backtest of a trading strategy; it does not assess returns, costs, statistical uncertainty, or whether the pattern generalizes. Its interpretation also depends on the bar interval, data ordering, and treatment of zero-return bars, which the code classifies as not up.

Key ideas

  • The example labels each bar as up when its close exceeds its open.
  • It counts the next bar after a three-bar up run that begins at a run boundary.
  • The two counters must be combined into a denominator to estimate a conditional frequency.
  • The example supplies no observed probability or evidence that the pattern is profitable.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.