Algo Trading Developer
Algo Trading Developer Roadmap and Interview Guide
This page is a complete roadmap and interview guide for algorithmic trading developers. It covers both halves of the field that hiring teams test: the alpha side, where you turn data into signals and prove with statistics that they are real, and the systems side, where you build the software that receives market data, makes decisions and sends orders in microseconds without losing money through a bug.
Quant developers, quant researchers and trading engineers at proprietary trading firms, hedge funds, market makers and bank electronic trading desks all use this mix of skills, in different proportions. A researcher spends most of the day in Python and statistics; a low-latency developer spends it in C++ and Linux; most roles sit somewhere between and need to talk fluently to the other side.
By the end you will be able to explain how an order book and a matching engine work, build a backtest that avoids the classic biases, judge a signal by its information coefficient and Sharpe ratio after costs, write cache-friendly C++ with a lock-free queue, and answer the probability puzzles and mental maths questions that trading interviews are known for. Nothing here is investment advice: it is about building correct, measurable trading software and research.
- Level
- Intermediate to job-ready
- Time
- 6–9 months from solid programming at about 10 hours a week; 10–12 weeks of interview preparation if you already code in Python or C++ and know basic statistics
- Scope
- 55 topics in 9 stages
- Before you start
Confident programming in Python or C++: functions, classes, data structures and debugging. The Python Roadmap and Modern C++ Roadmap roadmaps cover these.
;School and first-year university maths: algebra, basic calculus, and an introduction to probability and statistics.
;Comfort working in a Linux terminal and with Git.
What you will be able to do
Explain how electronic markets, limit order books, order types and matching rules work, and trace an order from strategy to exchange and back.
Research a trading signal in pandas and numpy, measure it with information coefficient, turnover and Sharpe after costs, and defend it against overfitting.
Build an event-driven backtester that avoids look-ahead bias, survivorship bias and data snooping, with a realistic transaction cost model.
Construct a portfolio with risk limits, volatility targeting and factor neutralisation, and explain the trade-offs.
Write low-latency C++ using cache-friendly layouts, a single-producer single-consumer queue and careful measurement on a tuned Linux host.
Implement execution algorithms such as TWAP, VWAP and implementation shortfall, and parse FIX messages and market data feeds.
Answer probability brainteasers, expected value questions and mental arithmetic under time pressure, out loud and clearly.
What a Algo Trading Developer does
An algo trading developer builds and runs the software that trades financial instruments automatically. On the research side that means collecting and cleaning market and reference data, testing ideas about what predicts future returns, and turning a promising idea into a signal with measured strength, decay and cost. On the production side it means the trading system itself: feed handlers that decode exchange data, a strategy engine that updates its view on every message, an order manager, pre-trade risk checks and the connections to exchanges or brokers.
The job title varies. Quant developer, quant researcher, algorithmic trading engineer, execution developer and low-latency C++ developer all overlap. What they share is that small errors cost real money quickly, so the work is measured, tested and monitored with unusual care. Developers work closely with traders and researchers, are often on the trading floor or in the same channel during market hours, and are expected to understand why a strategy makes money, not only how the code runs.
A typical week
Check overnight jobs and the start-of-day state: data loads, reference data, positions and risk limits, before the market opens.
Research a signal idea in a notebook: load point-in-time data, compute the signal, measure its information coefficient and decay, and write up the result honestly.
Extend the backtester or simulator, for example adding a queue position model or a better cost model, and compare results against live fills.
Profile and optimise a hot path in the C++ trading engine, using latency histograms rather than averages to judge the change.
Support live trading: watch dashboards for rejects, fills, P&L and latency, and investigate anything unusual with logs and packet captures.
Review code with a strong focus on correctness, risk checks and failure handling, since a bug in an order path can lose money in seconds.
What is expected at each level
Junior
Implements well-specified features in Python or C++ with tests, such as a new market data field or a research data loader.
Knows the basic market structure: order types, the order book, bid and ask, and how P&L is computed.
Spots obvious backtest mistakes such as using same-day close to trade at the same close.
Answers probability and expected value questions correctly and explains the reasoning.
Mid
Owns a component end to end: a feed handler, an execution algorithm, a backtest engine or a signal family.
Designs experiments that guard against overfitting and data snooping, and reports results with costs and uncertainty.
Profiles and reduces latency with evidence, understanding caches, allocation and system calls.
Handles live incidents calmly and writes clear post-incident reviews.
Senior
Designs the architecture of a trading system or research platform, including risk controls, replay and deployment.
Judges which research ideas are worth pursuing and challenges results that look too good.
Balances latency, correctness and development speed, and knows when a microsecond matters and when it does not.
Mentors juniors, sets testing and review standards, and works directly with traders on strategy changes.
Lead or Principal
Sets technical direction for a desk or platform and owns its reliability and risk record.
Works with compliance and risk management on controls, audit trails and regulatory obligations.
Decides build-versus-buy for infrastructure such as market data, colocation and time-series databases.
The interview loop
- Recruiter or hiring manager screen20–30 min
What it tests. Your motivation for trading, which side you lean towards (research, execution or low latency), the languages you use, and whether you understand what the team does.
How to prepare. Prepare a two-minute story of your strongest technical project with numbers: data size, latency, accuracy. Be ready to say in plain words what market making, statistical arbitrage and execution mean.
- Online assessment60–120 min
What it tests. Timed coding problems, often with a performance element, plus multiple-choice probability, sequences and arithmetic. Some firms use a fast mental maths test with no calculator.
How to prepare. Practise medium algorithm problems in your main language in coding practice, and drill mental arithmetic daily: multiplication of two-digit numbers, fractions to decimals and percentages.
- Probability and mental maths round45–60 min
What it tests. Expected value, conditional probability, combinatorics, simple games and betting questions, and how you reason out loud when you are unsure.
How to prepare. Work through dice, coin, card and urn problems until you can set up the states and equations quickly. Always state your assumptions, check edge cases and sanity-check the size of the answer.
- Technical coding round45–60 min
What it tests. Data structures and algorithms, plus language depth: C++ object lifetime, templates, move semantics and memory for systems roles; pandas and numpy fluency for research roles.
How to prepare. Implement an order book, an LRU cache, a ring buffer and a rolling statistics class from memory. Explain complexity and cache behaviour, not only big-O.
- Domain round: research case or trading system design60 min
What it tests. For research: how you would test a signal, which biases you would guard against and how you would judge it. For systems: the design of a feed handler, an order gateway or an exchange simulator, with latency and failure handling.
How to prepare. Rehearse one full research write-up and one system design aloud. Use system design practice to practise drawing the data path from exchange packet to order and back.
- Behavioural and team fit30–45 min
What it tests. How you behave under pressure, how you handle being wrong, honesty about mistakes, and how you work with traders who need answers quickly.
How to prepare. Prepare stories about a bug you caused and fixed, a result you retracted, a disagreement settled with data, and a time you shipped under a deadline without cutting safety corners.
Skill roadmaps for this role
Each skill below has its own complete roadmap. Learn the core ones first.
- CoreData Structures and Algorithms Roadmap
Every trading interview has algorithm rounds, and order books, queues and heaps are the daily data structures of the job.
- CorePython Roadmap
Python is the main research language and the glue for data pipelines, analysis and tooling.
- CorePython for Data Analysis Roadmap
pandas and numpy are how signals are computed, aligned in time and evaluated, and research interviews test them directly.
- HelpfulSQL Roadmap
Trade, order and reference data often live in relational or columnar stores, and SQL is the common way to query them.
- CoreModern C++ Roadmap
Production trading engines that care about latency are mostly written in modern C++, and systems interviews go deep into it.
- CoreLinux Roadmap
Trading servers run Linux, and tuning, debugging and measuring them needs comfort with the kernel, processes and networking tools.
The Algo Trading Developer roadmap
- Stage 1Markets and instrumentsBeginner · 2–3 weeks · 4 topics
- Stage 2Probability, statistics and mental mathsBeginner · 3–4 weeks · 8 topics
- Stage 3Research tooling: Python, pandas, data and kdb+Intermediate · 3–4 weeks · 5 topics
- Stage 4Alpha research: signals and factorsIntermediate · 4–5 weeks · 6 topics
- Stage 5Backtesting and avoiding false discoveriesIntermediate · 3–4 weeks · 7 topics
- Stage 6Risk and portfolio constructionAdvanced · 2–3 weeks · 4 topics
- Stage 7Market microstructure and executionAdvanced · 4–5 weeks · 8 topics
- Stage 8Low-latency trading systemsAdvanced · 5–6 weeks · 10 topics
- Stage 9Interview preparation and careerAdvanced · 2 weeks · 3 topics
Stage 1 Markets and instruments
Goal. Explain how electronic markets work, what is traded, how orders behave and how returns and P&L are measured.
How Electronic Markets Work Core
Most trading today happens on electronic venues: exchanges, multilateral trading facilities and dark pools. Each venue runs a matching engine that holds resting orders and pairs buyers with sellers according to published rules. Participants connect through member firms or brokers, send orders over a session protocol, and receive market data that describes the state of the book.
Prices are set where supply meets demand. The best price someone will pay is the bid, the best price someone will sell at is the ask (or offer), and the gap between them is the spread. The midpoint between the two is the usual reference for a fair price. A stock may trade on many venues at once, so a trading system often sees fragmented liquidity and must decide where to route.
Participants differ in why they trade. Market makers quote both sides and earn the spread; liquidity takers cross it to trade now; the buy side trades to express investment views, and the sell side executes for clients.
Practice. Draw the path of one order from a strategy to an exchange and back, labelling every message and component.
Asset Classes and Instruments Core
Algorithmic trading covers several asset classes, each with its own conventions. Equities are shares in companies, traded on exchanges with corporate actions such as dividends and splits. Futures are standardised contracts to buy or sell later at an agreed price; they expire, so continuous price series must be stitched across contract rolls. Options give a right but not an obligation, and their value depends on volatility, time and the underlying price.
Foreign exchange trades mostly over the counter across many venues, around the clock on weekdays. Fixed income and credit trade more through dealers and request-for-quote systems, though electronic trading keeps growing. Crypto assets trade on venues that run all week and have their own data quirks.
Interviewers expect you to know the basic mechanics of at least equities and futures, including tick size, lot size, contract multiplier and settlement.
Practice. Pick one equity and one futures contract and write down tick size, trading hours, multiplier and how P&L is computed for each.
Returns, Prices and P&L Core
A simple return is (P1 − P0) / P0. A log return is ln(P1 / P0); log returns add across time, which makes multi-period maths easy, while simple returns add across assets in a portfolio. For small moves the two are close. Always use prices adjusted for splits and dividends when computing returns over time, or a two-for-one split looks like a 50 percent crash.
P&L has two parts. Realised P&L comes from closed trades. Unrealised or mark-to-market P&L values open positions at a current price, usually the mid or last trade. Fees, rebates, financing and borrow costs must be subtracted to get the real figure.
Practice. From a list of fills, compute realised and unrealised P&L with average cost accounting and check it against a hand calculation.
Order Types and Time in Force Core
A market order trades immediately at the best available prices and accepts whatever they are. A limit order sets the worst price you accept; if it cannot trade, it rests in the book and waits. A stop order becomes active only when the price reaches a trigger. Venues add variants: iceberg orders show only part of their size, pegged orders track the best price, and post-only orders are rejected if they would trade immediately, so a market maker never pays the taker fee by accident.
Time in force says how long an order lives. Day orders expire at the close, immediate or cancel (IOC) fills what it can and cancels the rest, fill or kill (FOK) fills completely or not at all, and good till cancelled stays until removed.
Practice. For each order type, describe one situation where it is the right choice and one risk of using it.
Stage 2 Probability, statistics and mental maths
Goal. Reason with probability and statistics quickly and correctly, including the puzzles and arithmetic that trading interviews use.
Probability and Expected Value Core
Probability is the language of trading: every decision is a bet with uncertain payoff. The expected value of a random outcome is the probability-weighted average of its values. A trade with positive expected value after costs is worth taking if the risk is acceptable; one with negative expected value is not, however exciting.
Learn the rules cold: complement, addition for mutually exclusive events, multiplication for independent events, and linearity of expectation, which holds even when variables are dependent. Linearity solves many interview puzzles in one line, for example the expected number of fixed points in a random permutation of n items is 1, because each position is fixed with probability 1/n.
Practice. Find the expected number of rolls of a fair die until you see a six, then the expected number until you have seen every face.
Conditional Probability and Bayes' Rule Core
Conditional probability P(A | B) is the probability of A once you know B happened. Bayes' rule reverses it: P(A | B) = P(B | A) P(A) / P(B). Trading uses this way of thinking constantly: how much should a large print on the tape change your view of where the price is going?
Classic interview questions test whether you ignore base rates. If a test for a rare condition is 99 percent accurate and the condition affects one person in a thousand, a positive result still means the person probably does not have it, because false positives from the large healthy group outnumber the true positives.
Practice. Solve the two-children problem in both of its common phrasings and explain why the answers differ.
Distributions, Variance and Fat Tails Core
Know the common distributions and when they appear: Bernoulli and binomial for counts of wins, Poisson for arrivals such as orders per second, normal for sums of many small effects, and exponential for waiting times. For each, know the mean and variance.
Variance adds for independent variables, so the standard deviation of a sum of n independent equal risks grows like the square root of n. This is why daily volatility is scaled to annual by multiplying by the square root of about 252 trading days. Covariance and correlation measure how two variables move together; correlation is covariance divided by both standard deviations.
Real returns have fat tails: extreme moves happen far more often than a normal distribution predicts, and volatility comes in clusters. Any risk model that assumes normality will understate the chance of a very bad day.
Practice. Simulate daily returns from a normal and from a Student t distribution with the same variance, and compare how often a four-standard-deviation day occurs.
Linear Regression for Quants Core
Ordinary least squares fits y = a + bx + error by minimising squared errors. In trading it measures a stock's beta to the market, the sensitivity of returns to a factor, or how well a signal predicts future returns. Know how to read the coefficient, its standard error and t-statistic, and R-squared.
Know the assumptions and how they fail on financial data: errors are not independent because returns overlap in time, variance changes over time, and outliers dominate the squared loss. Use standard errors that allow for autocorrelation and heteroskedasticity, winsorise extreme values, and be suspicious of a high R-squared on price levels, which is usually a spurious regression of two trending series.
Practice. Regress one stock's daily returns on an index's returns, report beta and its t-statistic, then repeat on prices and explain why that result is misleading.
Hypothesis Testing and Multiple Testing Core
A hypothesis test asks whether an observed effect is larger than chance would produce. The p-value is the probability of seeing a result at least this extreme if the null hypothesis, usually no effect, were true. It is not the probability that the strategy works.
The danger in research is multiple testing. If you try 100 random signals, about five will pass a 5 percent test by luck. Researchers who try many variants of parameters, universes and holding periods are running hidden multiple tests. Corrections such as Bonferroni, which divides the threshold by the number of tests, or false discovery rate control help, and a common practical rule is to demand a much higher t-statistic, around 3 rather than 2, for a new signal.
Practice. Generate 200 random signals on real returns, test each, count how many look significant, then apply a Bonferroni correction.
Time-Series Basics Core
Financial data is ordered in time, and most standard statistics assume it is not. A series is stationary if its statistical properties do not change over time. Prices are not stationary; returns are closer to it. Always model returns, spreads or other stationary transformations rather than raw prices.
Autocorrelation measures how a series relates to its own past. Daily stock returns show little of it, while volatility is strongly autocorrelated, which is why models such as GARCH forecast volatility better than returns. Mean-reverting series, such as the spread between two closely related assets, can be modelled with an autoregressive process, and the half-life of reversion tells you the useful holding period.
Overlapping returns, for example 20-day returns sampled daily, create autocorrelation by construction and make naive t-statistics far too large.
Practice. Compute the autocorrelation of daily returns and of absolute daily returns for an index and explain the difference.
Mental Maths and Market Making Games Core
Many firms test fast arithmetic without a calculator: two-digit multiplication, division to a few decimal places, percentages and fractions. Speed comes from tricks. 47 × 53 = 50² − 3² = 2491. 1/7 is about 0.1429, 1/8 is 0.125, and 1/9 is 0.111. To find 6 percent of 350, compute 1 percent (3.5) and multiply by 6.
Market making games are also common: the interviewer asks for a two-sided price on an uncertain quantity, such as the sum of three dice, then trades with you. Quote around your expected value (10.5 for three dice), widen the spread when uncertain, and update your quotes when the interviewer's trades reveal information. Explain your thinking as you go.
Practice. Do a daily timed drill of 80 mixed arithmetic questions and track your score and error rate for three weeks.
Stage 3 Research tooling: Python, pandas, data and kdb+
Goal. Load, clean, align and analyse market data efficiently and reproducibly with Python, numpy, pandas, SQL and time-series databases.
numpy Vectorisation Core
numpy stores data in contiguous typed arrays and runs operations in compiled code, so whole-array arithmetic is orders of magnitude faster than Python loops. Learn broadcasting, which combines arrays of different shapes without copying, boolean masks for filtering, and functions such as cumsum, diff, argsort and where.
Watch the details that bite in research: integer overflow in cumulative sums of large volumes, NaN propagation through sums and means, and floating-point comparison. Use nan-aware functions such as nanmean deliberately, not by habit, because silently skipping missing data can hide a data problem.
Practice. Compute cross-sectional ranks of a signal for each day in a dates-by-stocks array using only numpy, with no Python loop over dates.
pandas for Time Series Core
pandas is the workhorse for research data. The key skills are time-indexed data: resampling ticks to bars, rolling and expanding windows, shift for lags, and aligning series with different timestamps. merge_asof joins each trade to the most recent quote at or before its time, which is exactly what a point-in-time join needs.
Use a long format (date, symbol, value) or a wide format (dates as rows, symbols as columns) on purpose, and convert with pivot and stack. groupby on date gives cross-sectional operations such as ranking or demeaning; groupby on symbol gives per-asset time-series operations.
Be careful with time zones and with timestamps that mark the start or the end of a bar. The Python for Data Analysis Roadmap covers pandas in depth.
Practice.
# signal known at close t, traded from t+1
sig = px.pct_change(20)
fwd = px.pct_change().shift(-1)
ic = sig.rank(axis=1).corrwith(fwd.rank(axis=1), axis=1)Explain why the forward return uses shift(-1) and what would go wrong without it.
Market Data and Point-in-Time Correctness Core
Research is only as good as its data. Market data comes as trades, quotes, and full order book updates; reference data covers symbols, corporate actions, index membership and trading calendars; fundamental data covers company accounts. Each has its own problems: bad prints, missing days, symbol changes and late corrections.
The key idea is point-in-time data: for every date, you must know only what was knowable then. Company results are published weeks after the period ends and are later restated; index membership changes; a dataset built today may silently include revisions. Store the time each value became available, not only the period it describes.
Practice. Build a daily universe table that records which symbols were tradable on each historical date, including ones that were later delisted.
SQL and Time-Series Storage Recommended
Trade records, orders, positions and reference data often live in relational databases, and research data in columnar files such as Parquet or in time-series databases. SQL is the shared language for querying them. You should write joins, aggregations and window functions comfortably, for example a running position per account with SUM OVER (PARTITION BY account ORDER BY time).
Columnar storage reads only the columns you need and compresses well, which suits wide market data tables. Partition data by date and symbol so that a query for one day does not scan years. For large research datasets, engines that run SQL over Parquet files on a single machine are often enough before you need a cluster.
Know how to check data quality with SQL: duplicates, gaps, and prices outside the day's range. The SQL Roadmap covers the language in depth.
Practice. Write a SQL query that computes each symbol's daily volume-weighted average price from a trades table using a window or group aggregate.
kdb+ and q Optional
kdb+ is a column-oriented time-series database widely used in trading for tick data, and q is its terse array language. You will meet it at many banks and trading firms for storing and querying billions of trades and quotes. Data is usually split into an in-memory real-time database for today and a date-partitioned historical database on disk.
Its strength is fast operations on ordered columns: as-of joins that attach the prevailing quote to each trade, time bucketing into bars, and aggregates over very large tables. q reads right to left and treats lists and tables as first-class values, so idioms look unfamiliar at first.
Practice. Describe in plain words how you would store a year of trades and quotes in a date-partitioned time-series database and query the VWAP for one symbol and day.
Stage 4 Alpha research: signals and factors
Goal. Generate, measure and combine trading signals, and explain where their returns come from and why they decay.
What Alpha Means Core
Alpha is return that cannot be explained by exposure to known, cheaply available risks such as the overall market. If a strategy earns 10 percent a year but simply holds the market with a beta of one, it has no alpha; you could buy an index fund. A signal has alpha when it predicts returns after removing those exposures and after paying realistic costs.
Every real edge has an economic reason: someone is willing to pay you, for example for immediate liquidity, for taking a risk they want to shed, or because of a behavioural bias or a structural constraint such as index rebalancing. If you cannot say who is on the other side and why, be very sceptical of a backtest.
Practice. For three well-known effects, write one sentence each on who is paying the return and why they might keep doing so.
Common Signal Families Core
Most signals fall into a few families. Momentum bets that recent winners keep winning over weeks to months. Mean reversion bets that short-term moves partly reverse, often over days or minutes. Value and other fundamental signals compare price with accounting measures. Carry earns the yield or roll of holding an asset. Statistical arbitrage trades the spread between related assets, as in pairs trading.
At short horizons, microstructure signals dominate: order book imbalance, the size and direction of recent trades, queue changes and the lead-lag between related instruments such as a future and its underlying shares. Alternative data, such as text or satellite measures, is used mostly at longer horizons.
Practice. Implement a 12-month minus 1-month momentum signal and a 5-day reversal signal on the same universe and compare their turnover.
Cross-Sectional and Time-Series Signals Core
A cross-sectional signal ranks assets against each other at the same moment: buy the top decile, sell the bottom decile. It is naturally market-neutral and predicts relative returns, so a market crash affects both sides. A time-series signal looks at one asset against its own history: go long when its trend is up, short when it is down. Trend-following in futures is the classic example.
The two need different evaluation. Cross-sectional signals are judged by how well the ranking predicts the next period's ranking of returns, day by day. Time-series signals are judged by the profit of each asset's position over time and are exposed to the overall direction of the market.
Practice. Build both a cross-sectional and a time-series version of a momentum signal and compare their correlation to the market.
Factor Models and Neutralisation Core
A factor model explains each asset's return as exposures to a few common factors, such as the market, sector, size, value and momentum, plus an asset-specific part. Factor models are used for risk, to decompose P&L, and to find out whether a new signal is just an old factor in disguise.
To test a signal for new information, neutralise it: regress the signal cross-sectionally on the factor exposures each day and keep the residual. If the residual still predicts returns, the signal adds something. If its predictive power disappears, you have rediscovered a known factor.
Practice. Neutralise your momentum signal against sector membership and beta and report how its information coefficient changes.
Information Coefficient and the Fundamental Law Core
The information coefficient (IC) is the correlation between a signal and the subsequent returns, usually computed cross-sectionally each period with ranks. Values look tiny: a daily IC of 0.02 to 0.05 can be valuable when applied across many stocks and days. Report the mean IC, its standard deviation and the IC information ratio (mean divided by standard deviation).
The fundamental law of active management approximates the information ratio as IC multiplied by the square root of breadth, where breadth is the number of independent bets per year. It explains why weak signals applied to many assets often beat strong signals on a few. Real bets are correlated, so effective breadth is smaller than the raw count.
Practice. Compute the daily rank IC of a signal for horizons of 1, 5, 10 and 20 days and plot the decay curve.
Alpha Decay, Turnover and Capacity Core
Alpha decay describes how quickly a signal's predictive power fades after it is computed. Fast-decaying signals must be traded quickly, which means high turnover, the fraction of the portfolio traded per period, and high costs. A signal with strong IC at one day but fast decay may lose to a weaker, slower signal once costs are included.
Capacity is how much capital a strategy can run before its own trading costs, mostly market impact, eat the edge. It falls with turnover and rises with the liquidity of the assets traded. Estimate it by simulating larger sizes with an impact model.
Practice. Estimate the break-even cost per trade for a signal by dividing its gross return by its turnover, and compare it with typical spreads.
Stage 5 Backtesting and avoiding false discoveries
Goal. Build a backtest you can trust, recognise every common bias, and judge a strategy with honest metrics after costs.
Backtest Architecture Core
A vectorised backtest computes positions and returns for all dates at once with array operations. It is fast and ideal for early research on daily signals, but it makes it easy to use future data by accident and hard to model orders, partial fills and queue position.
An event-driven backtest replays data in time order through the same interfaces the live system uses: market data events go to the strategy, the strategy sends orders to a simulated exchange, and fills come back as events. It is slower but much closer to reality, and it lets research and production share strategy code.
Practice. Write a small event-driven loop with a data feed, a strategy, a simulated broker and a portfolio, and reproduce your vectorised results within a small tolerance.
Look-Ahead Bias Core
Look-ahead bias means using information in the simulation before it was available. Classic forms: computing a signal from today's close and trading at today's close, using a full-sample mean or volatility to normalise data, using restated fundamentals, using an index's current members for past dates, and joining data on the period it describes instead of the time it was published.
The symptom is a result that is too good: very high Sharpe, smooth equity curve, profits concentrated in the first minutes after events. The cure is discipline: lag every input explicitly, compute normalisations with expanding or rolling windows only, store publication timestamps, and test that shuffling future data does not change past decisions.
A simple guard is a unit test that truncates the data at date t and checks that the positions up to t are identical.
Practice. Add a deliberate one-day look-ahead to a strategy, record how much the Sharpe ratio rises, then write a test that would have caught it.
Survivorship and Selection Bias Core
Survivorship bias comes from testing only on assets that still exist today. Companies that went bankrupt, were taken over or were delisted vanish from many free datasets, so a backtest on today's index members silently avoids every failure and overstates returns, especially for strategies that buy cheap or falling stocks.
The fix is a point-in-time universe: for each historical date, include exactly the assets that were tradable and met your rules then, with delisting returns where available. Selection bias also appears when you choose the test period, the market or the asset list after seeing results.
Practice. Run the same strategy on a survivor-only universe and on a point-in-time universe and report the difference in annual return.
Data Snooping and Overfitting Core
Overfitting is tuning a strategy until it fits the noise of the past. Data snooping is the wider problem: every idea you try on the same history, and every idea others published from it, uses up the information in that data. A backtest that survived 500 trials is much weaker evidence than one that survived on the first try.
Defences: fewer free parameters, parameters chosen for economic reasons, results that are stable across nearby parameter values, a held-out period never touched during research, and reporting the number of trials. Adjusted measures such as the deflated Sharpe ratio estimate how high a Sharpe ratio needs to be given the number of variants tried.
Practice. Grid-search two parameters of a moving-average strategy, plot the Sharpe surface, and pick a setting from the plateau rather than the peak.
Walk-Forward Testing and Time-Series Validation Core
Random k-fold cross-validation leaks the future into the past for time-series data. Use walk-forward testing instead: fit on a window, test on the following period, roll forward and repeat, so every test result comes from a model that only saw earlier data.
When labels span time, such as 10-day forward returns, training samples near the test period overlap with test labels. Purging removes those samples from training, and an embargo leaves a gap after the test period before training resumes. Without them, validation scores are inflated.
Practice. Implement walk-forward validation with purging and an embargo for a 5-day forward return label and compare scores with plain k-fold.
Transaction Cost Modelling Core
Costs turn many good-looking signals into losers. Model them in layers. Explicit costs are commissions, exchange fees, rebates and taxes. Spread cost is paying half the bid-ask spread each time you cross it. Market impact is the price moving against you because of your own trading; a widely used approximation makes impact grow with the square root of trade size as a fraction of daily volume, scaled by volatility.
For passive strategies that post limit orders, model fill probability and adverse selection: your passive orders tend to fill just before the price moves against you. Ignoring this makes market making look far better than it is.
Short selling adds borrow costs and recall risk. Always report results gross and net of costs, and show how net performance changes if costs are doubled.
Practice. Add a spread plus square-root impact model to your backtest and plot net Sharpe as you scale the capital from small to large.
Performance Metrics Core
The Sharpe ratio is mean excess return divided by its standard deviation, annualised; for daily returns multiply the daily ratio by the square root of 252. It ignores the shape of losses, so also report the maximum drawdown (largest peak-to-trough fall), the Sortino ratio, which penalises only downside volatility, and the Calmar ratio of return to drawdown.
Add trading statistics: turnover, hit rate, average win against average loss, holding period, and P&L per unit traded. A strategy with a low hit rate can be excellent if wins are large; a high hit rate with rare huge losses is a warning.
Practice. Write a metrics function that reports annualised return, volatility, Sharpe, Sortino, maximum drawdown, turnover and hit rate for a daily P&L series.
Stage 6 Risk and portfolio construction
Goal. Turn forecasts into positions under risk limits, and measure and control the risk a strategy takes.
Risk Measures Core
Volatility, the standard deviation of returns, is the basic risk measure. Value at risk (VaR) is the loss that should be exceeded only with a given small probability over a horizon, for example the one-day 99 percent VaR. It says nothing about how bad losses are beyond that point, so many teams also use expected shortfall, the average loss in the worst cases.
Compute these with historical simulation, a parametric model or Monte Carlo, and know each method's weakness: history may not contain the next crisis, and parametric normal models understate fat tails. Add stress tests that replay large historical moves or hypothetical shocks.
Practice. Compute one-day 99 percent historical VaR and expected shortfall for a portfolio, and compare with the normal-distribution estimate.
Covariance Estimation and Shrinkage Core
Portfolio risk depends on the covariance matrix of asset returns. With hundreds of assets and a few years of data, the sample covariance matrix is very noisy: it has far more parameters than the data can pin down, and its smallest eigenvalues are badly underestimated. Optimisers then exploit that noise and build portfolios that look low-risk but are not.
Shrinkage pulls the sample matrix towards a simple target, such as a constant-correlation matrix, trading a little bias for much less variance. Factor models reduce the problem to a few factor covariances plus specific risks. Exponentially weighted estimates react faster to changing volatility.
Practice. Compare realised volatility of minimum-variance portfolios built from the sample covariance and from a shrunk covariance on held-out data.
Portfolio Optimisation Core
Mean-variance optimisation chooses weights that maximise expected return minus a penalty on variance. In practice it is very sensitive to errors in expected returns, and unconstrained solutions often take extreme positions. Production systems add constraints: position and sector limits, neutrality to the market and factors, turnover limits and a cost term in the objective.
Simpler methods often work well: weight by signal divided by volatility, use inverse-volatility weights, or apply risk parity. The choice depends on how reliable your forecasts are.
Practice. Build a constrained optimiser with cvxpy or a similar library: market neutral, sector neutral, a turnover limit and a cost penalty.
Position Sizing and Volatility Targeting Core
Position sizing decides how much to trade on each signal. Volatility targeting scales positions so that each strategy or asset contributes a chosen risk, for example sizing each futures position to the same expected daily P&L volatility. It keeps risk steady when markets become calmer or wilder.
The Kelly criterion gives the bet size that maximises long-run growth; for a strategy with mean excess return mu and variance sigma squared, the full Kelly leverage is mu divided by sigma squared. Because the estimates are uncertain and full Kelly leads to deep drawdowns, practitioners use a fraction of it, often a half or less.
Practice. Simulate repeated bets at full, half and double Kelly and plot the distribution of final wealth and the worst drawdowns.
Stage 7 Market microstructure and execution
Goal. Understand order books, matching, market data and order protocols, and build execution algorithms that trade efficiently.
The Limit Order Book Core
The limit order book lists resting buy orders (bids) and sell orders (asks) by price. Each price level holds a queue of orders. An incoming order that crosses the spread trades against the opposite side, best price first; whatever remains, if it is a limit order, joins its own side of the book.
Market data describes the book at different depths. Level 1 shows the best bid and ask with sizes; Level 2 shows aggregate size at each price level; Level 3, or order-by-order data, shows each individual order with its own identifier, so you can rebuild the queue exactly.
Practice. Implement an order book that applies add, modify, cancel and trade messages and prints the top five levels after each update.
Matching Engines and Priority Rules Core
Most venues use price-time priority: better prices trade first, and among orders at the same price, earlier orders trade first. Changing an order's price or increasing its size usually sends it to the back of the queue; reducing size often keeps priority. Some futures markets use pro-rata allocation, splitting fills in proportion to resting size, which rewards large orders instead of being early.
Queue position is valuable in price-time markets: the first order at a price is likely to fill before the price moves away, and the last is likely to fill only when the price is about to move against it. This is why low latency matters for passive strategies.
Practice. Extend your order book into a matching engine with price-time priority, partial fills and IOC orders, and write tests for each case.
Market Data Feeds Core
Exchanges publish market data, usually as binary messages over UDP multicast, because one packet reaches every subscriber at once. Each message carries a sequence number. A feed handler decodes the messages, detects gaps in sequence numbers, recovers missing data from a retransmission service or snapshot, and builds the book for the strategy.
Venues often publish two identical feeds on separate networks, A and B; the handler takes whichever copy arrives first and uses the other to fill gaps. Timestamps from the exchange, the network card and the application let you measure delay at each stage.
Practice. Write a decoder for a simple binary message format, add gap detection with a recovery request, and test it with dropped and reordered packets.
The FIX Protocol Core
FIX (Financial Information eXchange) is the standard text protocol for orders between firms, brokers and many venues. Messages are lists of tag=value fields separated by the SOH character. Tag 35 gives the message type: D is a new order, F a cancel request, G a cancel/replace, 8 an execution report, A a logon and 0 a heartbeat. Other common tags are 11 (client order ID), 54 (side), 38 (quantity), 44 (price) and 39 (order status).
A FIX session handles logon, heartbeats, sequence numbers and resending missed messages; the application layer handles orders. Many exchanges also offer faster binary protocols for order entry, but FIX remains the common language for brokers and clients.
Practice.
8=FIX.4.4|35=D|49=CLIENT|56=BROKER|34=12|11=ord-001|
55=XYZ|54=1|38=500|40=2|44=101.25|59=0|10=123|Decode this new order message field by field, then write the execution reports for a partial fill and a final fill.
Order Lifecycle and Order Management Core
An order passes through states: pending new, new (acknowledged), partially filled, filled, pending cancel, cancelled, replaced or rejected. An order management system tracks each order's state, the quantity still working and the fills, and keeps positions in step. It must handle messages arriving in surprising orders, for example a fill that arrives after you sent a cancel.
Model the order as an explicit state machine with allowed transitions, and treat any unexpected transition as an alert. Use unique client order IDs, persist state so a restart does not lose working orders, and reconcile against the venue's view at start of day and after any disconnection.
Most trading incidents are not clever strategy failures. They are state bugs: duplicated orders, lost cancels and positions out of sync.
Practice. Write an order state machine with tests for cancel-fill races, rejects and replace requests that arrive after a full fill.
Execution Algorithms: TWAP, VWAP and POV Core
Execution algorithms split a large parent order into many small child orders to reduce impact. TWAP trades evenly over time: 10,000 shares over 100 minutes means about 100 a minute. VWAP follows the market's typical volume profile across the day, trading more at the open and close, so the average price tracks the volume-weighted average price. POV (percentage of volume) trades a fixed fraction of the volume actually observed.
Good implementations add randomness to size and timing so they are less predictable, choose between passive and aggressive child orders based on urgency and book state, and respect limit prices and participation caps.
Practice. Implement TWAP, VWAP and POV schedulers in your simulator and compare their average price and completion time on the same day of data.
Implementation Shortfall and Transaction Cost Analysis Core
Implementation shortfall measures the cost of executing a decision: the difference between the price when the decision was made (the arrival price) and the average price actually achieved, plus the cost of any part not executed. It exposes the trade-off at the heart of execution: trading fast increases impact, trading slowly increases risk that the price drifts away.
Optimal execution models, such as the Almgren-Chriss framework, choose a trading schedule that balances expected impact cost against the variance of the outcome, given a risk aversion. More urgent orders trade faster.
Practice. For a set of simulated parent orders, compute implementation shortfall and VWAP slippage in basis points and plot them against order size.
Market Making and Adverse Selection Recommended
A market maker quotes a bid and an ask and hopes to buy at the bid and sell at the ask many times. The risks are inventory risk, holding a position while the price moves, and adverse selection, trading with someone who knows more, so fills tend to come just before the price moves against you.
Basic models set quotes around a fair value, then skew them according to inventory: if you are long, lower both quotes to encourage selling. Spreads widen when volatility rises or when informed flow is likely. Fair value often uses the microprice or a short-horizon signal rather than the plain mid.
Practice. Simulate a simple market maker with inventory skew on historical data and measure P&L, inventory and the average price move after each fill.
Stage 8 Low-latency trading systems
Goal. Build and measure fast, correct trading software in C++ on Linux, with the safety controls that production trading needs.
Trading System Architecture Core
A typical trading system has a clear pipeline: feed handlers decode market data and build books; a strategy engine reacts to book updates and computes orders; an order gateway applies risk checks and speaks the venue protocol; a position and risk service tracks exposures; and logging, monitoring and reference data services sit around them.
Latency-sensitive paths keep everything in one process on dedicated cores, passing messages through shared-memory queues, and avoid locks, allocation and system calls on the hot path. Slower components, such as dashboards and databases, are kept off that path and fed asynchronously.
Practice. Draw the architecture of a small trading system with five components and mark which paths are latency-critical and which are not.
Modern C++ for Low Latency Core
Low-latency C++ is ordinary modern C++ used with discipline. Avoid heap allocation on the hot path by preallocating object pools and using fixed-capacity containers. Prefer value types and contiguous storage such as std::vector and std::array over node-based containers like std::map and std::list, which scatter data across memory.
Use templates and compile-time dispatch, including constexpr and the curiously recurring template pattern, instead of virtual calls where it matters. Know move semantics, so large objects are not copied, and know which standard library calls may allocate or throw. Avoid exceptions on the hot path; many teams disable them there entirely.
Measure before changing anything, and keep the code readable: the fastest code that nobody can review is a liability. The Modern C++ Roadmap covers the language in depth.
Practice. Rewrite an order book that uses std::map of std::list into one built on flat arrays and a free list, and benchmark both on the same message stream.
CPU Caches and Memory Layout Core
A modern CPU core can do a great deal of work in the time one main-memory access takes, so cache behaviour often decides performance. Data moves in cache lines, typically 64 bytes. Keep hot data small and contiguous, put fields used together next to each other, and lay out arrays so loops walk memory in order.
False sharing happens when two threads write to different variables on the same cache line: the line bounces between cores and both slow down. Fix it by aligning such variables to separate cache lines, for example with alignas(64).
Practice. Benchmark two threads incrementing adjacent counters, then align them to separate cache lines and measure the change.
Lock-Free Queues and Concurrency Core
Threads in a trading system pass messages without locks where latency matters. The workhorse is the single-producer single-consumer ring buffer: a fixed array with a head index written only by the consumer and a tail index written only by the producer. With the right atomic memory ordering, each side needs only a load and a store.
Use release ordering when publishing a slot and acquire ordering when reading the index, so the data is visible before the index change. Put the two indices on separate cache lines. Multi-producer queues are harder and slower; avoid them by design where you can.
Practice.
bool push(const T& v) {
auto t = tail_.load(std::memory_order_relaxed);
auto n = (t + 1) & mask_;
if (n == head_.load(std::memory_order_acquire)) return false;
buf_[t] = v;
tail_.store(n, std::memory_order_release);
return true;
}Write the matching pop function, explain each memory order, and stress-test the queue with a sanitiser.
Linux Tuning for Trading Core
Trading servers are tuned to make latency low and, just as important, predictable. Common steps: isolate cores from the scheduler with isolcpus or cgroups, pin each critical thread to its own core, keep interrupts away from those cores, disable deep power-saving states and frequency scaling, and use huge pages to reduce translation lookaside buffer misses.
Hot threads often busy-poll, spinning on a queue instead of sleeping, which costs a whole core but avoids wake-up delay. Memory is allocated and touched at start-up so page faults do not occur during trading. NUMA placement keeps threads near their memory and network card.
Learn the tools: perf for profiling, strace for system calls, and the proc and sys file systems for configuration. The Linux Roadmap covers the operating system in depth.
Practice. Pin a benchmark thread to an isolated core and compare its latency percentiles with an unpinned run under background load.
Networking and Kernel Bypass Recommended
The normal Linux network stack is general and safe, but each packet passes through interrupts, kernel buffers and system calls, which adds microseconds and variable delay. Kernel bypass lets an application read and write packets directly from the network card's memory in user space, avoiding most of that work. Vendors provide libraries that offer familiar socket interfaces over bypass, and frameworks such as DPDK expose the raw approach.
Firms also colocate servers in the exchange's data centre, choose network cards with hardware timestamping, and in the most latency-sensitive cases move parts of the logic into FPGAs.
For interviews, know the concepts: why multicast UDP for data and TCP for orders, what Nagle's algorithm does and why it is disabled with TCP_NODELAY, and where time goes between a packet arriving and an order leaving.
Practice. Measure the round-trip latency of a small TCP echo between two processes with and without TCP_NODELAY, sending messages in quick pairs, and explain the difference.
Measuring Latency Core
Averages hide the problems that matter in trading. Report latency as a distribution: median, 99th, 99.9th percentile and maximum, using histograms recorded without slowing the hot path. A system with a low median and occasional long stalls can lose money exactly when markets are busiest.
Measure with the right clock: the CPU timestamp counter for short intervals inside a process, and hardware timestamps from the network card for wire-to-wire latency, the time from a market data packet arriving to the resulting order leaving. Synchronise clocks across machines with PTP when comparing their timestamps.
Practice. Instrument a small event loop with timestamp counters, record a histogram of a million iterations, and report the 50th, 99th and 99.9th percentiles.
Data Structures for Trading Core
The order book is the central data structure. Price levels can be stored in a sorted array or a fixed array indexed by price ticks around the current price, which gives constant-time access; individual orders live in a pool, found through a hash map keyed by order ID, and linked in time order within each level.
Other daily structures: ring buffers for queues and rolling windows, heaps for timers and scheduled events, and hash maps with open addressing for symbol lookups. Interviewers ask you to implement these and to explain both big-O cost and cache behaviour, because a tree with good complexity can be slower than a scanned array for small sizes.
Rolling statistics, such as a moving average or variance updated in constant time per tick, are a classic question. The Data Structures and Algorithms Roadmap covers the fundamentals in depth.
Practice. Implement a rolling mean and variance over the last N ticks with constant time per update and test it against a direct calculation.
Pre-Trade Risk Checks and Kill Switches Core
Every order must pass pre-trade risk checks before it reaches a venue: maximum order size and value, price collars that reject prices far from the market, position and exposure limits, order rate limits and checks for duplicate orders. These checks sit in the order path, so they must be fast, but correctness comes first.
Add kill switches that cancel all orders and stop a strategy when P&L, position or message rates cross thresholds, and a manual control that operators can trigger at once. Test the kill path regularly, since a control that has never been exercised may not work when needed.
Software errors in trading have caused very large losses within minutes. Treat risk code with the care of safety-critical software: simple, reviewed, tested and independent of strategy code.
Practice. Add order size, price collar, position and rate checks to your order gateway, then write tests that each limit rejects the right orders.
Testing, Simulation and Deployment Core
Trading code needs layers of testing: unit tests for parsers, books and risk checks; replay tests that feed recorded market data and compare outputs with a known-good run; simulation against an exchange simulator that models acknowledgements, fills and rejects; and conformance testing against each venue's test environment.
Deploy carefully. Release outside market hours, roll out to one strategy or a small size first, keep the previous version ready to restore, and watch rejects, fills and P&L closely after the change. Configuration changes, such as limits and symbol lists, deserve the same review as code.
Practice. Build a replay test that runs a day of recorded data through your strategy and fails if any order differs from the stored reference output.
Stage 9 Interview preparation and career
Goal. Know which role you are aiming for, present your work convincingly and handle each round of a trading interview.
Quant Developer, Researcher and Trader Roles Core
The field has three overlapping roles. A quant researcher finds and validates signals; interviews stress statistics, probability and research judgement. A quant developer or trading engineer builds research platforms, backtesters and production systems; interviews stress coding, C++ or Python depth and system design, plus some probability. A quant trader manages strategies and risk in real time; interviews stress fast mental maths, betting games and decision-making.
Low-latency developers form a specialist group whose interviews go deep into C++, Linux and networking. Execution developers sit closer to brokers and clients and are asked more about algorithms such as VWAP and about FIX.
Practice. Write one paragraph on which role suits you and list the three interview areas you will spend most time on.
Presenting Projects and Research Core
Interviewers will dig into your projects until they find the edge of your understanding. Prepare two or three stories in depth: the problem, the data, the design choices, the numbers and what went wrong. For research, describe the hypothesis, the tests, the biases you guarded against and the result after costs. For systems, describe the latency budget, how you measured it and the hardest bug.
Honesty scores well. Saying a strategy did not survive costs, and explaining why, shows more skill than claiming a Sharpe of five. Never overstate results; interviewers will ask how you avoided look-ahead bias and will notice if you did not.
Practice. Write a one-page summary of your best project with the numbers and three likely follow-up questions with answers.
Conduct, Compliance and Market Rules Recommended
Trading is regulated, and developers share responsibility for the systems that send orders. Know the basic ideas: market abuse rules forbid manipulating prices, for example by placing orders you intend to cancel to mislead others, which is called spoofing; firms must keep accurate records of orders and communications; and automated trading usually requires controls such as pre-trade limits, testing and the ability to stop trading quickly.
You do not need to be a lawyer, but you should recognise when a design or strategy could look abusive and ask compliance before building it. Firms also have rules on personal trading and confidential information.
Practice. List the controls you would expect around an automated strategy before it trades live, and explain which risk each one addresses.
Projects to build
Build these in order. Each one should end up in a public repository with a short README that explains your decisions.
- Cross-sectional signal research studyIntermediate
Build a point-in-time daily equity universe, compute momentum and short-term reversal signals, neutralise them against sector and beta, and measure rank IC, decay and turnover. Combine them, then write a research note that reports results after costs, the number of variants tried and the reasons the idea might fail.
pandas · Information coefficient · Factor neutralisation · Research writing
- Event-driven backtester with cost modelIntermediate
Create an event-driven backtester with data, strategy, broker and portfolio components, a spread and square-root impact cost model, and walk-forward evaluation. Include tests that prove there is no look-ahead: truncating future data must not change past positions. Report gross and net metrics and a capacity estimate.
Backtesting · Look-ahead bias · Transaction costs · Walk-forward testing
- Matching engine and execution simulatorAdvanced
Implement a price-time priority matching engine in C++ with add, cancel, modify, IOC and partial fills, driven by a FIX-style order interface. On top of it, run TWAP, VWAP and POV algorithms against replayed order flow and measure implementation shortfall for each.
Order book · Matching · FIX · Execution algorithms
- Low-latency feed-to-order pipelineAdvanced
Build a C++ pipeline on Linux: a binary feed decoder with gap detection, a book builder, a simple strategy, pre-trade risk checks and an order gateway, connected by SPSC ring buffers on pinned cores. Record wire-to-order latency histograms, explain each optimisation with before-and-after percentiles, and add a deterministic replay test.
C++ · Lock-free queues · Linux tuning · Latency measurement · Risk checks
Preparation plan
- Weeks 1–2Probability, mental maths and market basics
Solve five probability or expected value problems a day and time yourself on mental arithmetic drills.
Learn order types, the limit order book and how P&L and returns are computed, and explain them aloud.
Refresh the Data Structures and Algorithms Roadmap basics: arrays, hash maps, heaps and queues.
- Weeks 3–4Statistics and the research toolkit
Revise regression, hypothesis testing, correlation and the multiple testing problem with small numpy experiments.
Work through the Python for Data Analysis Roadmap roadmap topics on time series: resampling, rolling windows, joins on time.
Download free daily price data, compute returns properly and build a simple momentum signal.
- Weeks 5–6Alpha research and backtesting
Build an event-driven backtester with a cost model and measure the momentum signal's information coefficient, turnover and Sharpe after costs.
Deliberately introduce look-ahead and survivorship errors and show how they inflate results.
Write a two-page research note with a clear conclusion, including what would make you abandon the idea.
- Weeks 7–8Microstructure, execution and FIX
Implement a price-time priority matching engine with add, cancel and modify, plus unit tests for partial fills.
Write TWAP and VWAP schedulers and measure implementation shortfall against the arrival price in your simulator.
Parse a set of FIX messages and track order state through new, partially filled, filled and cancelled.
- Weeks 9–10Low-latency C++ and Linux
Revise the Modern C++ Roadmap roadmap on move semantics, templates and memory; build an SPSC ring buffer and benchmark it.
Measure latency with percentiles, try CPU pinning and see the effect of false sharing on your benchmark.
Use the Linux Roadmap roadmap to practise perf, strace and network tools on your own programs.
- Weeks 11–12Mock interviews and polish
Run timed mocks: one coding, one probability, one research case and one system design each week, using study plan to schedule them.
Rehearse your project stories and the questions on this page out loud, and track weak areas in progress page.
Read your own research note and code as an interviewer would, and fix anything you could not defend.
Interview questions
Try to answer each question out loud before you open the answer.
You roll a fair die and can either take the value in pounds or roll again and take the second value. What is this game worth, and what if you had two rerolls?Junior
With one reroll left, the second roll is worth 3.5, so keep 4, 5 or 6 and reroll 1, 2 or 3. The value is half times 5, the average of 4, 5 and 6, plus half times 3.5, which is 4.25. With two rerolls, the game after the first roll is worth 4.25, so keep only 5 or 6: one third times 5.5 plus two thirds times 4.25 gives 4.67. The method, working backwards from the last decision, is what the interviewer wants to see.
Explain how a limit order book and price-time priority work.Junior
The book holds resting buy orders at bid prices and sell orders at ask prices. An incoming order that crosses the spread trades against the best opposite price first, and within a price level the earliest order fills first. Unfilled limit quantity rests in the book at the back of its price level. Cancels remove orders, and amending price or increasing size usually loses queue priority. This makes queue position valuable for passive strategies.
What is look-ahead bias? Give three ways it can enter a backtest.Junior
It is using information in the simulation before it was available in reality. Examples: trading at today's close on a signal computed from today's close; normalising data with full-sample statistics; and using fundamentals stamped with the period end rather than the publication date, or restated values. Prevent it by lagging inputs explicitly, using only rolling or expanding windows, storing publication times, and testing that truncating future data does not change past decisions.
What is the information coefficient, and how does it relate to the information ratio?Mid
The IC is the correlation between a signal and the subsequent returns, usually a rank correlation computed across assets each period. Small values such as 0.03 can be useful. The fundamental law approximates the information ratio as IC times the square root of breadth, the number of independent bets per year. So a weak signal applied to many assets frequently can beat a strong signal on a few. Breadth is overstated when bets are correlated, so the law is a guide, not a formula to trust exactly.
A researcher shows you a strategy with a Sharpe ratio of 4 on daily equity data. What do you check?Mid
First, look-ahead: signal timing, normalisation and data publication times. Second, the universe: is it point in time, with delisted stocks? Third, costs: are spread, impact, borrow and fees included, and what is the turnover? Fourth, the number of variants tried and whether the parameters sit on a plateau. Fifth, stability across years and sub-universes and whether returns come from a few days. Finally, ask what economic reason explains the edge.
How would you model transaction costs in a backtest?Mid
In layers: explicit fees and commissions; half the spread for each aggressive trade; and market impact that grows roughly with the square root of trade size relative to daily volume, scaled by volatility. For passive orders, model fill probability and adverse selection. Add borrow costs for shorts. Report results gross and net, test sensitivity to doubling costs, and calibrate the model against live fills when available.
Implement a single-producer single-consumer queue. What makes it safe without a lock?Senior
Use a fixed power-of-two array with a tail index written only by the producer and a head index written only by the consumer. The producer writes the slot, then stores the new tail with release ordering; the consumer loads the tail with acquire ordering, so it sees the data written before the index. Each index has one writer, so no compare-and-swap is needed. Align the indices to separate cache lines to avoid false sharing, and cache the other side's index locally to reduce cross-core traffic.
Your trading engine has a good median latency but bad 99.9th percentile latency. How do you investigate?Senior
Record histograms and correlate slow events with timestamps from each stage to find where time goes. Typical causes are heap allocation, page faults, system calls or logging on the hot path, the thread being descheduled or sharing a core with interrupts, cache misses after idle periods, and lock contention. Check pinning, isolated cores, power states and huge pages, pre-touch memory, and move logging off the hot path. Change one thing at a time and compare percentiles, not averages.
Design a market data feed handler for an exchange multicast feed.Senior
Receive both A and B multicast feeds, arbitrate by sequence number and take the first copy. Decode binary messages without allocation and apply them to per-symbol books. Detect gaps; if a gap is not filled by the other feed quickly, request retransmission or recover from a snapshot, marking the affected books stale until recovered. Publish updates to strategies through shared-memory queues. Record raw packets for replay and timestamp at the network card and after decoding to measure latency.
What pre-trade risk checks would you put in an order gateway?Mid
Maximum order quantity and notional value, price collars against a reference price, position and exposure limits per symbol and in total, order and message rate limits, duplicate order detection, and checks that the symbol is enabled and the market is open. Add a kill switch that cancels all orders and blocks new ones, triggered automatically by loss or position limits and manually by operators. Keep the checks simple, fast, independent of strategy code and well tested.
A coin wins 60 percent of the time at even money. How much of your bankroll should you bet each time?Mid
The Kelly fraction for an even-money bet is p minus q, so 0.6 minus 0.4 is 20 percent of the bankroll each time. It maximises long-run growth of wealth. In practice estimates of the edge are uncertain and full Kelly brings deep drawdowns, so traders often bet half Kelly or less, which gives up a little growth for much lower volatility. Betting around twice Kelly or more gives roughly zero or negative long-run growth.
Make me a market on the sum of three dice.Junior
The expected sum is 10.5, so quote around it, for example 10 bid at 11 offered, explaining that the spread covers your uncertainty and risk. If the interviewer buys repeatedly, consider whether they know something and move the quotes up. If they reveal one die, update the expected value: a 6 shown makes the sum 6 plus 7, so 13. The test is clear reasoning, sensible width and updating on information.
Tell me about a time a result you produced turned out to be wrong.Mid
A strong answer is specific. Describe the result, how you found the error, for example a reconciliation that did not match or a colleague who questioned an unusually good backtest, and what the cause was. Explain what you did at once: told the people relying on it, corrected the numbers and checked related work. Finish with the lasting change, such as a new test or review step. Interviewers want ownership and honesty, not perfection.
A strategy is losing money in live trading but looked fine in the backtest. Walk me through what you do.Senior
First check safety: is the loss within limits, or should the strategy be paused? Then compare live and simulated behaviour on the same data: are the signals the same, are orders being sent as expected, and how do fill rates, prices and costs differ? Common causes are data differences, latency, adverse selection on passive fills, underestimated impact or a regime change. Report findings to the trader with evidence and a recommendation, and improve the simulator so it would have shown the gap.
How would you explain to a trader why you are pushing back on releasing a change before the market opens?Mid
Be direct and concrete: state the risk, for example the change touches the order path and the replay test has not run on yesterday's data, and the possible cost. Offer options: release a reduced version, release behind a switch at small size, or release after the tests at a set time. Ask what the trader loses by waiting. The goal is a shared decision based on facts, not a refusal, and the trader should understand you are protecting the desk.
Common mistakes
Trusting a backtest with an extraordinary Sharpe ratio; treat it as a bug until you have checked timing, universe and costs.
Using today's index members or a survivor-only dataset; build a point-in-time universe including delisted assets.
Ignoring the number of variants tried; log every test and raise the significance bar to match.
Leaving transaction costs until the end; include spread and impact from the first backtest so you do not chase untradable signals.
Judging latency by averages; record percentiles and the maximum, because the rare slow event is what costs money.
Allocating memory, logging or taking locks on the hot path; preallocate, log asynchronously and pass messages through lock-free queues.
Treating risk checks and order state as minor details; model orders as an explicit state machine and test every limit and race.
Practising probability puzzles silently; interviewers grade your spoken reasoning, so practise explaining each step aloud.
Ready-for-interview checklist
I can explain the limit order book, order types, time in force and price-time priority without notes.
I can solve dice, coin and card expected value problems by setting up states, and explain my reasoning aloud.
I can multiply two-digit numbers and convert common fractions to decimals quickly without a calculator.
I can compute a signal's information coefficient, decay, turnover and Sharpe after costs in pandas.
I can name and prevent look-ahead bias, survivorship bias and data snooping in a backtest.
I can explain walk-forward validation, purging and why random k-fold fails on time series.
I can implement TWAP and VWAP and define implementation shortfall.
I can read a FIX new order and execution report and track the order's state.
I can write an SPSC ring buffer in C++ and explain the memory ordering it needs.
I can explain caches, false sharing, CPU pinning and kernel bypass, and measure latency as percentiles.
I can list the pre-trade risk checks and kill switches a trading system needs.
I have two projects I can discuss in depth, with numbers, failures and lessons.
Where this role leads
Quant researcher or portfolio manager: move from building tools to owning signals and, eventually, a risk budget.
Software Architect: design trading platforms, market data infrastructure and research systems across desks.
Data Scientist or Machine Learning Engineer: apply statistical and modelling skills in other industries with noisy data.
Head of trading technology or engineering lead: run the teams that build and operate the trading stack. See Engineering Manager.
Related roadmaps
- Python RoadmapSyntax to packaging: data model, typing, async, testing.
- Modern C++ RoadmapModern C++, RAII, templates, STL, memory and performance.
- Python for Data Analysis RoadmapNumPy, pandas, cleaning, visualisation and notebooks.
- Data Structures and Algorithms RoadmapFrom arrays to graphs and DP, organised by interview pattern.
- Linux RoadmapFilesystem, processes, permissions, networking and troubleshooting.
- System Design RoadmapScalability, caching, queues, consistency and the classic designs.
FAQ
Do I need a PhD or a finance degree to become an algo trading developer?
No. Developer roles mostly hire on programming, algorithms, probability and system skills, and many people come from computer science, engineering, physics or maths degrees. Research roles at some firms favour postgraduate study in a quantitative subject, but strong evidence of research skill, such as a careful project write-up, also counts. Finance knowledge can be learned on the job; probability and coding cannot be faked in the interview.
Should I learn Python or C++ first for algorithmic trading?
Learn Python first if you lean towards research, because data work and signal testing are faster in it. Learn C++ first if you want low-latency or execution systems, because those interviews go deep into the language. Most roles want working knowledge of both: Python for analysis and tooling, C++ for production code where speed matters.
How long does it take to prepare for a quant developer interview?
If you already code well and know basic statistics, about 10–12 weeks of steady practice on probability, mental maths, algorithms and the domain topics on this page is typical. Starting from basic programming, plan on 6–9 months to build the maths, the research workflow and the systems skills first.
Can I practise algorithmic trading without risking money?
Yes. Use historical data for research and backtests, an exchange simulator for execution logic, and paper trading with live data and simulated orders. These cover nearly everything interviewers ask about. This page does not give investment advice, and if you ever trade real money, treat it as a separate decision about your own finances.
What maths do trading interviews actually test?
Probability and expected value most of all, then conditional probability, combinatorics, basic statistics and regression, and fast mental arithmetic. Research roles add linear algebra, hypothesis testing and time series. Stochastic calculus mainly appears in derivatives pricing roles rather than general algo trading developer interviews.