Day 148 — The spread you cross, measured across the liquidity range
Friday, 1 January 2027 · Week 22 of 52 · The research harness · Study day · 60 min
A flat cost assumption in basis points is wrong by an order of magnitude across your universe, and last night’s ten numbers show you in which direction.
What you should be able to do tonight
- Report the quoted spread in basis points as a function of market capitalisation or dollar volume for your universe.
- Say what fraction of the quoted spread you would actually pay on a small passive order, and why it is less than half.
Tasks 60 min
30 min Fit the relationship rather than tabulating it: regress log spread on log dollar volume across your universe and report the slope. That single coefficient lets you assign a spread estimate to any name in your universe, including ones you have no quote data for.
20 min Separate effective from quoted: the effective spread paid is typically well below the quoted spread because of price improvement and mid-point execution. Note what you cannot measure without trade data, and state the assumption your cost model will make in the meantime, with its direction of error.
10 min Add the fitted spread function to a new qlib/costs.py, taking a symbol and a date and returning an estimated half-spread in basis points.
Resources
Deliverable
qlib/costs.py with a fitted spread-versus-liquidity function, and the regression slope reported.
Checkpoint
Your spread model says 3 basis points for SPY and 45 for a small cap. What produced that ratio, and what does it do to a strategy that trades both?
Prepare for tomorrow
Ten minutes tonight so Day 149, Saturday, 2 January 2027 starts clean. This is what the evening email sends you.
Read the abstract of the Toth and co-authors paper on anomalous price impact and note the functional form they report.
Write down what exponent that implies and what a linear model would have predicted instead.
One line each.