Aperiodic
DataFactors
Catalog
Pricing
Get Started
More notebooksFunding-aware perpetual backtestsBacktesting with realistic microstructure costTiming execution around liquidityDerivativesFlowL1 PriceMost Predictive
Runnable research notebook

Alpha Discovery Walkthrough

Follow the full path from raw order flow to a ranked, backtestable alpha signal — every step in real, runnable code.

Below are pre-executed results. Run it yourself free on preview data — no subscription — or use the CLI with DEMO-KEY.

Loading notebook…
Keep exploring

Other notebooks

More runnable research notebooks built on Aperiodic metrics. View the pre-executed results, then run them yourself on preview data.

Funding-aware perpetual backtests

Improve your backtest

A perpetual-futures position does not only earn the price move — it also pays or receives funding at discrete settlement prints. A price-only backtest ignores those cash flows and can misattribute carry to trading alpha, most of all for a persistently long strategy in a rising, positive-funding market. This notebook isolates realised funding and shows exactly where it binds: it is a first-order cost for a directional (long-biased) position and nets out for a direction-neutral one.

View notebook

Backtesting with realistic microstructure cost

Improve your backtest

A price-only backtest quietly assumes you can trade at the mid-price for free. Real fills pay the half-spread, move the book, and miss when liquidity thins out. This notebook builds a microstructure transaction-cost model — half-spread plus market impact — from Aperiodic's L1 price, impact, and slippage metrics, checks it against measured slippage, and shows how different cost assumptions reshape the same simple momentum backtest.

View notebook

Timing execution around liquidity

Execute smarter

Execution cost is not constant through the day. Spreads widen, depth thins, and order flow turns adverse together around stressed periods. For a moderate-frequency order, when you execute can matter more than shaving microseconds off the route. This notebook measures when liquidity is deep, spreads are narrow, and flow is least toxic, then ranks the hours by modelled execution cost and cross-checks that ranking against measured slippage.

View notebook

Intro to Aperiodic Derivatives Metrics

This notebook introduces a simple derivatives regime dashboard using Aperiodic's `funding`, `open_interest`, and `basis` metrics for Binance BTC perpetuals over September 1, 2025 → February 28, 2026 at 5-minute frequency.

View notebook

Intro to Aperiodic Flow Metrics

Find new alpha

This notebook introduces order-flow analytics with the `aperiodic` Python package. We focus on a single large-cap instrument — Binance BTC perpetuals (`perpetual-BTC-USDT:USDT`) — over the exact six-month window from September 1, 2025 through February 28, 2026, using 1-hour observations.

View notebook

Intro to Aperiodic L1 Price Metrics

Execute smarter

This notebook explores top-of-book (L1) pricing with Aperiodic's `l1_price` metric for Binance BTC perpetuals from September 1, 2025 through February 28, 2026 at 5-minute granularity.

View notebook

Predicting Short-Term Crypto Returns with Market Microstructure

