Posts by Tags

Data Structures Application

How to Design a Limit Order Book? Permalink

Published:

This note aims to answer, but is not limited to, these questions: (i) what operations interact with a limit order book? (ii) what data structures are involved to build a limit order book? (iii) what are market makers? and what are the design principles of limit order book?

OLS as Orthogonal Projection Permalink

Published:

The note treats OLS as pure linear algebra — no randomness anywhere — deriving the closed form from the first-order condition, pinning existence and uniqueness on linear independence of the regressor columns, and then reading off three fitting properties that follow from residual orthogonality alone.

Econometrics

OLS as a Statistical Estimator Permalink

Published:

The companion to the linear-algebra view: here OLS is a random object, checked against unbiasedness, consistency, and efficiency, pushed through the central limit theorem to asymptotic normality, and closed with the degrees-of-freedom-corrected variance estimator that makes the t-statistic usable.

Life Thought

How Can We Constantly Be Happy? Permalink

Published:

The note treats constant happiness as a loop rather than a state — happiness and sadness define each other, so sadness is the price already agreed to, arriving on a geometric schedule that makes both long sad and long happy stretches unlikely.

Linear Algebra

What Does Principal Component Analysis (PCA) Do? Permalink

Published:

Beyond changing basis and reducing dimension, the note asks what else the eigenbasis buys you — total variance surviving the rotation untouched, a gap between in-sample and out-of-sample variance explained signalling a shifted variance structure, and each loading reading as a linear regression coefficient.

Principal Components and Eigenvectors Permalink

Published:

Maximizing the sample variance after coordinate projection, subject to unit length, turns the first-order condition into an eigenvector equation — so the principal components are the top eigenvectors of the sample variance-covariance matrix, obtainable directly from the right singular matrix of the demeaned data.

Trading Strategies

An Introduction to Market Auction Theory (MAT) and Order Flow Trading Strategy Permalink

Published:

The note explains how to read a market as a two-sided auction — why price sticks in some ranges (balance) and runs through others (imbalance) — and then introduces the concrete tools (order book/DOM, volume profile, footprint chart, delta/CVD) and the entry rules (ride imbalance, fade exhaustion, read absorption vs. initiation) to act on that reading.