Individual · Advisors · InstitutionsLog InOpen Account
繁中 / EN
Interactive Brokers
Contact

IBKR QUANT BLOG · RESEARCH

Quant blog

DATA · CODE · CAVEATS

The IBKR Quant Blog is a long-form column on models, data and code. This page turns it into a checklist: where the data comes from, how the code runs, where backtests mislead and how to read the numbers.

  • Reviewed Nov 2026
  • 8 tables
  • 8 questions
  • 10,000 paths
10,000simulated paths
24.09%95th-pct drawdown
30.3%down-year chance
0.48%annual cost

01

What the blog covers

Three article types, three readings.

Posts rarely hand over a conclusion. They offer a path: an observation, a testable hypothesis and a script you can rerun. Topics cluster around factors, volatility, execution cost and code.

Table 1: Types
TypeDataCodeTake away
Method notePanel dataShort snippetsTest design
Code tutorialAPI fieldsFull scriptA rerunnable pipeline
Market noteEvent samplesPlot scriptTail risk

02

Five questions to ask of data

Change the adjustment and the backtest doubles.

The same prices, adjusted differently or drawn from another universe, produce a different curve. None of this needs statistics; the author has to say so.

Table 2: Checks
CheckSymptomEffect
Sample periodOnly bull yearsReturn overstated
SurvivorshipOnly listed namesSmall caps flattered
AdjustmentsSplits ignoredFalse breakouts
Time alignmentAsia and US offsetLook-ahead leaks
Missing valuesDropped or zero-filledSample distorts

Missing disclosure is usually not an oversight.

03

Code and environment

Reproducibility is a threshold, not a virtue.

When one script gives different numbers elsewhere, the strategy rarely changed; the package version, random seed or data snapshot did.

Table 3: Checklist
ItemMinimumVerify
Data snapshotVendor and cutoffRe-download same day
Code versionPinned dependenciesClean environment
Random seedStored with outputReruns match exactly
Cost modelCommission, slippage, borrowEach item listed
OutputsMetrics and charts apartCompare by column
simulate.py
seed = 20261121
paths = 10000
S0, mu, sigma, cost = 100000, 0.08, 0.15, 0.0048
for path in range(paths):
    equity = peak = S0
    mdd = 0.0
    for day in range(252):
        r = (mu - cost) / 252 + sigma / sqrt(252) * randn()
        equity *= exp(r)
        peak = max(peak, equity)
        mdd = max(mdd, 1 - equity / peak)
    record(equity, mdd)
Seed, drift, cost and drawdown: none optional.

The loop keeps seed, drift, cost and drawdown on purpose; drop one and readers trust a screenshot.

04

Five backtest traps

A smooth curve is not a small risk.

Backtest errors come from the process, not the maths. Miss one and discount the conclusion.

Table 4: Traps
TrapWhy it worksCheck
Look-aheadUses post-close dataDelay the signal a day
OverfittingTuned in-samplePerturb for stability
Understated costSlippage and borrow ignoredRecompute conservatively
Out-of-sample failureOne period onlyRolling walk-forward
Multiple testingBest of many trialsDeflated Sharpe ratio

Run two hundred parameter sets and the best looks good by construction.

05

Factor models

Split return into exposure and residual.

One market factor explains most variance; add size, value, momentum, quality and low volatility, and the residual looks like the strategy itself.

Table 5: Factors
FactorDefinitionMistake
MarketExcess return over cashWrong benchmark
SizeSpread across market capMicrocap liquidity
ValueBook-to-marketReport dates misaligned
MomentumTrailing 12 monthsLatest month not skipped
QualityProfitability and leverageNo industry neutralization
Low volatilityVolatility-sortedNo leverage adjustment

A higher R-squared is not better. If factors explain too much, the residual is cost plus luck.

Exposures drift; one regression is a snapshot.

06

Worked example: 10,000 simulations, 5% tail, drawdown

Write the assumptions down or the numbers mean nothing.

Start with $100,000, 8% expected return, 15% volatility, 252 trading days and 0.48% annual cost. Simulate 10,000 paths with seed 20261121.

This is a distribution, not a forecast: median equity $108,057, 5th percentile $84,203, median max drawdown 12.63%, 95th percentile 24.09%.

Table 6: Percentiles
Metric5th25th50th75th95th
Terminal equity (USD)84,20397,714108,057119,379137,652
Max drawdown6.97%9.75%12.63%16.62%24.09%

The worst 5% is 500 paths: average max drawdown 27.56%, deepest 39.06%, median equity $80,624. One path in twenty is no rounding error.

A down year happens 30.3% of the time; drawdowns past 20% in 12.4% of paths; a 0.48% cost trims median equity by about $500.

Rerun at 25% volatility and the median drawdown deepens sharply.

07

Who it is for

Patience required; olympiad maths not.

Table 7: Readers
ReaderStart hereWhat you get
Retail investor with PythonCode, trapsBacktests stop feeling like promises
Financial adviserFactors, costsA clearer story on diversification
New quant researcherData checks, checklistA pipeline that reruns
IBKR API userCode tutorialsField alignment, cost estimates

You do not need C++ or a large account, only acceptance that most attractive results vanish on another sample.

If you want buy and sell calls, this page will not give them.

08

Eight questions

The questions that arrive most often.

01Is the quant blog suitable for a beginner?

Method posts are readable; code posts expect Python. Start with sections 02 and 04.

02Can I trade a strategy straight from a post?

Reproduce it, add costs, test out of sample, then size it.

03Why is a backtest great and live trading poor?

Usually understated costs, slippage, look-ahead bias or out-of-sample failure.

04Do I need an IBKR account to read it?

No. Posts are public and examples use public data.

05Are 10,000 simulations enough?

For medians yes; thin for the 1% tail. Raise paths to 100,000.

06Do I have to build a factor model?

Not strictly, but it separates market exposure from the strategy.

07What language are the examples in?

Mostly Python, with some TWS API examples.

08How often is the blog updated?

Methods age slowly; data and cost sections are reviewed yearly, latest 2026.

09

Sources and review dates

Re-checked in November 2026. Names and dates only; no links.

Table 8: Source log
SourceTypeSectionsReviewed
IBKR Quant BlogArticles01, 062026-11-18
IBKR Campus pagesTeaching072026-11-18
IBKR TWS API docsDocs032026-11-19
TWS user manualManual032026-11-19
Deflated Sharpe Ratio (Bailey, Lopez de Prado, 2014)Paper042026-11-20
Time Series Momentum (Moskowitz et al., 2012)Paper052026-11-20
Three-factor model (Fama and French, 1993)Paper052026-11-20
Backtest overfitting (Bailey et al., 2016)Paper04, 062026-11-21

A methods summary, not investment advice. All figures are simulated.