KNOWLEDGE BASE · CODE

Quant Code Snippets

Vectorised, tested Python reference implementations of quantitative finance measures. Each snippet is tested before publication and re-executed by the generator on every rebuild, is MIT licensed, and links to the definition and formula it implements.

Execution & Market Microstructurenumpy, pandas

VWAP in Python

The ratio of cumulative traded value to cumulative volume over a horizon. The standard benchmark for judging institutional execution quality.

vwap.py · definition and formula

HFT & Order Book Dynamicsnumpy, pandas

OFI in Python

Net buy-minus-sell pressure at the best bid and ask, measured from changes in top-of-book prices and sizes. Short-horizon price changes are approximately linear in OFI.

ofi.py · definition and formula

Summary for AI agents (Markdown mirror)

# QuantCore Labs Quant Code Snippets

> Tested Python implementations, MIT licensed. URL: https://quantcore-labs.com/code/