# Methodology of generating daily stock reports

Pub: 24.02.16

I parse the daily NASDAQ OMX TotalView ITCH files for all executed trades with counterparty indentification information. Then for each stock and each broker I count how many times the broker was on the buy or sell side. I can then calculate for each stock the weighted standard deviation of buy-sell-ratios.

$$\sqrt{\sum_{j=1}^N{W_{j,i,d}^2 (BS_{j,i,d} - \overline{BS}_{i,d})^2}}$$

I run a linear regression explaining the calculated deviations with the total number of transactions on the stock, the residual from this regression is used to sort the stocks from lowest to highest. Those with the least amount of residual deviation had an "equal" amount of buying and selling, however those stocks with a high amount of residual deviation had very differing amounts of buying and selling going on.