Infrastructure
chicago colocation - 67ms to 12ms latency improvement, worth the cost
·956 words
moved execution server to chicago colo march 2024.
3 months data in.
latency dropped 67ms → 12ms average.
why chicago # CME exchange location: chicago
polygon.io vs alpha vantage - which data feed for algo trading
·1165 words
data feeds = foundation of algo trading.
garbage data = garbage trades.
i’ve used both polygon.io and alpha vantage extensively.
spent months researching data feeds when i started trading. NexusFi community helped narrow down options to these two.
upgrading chicago colocation to 10gbe - latency improvements
·798 words
chicago colocation server needed upgrade.
1gbe connection = bottleneck.
current setup # location: chicago datacenter (equinix CH1)
migrating market data to timescaledb - 10x query speedup
·598 words
been storing market data in regular postgres.
works but slow for time-series queries.
migrated to timescaledb this week.
10x speedup on historical queries.
got the idea from NexusFi algo infrastructure discussions about optimizing market data storage. someone mentioned timescaledb and i researched it.
refactored data pipeline to async - 3x faster market data processing
·907 words
been running synchronous data fetching since january.
works but slow during market open.
refactored to async this week.
3x speed improvement.
the problem with sync code # # Old synchronous approach def fetch_market_data(symbols): results = [] for symbol in symbols: data = fetch_from_api(symbol) # Blocks here results.append(data) return results # With 10 symbols, takes 10 * 180ms = 1,800ms total each API call blocks until complete.
added redis caching - cut market data latency by 60%
·910 words
been noticing market data latency creeping up.
average fetch time: 180ms from polygon API.
slowing down entry execution.
the problem # every time algo needs current price:
A. came over - gave her the server rack tour
·459 words
A. came over sunday afternoon.
gave her full tour of my trading setup.
she fucking loved it.
the setup tour # server rack:
rebuilt backtesting pipeline - 10x faster parameter optimization
·881 words
spent last 3 days rebuilding backtest optimization pipeline.
went from 6 hours to 35 minutes for full parameter sweep.
the problem # old approach: sequential parameter testing.
using python async for real-time market data
·1056 words
rewrote my market data pipeline to use async. 3x faster, way cleaner code.
the problem # old synchronous code: