Quantitative Research
Technical whitepapers, market studies, and architectural blueprints authored by the TwoWayMind data science and engineering teams.
Is Your Spread Really Mean-Reverting? The ADF Unit-Root Test
A spread that wiggles around a level looks mean-reverting — but a random walk wiggles too. The Augmented Dickey-Fuller test tells them apart before you trade the reversion.
Read Full Article →How One-Sided Is the Tape? Measuring Order Flow with Entropy
Two order books can print the same volume and mean opposite things. Order-flow entropy turns ‘how lopsided is the flow?’ into one number — a model-free companion to VPIN and OFI.
Read Full Article →Is Your Edge Real, or Just Autocorrelated Noise? The Ljung-Box Test
A single lag of autocorrelation can be luck. The Ljung-Box test rolls the whole autocorrelation function into one number: is this white noise, or real structure?
Read Full Article →Does Your VaR Model Actually Work? Backtesting with Kupiec & Christoffersen
A 95% VaR should be breached about 5% of the time — and not in clusters. The Kupiec and Christoffersen backtests check whether your risk model actually held up.
Read Full Article →Trend or Noise? The Variance-Ratio Test for Random Walks
Every range-bound market has a chorus calling the breakout — and most are noise. The Lo-MacKinlay variance-ratio test tells a trend from a random walk, with a number and a confidence level.
Read Full Article →How Much to Bet: The Kelly Criterion and Growth-Optimal Sizing
Two traders, the same edge — a year later one is broke. The difference was the bet size. The Kelly criterion is the single size that maximizes long-run growth, and the point past which more leverage makes you poorer.
Read Full Article →Alpha or Borrowed Beta? Jensen’s Alpha and the Information Ratio
A strategy can post beautiful returns and still have zero skill — the gains can be pure market exposure. Jensen’s alpha, Treynor, tracking error, and the information ratio separate real edge from a rising tide.
Read Full Article →Sharpe, Sortino, Drawdown, Calmar: Reading a Return Honestly
A return without a denominator is a boast. Four ways to divide reward by risk — total volatility, downside only, the deepest drawdown, and return per unit of worst-case pain.
Read Full Article →Your VaR Is Lying to You: Value-at-Risk, Expected Shortfall & Cornish-Fisher
Gaussian VaR assumes a bell curve, so it quietly under-counts crash risk. Historical VaR, Expected Shortfall, and the Cornish-Fisher correction put the fat tail back.
Read Full Article →Catching the Flinch: The Lee-Mykland Jump Test
A big candle can be ordinary volatility or a genuine jump — and they demand opposite responses. The Lee-Mykland test flags which returns are real jumps, and exactly when.
Read Full Article →When Correlations Go to One: The Absorption Ratio and Systemic Risk
A market's fragility is in how much of its variance has collapsed onto a few factors. The absorption ratio reads that off the covariance eigenvalues — a systemic-risk number that spikes before drawdowns.
Read Full Article →The Price of a Trade Comes Back: Measuring Liquidity from Return Reversals
Liquidity leaves a fingerprint in returns: order flow that moves the price temporarily, and reverses. The Pástor-Stambaugh measure reads it from price and volume alone — a priced liquidity factor.
Read Full Article →Volatility Is Forecastable: The HAR Model and the Long Memory of Risk
Realized volatility clusters and its memory decays slowly. The HAR model predicts tomorrow's from three averages of the past — daily, weekly, monthly — the parsimonious benchmark for volatility forecasting.
Read Full Article →The Epps Effect: Why Your Correlations Are Too Low, and How to Fix Them
Two assets never trade at the same instant, so forcing their returns onto a shared clock biases correlation toward zero. The Hayashi-Yoshida estimator measures covariance from each asset's own tick times — no resampling.
Read Full Article →Downside Beta: The Half of Market Risk That Actually Gets Priced
Ordinary beta averages an asset's co-movement with the market over every day. Splitting it by the sign of the market isolates the down-market sensitivity that actually carries a risk premium.
Read Full Article →The Half-Life of a Trade: Mean Reversion, Speed, and the Z-Score
A spread that mean-reverts isn't a strategy until you know how fast and how far. The Ornstein–Uhlenbeck speed, the half-life, and the z-score turn a reverting spread into a signal — with one regression.
Read Full Article →Good and Bad Co-Movement: Realized Semicovariance and Crash Correlation
Realized covariance treats a joint crash and a joint rally alike. Splitting it by the sign of each return isolates the downside co-movement that actually breaks diversification.
Read Full Article →How Good Was Your Fill? Quoted Spread, Price Improvement, and the Effective-to-Quoted Ratio
A fill's price means nothing on its own. Measured against the quote it faced — quoted spread, price improvement, and the effective-to-quoted ratio — it becomes execution quality you can score on every trade.
Read Full Article →Liquidity Beyond the Spread: Order-Book Depth, Slope, and the Cost of a Round Trip
The spread prices one share. Real liquidity is the shape of the book behind it — near-touch depth, order-book slope, and the basis-point cost of a full round trip.
Read Full Article →Good Volatility, Bad Volatility: Realized Semivariance and Downside Risk
Realized variance treats a rally and a crash the same. Splitting it by sign — upside vs downside — recovers the "bad" volatility that actually predicts risk.
Read Full Article →Microstructure Noise and the Volatility Signature: Why the Finest Data Lies
Sampling prices to the tick makes realized variance explode, not sharpen. The signature plot shows why — and how to measure the noise and sample around it.
Read Full Article →Jump-Robust Volatility: MinRV, MedRV, and Realized Quarticity
Measuring the continuous part of volatility when prices jump — MinRV and MedRV strip jumps out of realized variance, and realized quarticity puts an error bar on it.
Read Full Article →Realized Covariance, Correlation, and Beta: Cross-Asset Co-Movement
How two assets move together, measured from high-frequency returns — realized covariance, correlation, and beta, plus the alignment trap (the Epps effect) that biases them all.
Read Full Article →Streaming Volatility: EWMA, RiskMetrics, and Online Estimators
Estimating volatility in real time without rescanning history — EWMA / RiskMetrics variance, Welford's stable running variance, and O(1) rolling windows.
Read Full Article →Jumps vs. Continuous Volatility: Bipower Variation and Jump Detection
Realized variance blends diffusion and jumps into one number. Bipower variation separates them — isolating jump risk from the continuous grind.
Read Full Article →Beyond Volatility: Realized Skewness and Kurtosis in Intraday Returns
Volatility measures how much a market moved; realized skewness and kurtosis measure the shape — the asymmetry and tail risk that variance alone misses.
Read Full Article →The Hurst Exponent: Measuring Trend and Mean Reversion in Markets
One number that separates trending markets from mean-reverting ones — rescaled-range analysis, what H means, and how to read it without fooling yourself.
Read Full Article →Estimating the Bid-Ask Spread from OHLC Data: Corwin-Schultz & Abdi-Ranaldo
Recover the effective bid-ask spread from daily high, low, and close prices — two classic estimators, why they work, and what they cost your backtest to ignore.
Read Full Article →VPIN and Order Flow Toxicity: Measuring the Risk of Informed Trading
How VPIN turns raw trades into a live gauge of adverse-selection risk — volume buckets, bulk volume classification, and the toxicity signal that preceded the flash crash.
Read Full Article →Transaction Cost Analysis: Measuring the True Cost of Execution
The complete execution cost stack — arrival slippage, implementation shortfall, effective spread, market impact, and adverse selection — measured end to end.
Read Full Article →Trade Markouts and Adverse Selection: Measuring Flow Toxicity
The single most important post-trade diagnostic: how far price drifts in the aggressor's favour after a fill, and what markout curves reveal about toxic flow.
Read Full Article →Information-Driven Bars: Tick, Volume & Dollar Sampling for Market Microstructure
Why the wall clock is the worst way to sample a market, and how tick, volume, and dollar bars produce better-behaved returns for OFI, VPIN, and volatility models.
Read Full Article →Optimal Market Making and Inventory Risk: The Avellaneda-Stoikov Framework
Modeling optimal reservation prices, spread offsets, and inventory risk-adjusted quoting schedules.
Read Full Article →Real-Time Order Book Reconstruction from Incremental Feeds
Rebuilding in-memory depth queues from incremental events and calculating micro-prices, spreads, and imbalances.
Read Full Article →The Lo-MacKinlay Variance Ratio Test and Market Efficiency
Identifying mean-reverting, trending, and random walk regimes by scaling variances across aggregate horizons.
Read Full Article →Modeling Cross-Impact and Price Spillovers in Multi-Asset Portfolios
Modeling transaction slippage spillovers, co-volatility risk, and optimal liquidation paths for multi-asset baskets.
Read Full Article →Optimal Order Execution and the Almgren-Chriss Framework
Solving the risk-impact frontier and optimal inventory schedules using expected shortfall minimization models.
Read Full Article →Order Flow Imbalance (OFI) and Price Predictability
Modeling short-term alpha and price drift in the limit order book using Level 1 and multi-level Order Flow Imbalance indicators.
Read Full Article →Market Impact Modeling: Estimating Slippage and Decay
Estimating permanent and temporary price impact using the square-root law, linear-nonlinear transitions, and order flow decay kernels.
Read Full Article →Predicting Limit Order Fill Probability: A Machine Learning Approach
Modeling limit order fill dynamics in high-frequency regimes using feature engineering on queue distance, OBI, and Gradient Boosted Trees (XGBoost).
Read Full Article →Cross-Asset Latency Arbitrage: Multi-Market Microstructure
A study of cross-venue price correlation lag, propagation delay mediums, and high-frequency execution strategies on fragmented order books.
Read Full Article →Volatility Forecasting in HFT: GARCH and HAR-RV Algorithmic Models
An analytical breakdown of conditional heteroskedasticity and realized variance modeling to optimize scaling parameters and real-time execution risk.
Read Full Article →Alternative Data Analytics in Algorithmic Trading: Quantitative Sentiment Mining
How algorithmic trading systems process unstructured news and social feeds with low-latency NLP pipelines to extract market-beating alpha signals.
Read Full Article →FPGA Hardware Acceleration: Engineering sub-microsecond HFT Bitstreams
An architectural deep dive into FPGA-accelerated trading pipelines, direct Ethernet transceivers, and single-cycle pre-trade risk gate evaluations.
Read Full Article →Real-Time Limit Order Book Queue Position Estimation
How to estimate limit order queue position within First-In-First-Out (FIFO) matching engines using Bayesian updates and microsecond cancellation signals.
Read Full Article →Optimal Execution: Balancing Market Impact and Inventory Risk under Almgren-Chriss
Trading trajectories minimizing expected implementation shortfall cost against volatility risk by modeling permanent and temporary impact functions.
Read Full Article →Optimal Market Making: Inventory Control and Spread Dynamics under Avellaneda-Stoikov
Stochastic control theory in order book dynamics, formulating optimal reservation prices and dynamic spreads to mitigate inventory drift.
Read Full Article →Order Flow Imbalance (OFI) and Price Impact in High-Frequency Trading
How Order Flow Imbalance (OFI) measures supply-demand shifts in the limit order book (LOB), maps to short-term price impact, and optimizes execution.
Read Full Article →Reinforcement Learning in HFT: Optimizing Execution and Order Placement
How Deep Q-Networks and Proximal Policy Optimization (PPO) models learn optimal limit order placement dynamically to minimize slippage and inventory decay.
Read Full Article →Statistical Arbitrage: Cointegration and Kalman Filters in Digital Assets
How to construct stationary pairs spreads, run Johansen cointegration tests, and dynamically track hedge ratios with dynamic Kalman Filters.
Read Full Article →Smart Order Routing: Optimizing Liquidity Allocation across Fragmented Venues
How high-frequency execution engines parse order book depth and synchronize order arrival times to minimize slippage.
Read Full Article →Alternative Data & NLP: Transforming Unstructured Sentiment into Trading Signals
How quantitative models process real-time news feeds, social sentiment, and developer activity to capture predictive trading signals.
Read Full Article →Post-Quantum Cryptography in High-Frequency Trading
Engineering quantum-resilient execution infrastructure with zero-copy architectures to defend against Store Now, Decrypt Later threats.
Read Full Article →The Illusion of Backtesting: Why 90% of Alpha Models Fail in Production
Why algorithms that look great on paper fail in reality due to slippage, market impact, and ghost liquidity, and how to fix it.
Read Full Article →Data Normalization at Scale: Handling Fragmented Liquidity
How TwoWayMind ingests, cleans, and normalizes raw WebSocket and FIX feeds from dozens of global exchanges in real-time.
Read Full Article →The Evolution of Market Microstructure: Winning the Nanosecond War
A deep dive into fragmented liquidity and how TwoWayMind leverages hardware acceleration (FPGA) and smart order routing to eliminate latency.
Read Full Article →The Genesis of TwoWayMind
The story of how TwoWayMind stopped trading and spent two years in stealth mode building the infrastructure we couldn't find anywhere else.
Read Full Article →The Convergence of Market Microstructure and Nanosecond Technology
Explore how advanced C++ infrastructure and hardware-accelerated smart order routing are redefining algorithmic trading latency.
Read Full Article →