Skip to main content

flow calc

Hi, I would like to understand how this is estimating flow +/-

Status: Completed1 comment

Log in to comment and vote

Comments1

  • Jared

    Team•

    Sep 14

    Hi James, thanks for asking. Here is how the flow numbers on the factor list are estimated.

    What "flow" is

    We do not have trade-by-trade buy/sell tags, so flow is estimated from one-minute price bars using bulk volume classification (BVC, Easley / López de Prado). For each stock and each minute:

    1. Take the minute's close-to-close price change and divide it by that stock's rolling volatility of one-minute changes (the last 60 minutes, same session only). Until 20 minutes of history exist the classifier stays neutral.
    2. Run that ratio through a fat-tailed Student-t CDF (df = 0.25) to get a buy fraction f between 0 and 1. A minute that closed up on a big move relative to recent noise gets f near 1; a flat minute gets 0.5.
    3. Dollars traded in the minute = volume × close.
    4. Net flow = (2f − 1) × dollars traded. That is estimated buy dollars minus sell dollars, so + means net buying pressure and − means net selling.
    5. Gross flow = dollars traded, direction ignored (buys plus sells).

    A factor's flow is the plain sum of its constituents' flow, not weight-scaled. A heavily traded name contributes by the dollars that actually traded in it, whatever its weight in the factor. The headline $ figures accumulate from the session start (04:00 ET, so extended hours are included).

    What the Flow Z and Gross Z are

    Raw dollars are not comparable across factors: $500M into a mega-cap theme is routine, $80M into a small one is an event. So each factor is scored against its own history at the same minute of the session:

    Flow Z = (net $ so far today − typical net $ by this minute) / (MAD × 1.4826)
    Gross Z = (gross $ so far today − typical gross $ by this minute) / (MAD × 1.4826)

    • "Typical" is the median across the sessions in the selected window (5D, 1M, 3M, YTD, 1Y), so one freak day does not distort it.
    • The spread is the median absolute deviation scaled by 1.4826, which makes it read like a standard deviation for normal data but stays robust to outliers.
    • The baseline is built from the factor's current constituents, so a rebalance refreshes the baseline rather than producing a fake reading.
    • Half-days and sessions with poor data coverage are dropped from the baseline, and the Z is scored on the regular session only (09:30 to 16:00 ET).
    • The Z is withheld in the first 5 minutes of the session, when the window has too few usable sessions, or when today's live coverage is incomplete, rather than shown as a misleading number.

    Reading them: |Z| under 1 is normal, 1 to 2 notable, 2 to 3 unusual, over 3 rare. Flow Z is about direction, Gross Z is about activity, and neither is on the same scale as the return z, so compare a factor against its own history rather than one Z against another.

    One caveat worth repeating: because the classification is bar-inferred, treat net flow as an estimate of pressure, not a true tape of who bought and sold.