Comment on page
MAIR: Moving Average with Interquartile Range Filter
All trades from the queried time range are ordered by timestamp.
For each second in the time range, there exists a "slot" where trades are put into.
As soon as all trades in the block have been finalized (usually 120 seconds per block), for each 1 second slot the closing price is taken.
These slots are then weighted against the volume for each data point and the weighted average price is taken to arrive at the final price.
The result is then returned as the result of the filter operation.
The MAIR filter is used in DIA's price determination. Our price quotations are the latest MAIR-120 filter values, i.e., the filter results from a 120 second interval of all recorded trades for an asset.