Upcrossing (source code)

= Upcrossing

An <upcrossing> of an interval $[a,b]$ consists of an observation at or below $a$ followed by a later observation at or above $b$. Successive completed <upcrossings> use disjoint buy-sell pairs.