Find new alpha
View notebook
111111111111 _111000_ 100_ _0011_ 11 _0011_ 0 011 _011 _0 0011_ _00 _ _000011 00000111111 ____0000000 ..+ .+cb+. .+ac+ c. .ac. .ac. +b +abc+. bcc++. +aabbbcccc+ ...........111111111110 __111000_ 00_ _0011_ 1 0011_ _0 11_ 001_ 00 _0011 000 _ __000011 0000111111_ 00000000000 ..+ccb +ca+. .+ +ac+ . . .+b+ +b+ +b .+abc+. bc++. aabbccc++++ 000000000000 111000_ _1 0_ _0011_ _ _ _011_ _00 1_ _011 _01 _0011 000 _ _0000111 001111111__ 00000000000 ...++ccbaa+ ba+ .+c +ab+. + +bc. .ac+ .ab .+abc+. c++.. bbccc+++... 000000000___ 0000_ _111 _ _0011_ _0 _0011 _001 1 001_ 001 _0011 000 _ _0000111 0111111___ 00000001111 cccbbaa+.. +. .+ba +ab+. +a .ac. . .ac. .ac .+abc+. c+.. bcc+++... 0_____ 00_ _11100 _0011_ _00 _0011 0011 _ _011 _001 _0011 000 _ _0000111 011111__ 00011111111 baa++.. .+cba. ab+. +ac .ab+ + +b+. .ac .+abc+. c+. cc++... ___11 _111000_ 00011_ _001 0011 0011_ _001_ 0011 _0011 000 _ _0001111 11111__ 11111111111 +.. .+ba+.. c+. +ac+ .+b+. .a .+b+ +ac .+abc+. ++. c++.. ..____11111111 _1111000_ 0111 _0011 011 0011_ 0011 _001_ _0011 000 _ _0001111 11111_ _ 11111111___ . .+cba..+a +. +ac+ +bc. .+b .ac. +bc .+abc+. +.. ++.. .....++++111111110000 110000_ _1 11_ 00011_ 11 0011_ _ _011_ _011_ 0011_ 000 _ _0001111 1111__ __ 11111____ ..+cc .+cba+.+abc +ac+ +ac. +bc +bc. .+bc +abc+. +.. ... .++++aaaabb11100000000_ 000__ _111 1 _00111 1 0011_ _0 0011 _0011 0011_ 000 _ _0001111 111__ __ 111__ ..+ccbaa cba+..+bc+. .+ac+ ac+ .ac+ .+b+. .ab+ .abc+. +. .. +aaabbbbccc0000000__ 0_ __11100 00011_ _0 0011_ _00 011_ _011_ 0011_ 000 _ _0001111 111__ __0 1__ __ .++cbba++. a+..+ab+. .+bc. b+ .ab+ .ac+ .ab+ .abc+. +. . abbbccc+++.00___ __1 _1110000_ _00111 _00 0011_ _001 011 _0011 0011_ 000 _ _0001111 111_ __00 _ ___00 cbba++. ..+ab+. .ab+. . +. .+bc. +bc. .ab+ .+bc+. +. ccc+++.. _ __11111 1111000_ _ 0111_ _0001 0011_ _0011 11_ 0011_ _ _00111 _00 _ _0000111 11__ __00 __00000 a+.. abc+. +ac+. .a . +ac. ab+. +ac+ .+ab+. +. . +++.. 00__ _111 0111_ _000 00011_ _0 _0011 001 011_ _0011_ 11_ _00011 _ _000011 00111111__ 111111___ ..++ccbaa++. +cbaa+..+ab bc+. .a +. .ab+. .+bc. + .abc. .+abc .+aabcc+.. ++aaabbcc++ _ _111100 11_ _00011 _0011_ 000 _0011_ _001 011_ _0011_ 111_ _00011 _ _000011 0011111_ 1111__ _+cbbaa++. ba+..+aabc+ +. .+bc +ab+. +ac+ .+ .abc+ .+abc .+abbc++. +aabbcc++.. __11110000_ _000111_ 0011_ _0011 0011_ _0011 011 _0011_ 111_ _00011 1_ _000011 011111_ 1__ __00baa++. ...+abc+. .+ab+. +ac+. .ab+. .a .abc+ .+abc .+abbc++. aabcc++.. 1110000_ _000111_ _ 11_ _0011_ 011_ _0011_ 11_ 00011_ 111_ _0011 1_ _000011 01111__ _ _ __00000++. +abcc+. .+abc. .+bc+ +bc. .+a .abc+. .+aab .+abbc+.. bbcc+.. 0000__ _00 00111_ 000 1 _00111 11_ _0011_ 11_ _00111_ 011_ _0001 1_ __00011 1111__ _0 __0000011. .+ bc+. .+abc. .abc. ac+ .ab .+bc+. . .+ab .+abcc+. bc++.. 0__ _00001 11_ _00011 _00011_ 0 1_ _00111 11_ _00111 011_ _0001 1_ _00011 1111_ __0 _000011111 .++cb . .+a +abc. +ab+. + b+. .+ac .+bc+. . .+ab .+abcc+. c++. _0001111 _ _000111 00011_ _00 _ _00111 _ 1_ _0011_ 0111_ 0001 11_ _00011 111__ __00 000001111_ ..+cbba+ .++abc c+. +a bc+ .+a c. .abc .+ac+. . .+ab .+abcc+. ++. _0000111_ _000111_ _ 0111 _0001 _00111 _0 1_ _00011_ 0111_ _000 11_ _00001 111_ _000 0001111_ .++cba++.. .+abc+. . +abc +. .+bc + .+ab+ .+abc. +. .+a .+abcc+. +. . 001111_ _0 00111_ _00 11 _00011_ _00111 _00 1 _00011_ 0111_ _000 11_ _00001 111_ _0000 01111_ _0.+ccba+...+a .+abc++. .+abc+. +abc+ . +abc+ .+abc+ +. .+a .+abcc+. . .+ 111_ _0000 11_ _00011 _000111_ 0011_ _000 _ _00111_ 00111_ _000 111_ _0001 11_ _0001 111__ _000ccba+..+aabc abc+. .+abc+. .+ab+. .+ac+. .+abc+ +. .+a .+abcc+. ..+a 1_ _000111 _ _000111_ _000111_ 0 011_ _0001 _ _000111_ 00111_ _00 111_ _0001 11_ _00001 11_ _00001ba+..+abcc+. +. .+ .+bc+. .+abc+. .+abc+. .+abc+ c+. .+ .+abc++. .++ab _ _0001111_ _000111_ 000111_ _0 111_ _0001 1 _000111_ _00111_ _0 0111_ _000 11_ __0001 1_ _000011 .+abc+. +. .+a +abc+. .+abc+. .+abc+. . .+ab abc+. .+abc+. +. .+a _000111_ _ 00111_ _00 111_ _0001 1_ _000111 _000111_ 000111_ _0 0111_ _000 11_ _00011 _ _000111_ .+abc+. .+abc+ c+. .+ .+abc+. .+abc+. . .+ab abc+. .+abc+. .+abc_000111_ _00 111_ _0001 1_ _000111 _ _000111_ _000111_ 0000111_ _ 00111_ _00 111_ 00011 _ _00011_ +abc+. .+abc+. . .+aa +abc+. .+abc+. +. .+a +abc+. .+abc+. .+abc+00111_ _001 1_ _00111_ __000111_ _000111_ __000111_ 0000111_ _ 00111_ _00 111_ 00011 _00011_ bc+. . .+abc+. .+abcc bbc+. .+abc+. +. .+a +abc+. .+abc+ .+ab+. 011_ _00111 _000111_ 000111_ __ 000111_ _ 0000111__ 0000111_ _ 000111_ _0 111_ _00011 _000111 _ +. +ab abc+. .+abc+.. c+. . .++abc+. +. .+ .+bc+. .+bc+. .abc+. 11_ _00011_ 000111 _00 1111_ _000 0111_ _00 0001111_ _ 0000111_ _ 000111_ _0 111_ _00011 _00111_ _0 .+abc+ +. .+a .++abc+. .. .+ .+abbc+. ++. .+ .+abc+. +abc+. .abc+. _ _00111 _ 111_ _0001 1_ _000011 11_ _0000 001111_ __ 0000111_ 000111_ _0 111_ _00011 _00011_ _00 .+abc+. .+abc abc++. .+a ..+abcc+. c+. .+ .+abc+. .+ab+. +abc+ _00011_ _00 1_ _00111_ _0001111_ _ _000011 11111_ _0 0000111__ _000111_ _ 111_ _00011 _0011_ 000 +abc+. .+abc+.. c+. .++ab .+aabc++. c+. . .+abc+. .+ac+. .abc. ._00111 _001 000111_ 0001111_ _ _000001111 111__ _00 00001111_ _000111_ _ 111_ _00011 00111 _001 .+bc+. .+abc+. . .++ ..+abbc .++abbc+.. c+.. . .+bc+. .abc+ abc. .a0011_ _00111 000111_ 00 0111_ _00 000011111_ 11__ _000 00001111_ _000111_ _ 111_ _00011 0011_ _0011 ac+. .+ abc+. ..+aab ..+aabcc+ ..+aabcc+. cc+. . .+ab+. +abc. bc+ +ab011_ _0011_ 0111 _0001 11_ _00001 001111__ __ __0000 00001111_ _000111_ _ 111_ _00111 011_ 00111 c. .+bc c+. .+ .+aabcc+ .++aabcc++. .++abbc++. bc+. .+abc. .+ac+. . c+ +ac+ 0011_ _001 _ _000111_ _ _000001 000011111__ 11111__ __ _0000111_ 000111_ _00 00011_ _0 _0011 000bc. .+ac+ .+abc+ c+.. ..+ .. .+aa .+abc+. .+ac+. ac+. +ac 111 _00111 _000111_ __00001111 0011111__ 11111_ _0 _0000111_ _00111_ _00 _0011_ 00 _0011 0011+. .abc. .+ab+. . ..+ .++aa ..+ .+aa .+abc+. .+ac+. bc. .ab+ 1_ _00111_ 00111_ _00 000011111_ 11111__ 1111__ __0 __000111_ _00111_ _00 _0011_ _00 0011_ _011_. +ab+. .+ac+. .+abb .++aabbc ..++ .++a .+abc+. .+bc+ b+. .+bc. _0011_ _0 111_ _0001 011111_ 11__ __ 111__ __0 __0001111_ _00111_ _00 _0011 001 011_ _001_ +ac+ +ac+. .+aabc++ ..+aabbcc++ ..++aa .++a .+abc+ .+bc+ c. .ac+ _0011_ 000 _ _0000111 111__ __0 _ __000 11__ __00 _0000111_ _00111_ _00 0011_ _001 01_ _0011 _ +bc. . b+. .+a ..+abcc+.. aabbcc++.. ...+++aab ..+a .+abc+. .abc. . +. .+b+. 0011_ _0011 _0001111_ __ __0000 __000000 ___ __00 _0000111_ _00111_ _00 _0011_ _001 11 _0011 _0 +bc. +a . .+abc abbc+.. bcc++.. ..+++aaabbb ..+a .+abc+. .ab+. . . +ac. 11_ _00111 000111__ _ __0000011 __000000001 _ ___00 _0000111_ _00111 _00 _0011 0011 1_ 0011 00 +bc. +bc .+abc+. cc+. ++.. +++aaabbbcc ..+a .+abc+. +ab+. + . .+b+ 1_ _0011_ _ 0111_ _00 _0000011111 00000001111 ___000 _0000111_ _00111 _00 _011_ _0011 _ _011_ 001+bc. .+b+. +abc+. .. . . aaabbbcccc+ ..+a .+abc+. +ac+ + +ac. 00111 00 11_ _00001 000111111__ 00011111111 ___0000 __000111_ _0011_ 000 0011_ _011_ _001_ _011ac. .ab+. .abc+. .++ bbbcccc++++ ..+a .+abc+. .+bc. .+ .+b+ _0011_ _001 _ _0000111 011111__ 111111111__ _____00000 __000111_ _0011_ _001 0011 0011 0011 _011_c. .ab+ +ac+. ..+aab ...+ ccc+++++... ..+a .+abc+. .abc. .a +ac. . 0011 00011 _0000111__ 111__ __ 1111____ _____0000000 __000111_ 00011_ _001 011_ _001_ _011_ 001_ . .ab+ b+. .+ .++abbcc ..+++aa ++....... ..+a .+abc+ +ab+. +a .+b+ + 011 001_ _0 000111_ _ __000011111 00011111111 _________ 000111111_ _00011_ _ 1_ _0011 _0 0011 _001_ ac. .+bc c+. . ccc++++.... abcc+. .+bc. . +. .+b+. c. +ac. 01_ 001_ _01 00111_ _00 000011111__ 1111111___ __000000000 001111111_ _00111_ _ _ 0011_ _0 001_ 0011 _ c. +ab+. . .+ .. ++.... abcc+. .ab+. . + .ac+ + .ac. 1_ 001_ _011 011_ _0001 0011111__ 1111__ 00000000000 001111111_ _00111 _ _ _0011 00 011 _001_ 0 . .+bc+ .++a ..++ . abcc+. .+ac+. + . +bc. . +b+ .

Run it yourself

Sign up free to run this notebook interactively with preview data, or use the CLI with DEMO-KEY. No subscription required.

Sign up free to run interactively
See all notebooks