The Original Sin: Public APIs
When our core team first assembled in 2019, we weren't trying to build infrastructure. We were purely a quantitative research group focused on high-frequency statistical arbitrage in the cryptocurrency and traditional equity markets.
Our models were theoretically sound. They achieved a Sharpe ratio over 4.5 in out-of-sample backtests. But the moment we turned them on with real capital, the PnL graph inverted. We were consistently losing to slippage.
The problem wasn't our math. The problem was our eyes and hands: our data feeds and our execution router.
The Ghost Liquidity Phenomenon
Standard REST and WebSocket APIs provided by exchanges are fundamentally flawed for serious algorithmic trading. They suffer from variable latency, packet loss during high volatility, and most dangerously—ghost liquidity.
We realized that by the time a standard API told us an order book had a specific volume at a certain price level, other market participants had often already consumed that liquidity milliseconds ago. During high volatility, our algorithms were swinging at ghosts.
"We can't rely on generic API wrappers and public endpoints if we want to scale our strategies. We need to build a custom data layer from the ground up, or we need to stop trading." — TWM Founding Team (2019)
Building the TWM Engine
Faced with this reality, we made a radical decision. We paused our trading operations, incorporated RATE LTD in 2020 to protect our intellectual property, and redirected our entire engineering bandwidth into a two-year stealth mode to solve the infrastructure problem.
- Strategic Colocation: Instead of relying on centralized servers, we deployed distributed ingestion nodes in the exact same AWS and GCP regions as the target exchanges, minimizing geographical network latency.
- Custom Ingestion Layer: We abandoned standard API libraries and built a highly optimized C++ WebSocket and FIX protocol parser that bypasses the overhead of traditional JSON processing.
- Smart Order Routing: We engineered an internal router capable of normalizing and parsing fragmented liquidity across multiple venues to find the best execution paths in real-time.
From Internal Tool to Platform
After two years of relentless engineering, the TWM Engine was born. When we turned our algorithms back on, using our new proprietary infrastructure, the slippage disappeared. The ghost liquidity vanished. The backtests matched reality.
It didn't take long for other quantitative funds to notice what we had built. They wanted access. That's when TwoWayMind transitioned from a private trading desk into a financial technology provider. We realized that our infrastructure was far more valuable to the market than our proprietary trading strategies.
Today, TwoWayMind provides the pristine data pipelines and institutional-grade execution speed that levels the playing field for quantitative teams worldwide. This blog will serve as our open-source research journal as we continue to push the boundaries of market microstructure.