Hello, world

· meta

This is the first post on keyangpan.com.

I’ve spent the last while working on market microstructure problems: reconstructing order books from raw feeds, measuring intra-minute execution timing, and building small tools to make that research faster. Most of what I learned lives in notebooks and scattered notes. This site is an attempt to write some of it down properly.

Expect posts on:

  • Market microstructure: order book dynamics, queue position, adverse selection.
  • Execution: timing, slippage, and what actually moves the cost of a trade.
  • Tooling: data pipelines, backtesting infrastructure, and AI agents for research.

Here’s a small example of the kind of thing I might include:

import numpy as np

def microprice(bid, ask, bid_size, ask_size):
    """Size-weighted mid, a cheap short-horizon price signal."""
    w = ask_size / (bid_size + ask_size)
    return w * bid + (1 - w) * ask

print(microprice(100.00, 100.02, 300, 100))

More soon.


← All posts