Source: https://tesseralytics.dev/blog/the-two-hour-lag-discount

[← Blog](https://tesseralytics.dev/blog)

Research 12 November 2026

# The two-hour lag discount: building factors you can actually trade

What a factor is, how to build one from Tessera’s order-flow tiles, and why the two hours between a bar closing and you acting on it decides which factors are worth anything. Measured over 13 months: state factors keep 99% of their edge, order-flow factors keep 7%.

Every backtest starts with the same small lie. Price a signal on the bar for hour H, enter at that bar's close, and the position is filled the instant the hour ends. Nobody could have done that: a bar's close *is* its last trade, so the number does not exist until the bar is over, and by the time you can read it the clock has moved on. You enter later, at a price the backtest never charged you.

That gap cannot be tuned away, and it is not the same cost for every signal. It sorts signals by something you can predict in advance: **what the number is actually about**. Measured over thirteen months of Hyperliquid data, a signal that describes where the market *stands* keeps **99%** of its edge at a two-hour entry. A signal that describes what happened *inside* the last hour keeps **7%**.

This post builds a few factors from scratch, explains why the delay is two hours rather than zero, and then measures what survives it. You can rerun the whole thing on a free key in about ten minutes.

## First, what a factor is

A factor is a column of numbers that ranks the market. Its output is a *ranking*, not a price forecast. At 15:00, which coins have the most open interest? Which have the most funding being paid? Which just moved the most? Each of those questions is a factor: a value per coin per hour.

To find out whether a ranking is worth anything, you line it up against what happened next. Take every coin at 15:00, rank them by your factor, then rank them by their return over the next 24 hours, and correlate the two rankings. That number is the factor's **information coefficient** (IC), a cross-sectional rank correlation. An IC of zero means the factor told you nothing about which coins would outperform. An IC of 0.05 is a large number in this game: the strongest factors in the tables below peak around 0.05. What makes it usable is that it holds up across the sample rather than in one stretch of it.

On our data, ranking coins by the log of open interest scores an IC of `−0.0485` over a 24-hour horizon: negative, so the bigger markets tend to underperform the smaller ones on a relative basis. That sign is the point. An IC is a measurement, not a promise, and a factor with the "wrong" sign is information too.

## Why the delay is two hours

Three things happen between "hour H ends" and "you can act on hour H", and each of them costs time no matter how fast anything is built:

-   **The bar has to end before its close exists.** The close of the 16:00 bar is a trade that happened at 16:59:59. A file written at 16:59:59 cannot contain it. This is arithmetic, not engineering.
-   **The venue's own aggregates land after the boundary too.** Funding and open interest are not traded prices; they are snapshots the exchange takes at the hour boundary. The reading for hour H is only published once H is over.
-   **Then it has to become a row.** Minute bars and snapshots have to be ingested, reshaped to the hour, joined, checked and written somewhere you can read. That is a pipeline cycle, and it is the part that can be made fast, but not free.

Put together, the sequence for hour H reads: the hour ends, the venue's closing observation lands a fraction of a second later, the bar becomes readable from the API inside the following hour, and the first *hour-aligned* entry after that is the close of `H+2`. You can act sooner than that by entering at any moment after the data is readable (the close of H+1 is the earliest), which is why the tables below bracket the real world at `L = 1` and `L = 2`. What is not available to anyone is `L = 0`.

## Building one from the tiles

Three datasets carry what you need, all keyed on coin and hour. `gold_ohlcv_1m` is one-minute bars with the order flow split out: buy and sell volume, cumulative volume delta, aggressor delta, and realised PnL by side. `gold_funding_1h` is hourly funding with a running cumulative total. `gold_positioning_1h` is open interest plus what the account base is doing with it: long/short balance, concentration among the largest accounts, whale net position, and new/closed/flipped counts.

Most factors are one line on top of that. Resample the minute bars to the hour, and the three families fall straight out:

```
hourly = (
    minutes.sort("coin", "time")
    .group_by_dynamic("time", every="1h", closed="left", label="left", group_by="coin")
    .agg(
        close=pl.col("close").last(),                      # end-of-hour price
        volume=pl.col("volume").sum(),
        vwap=pl.col("vwap").last(),
        buy_vol=pl.col("buy_vol").sum(),
        sell_vol=pl.col("sell_vol").sum(),
        # notional, not base units: the only cross-coin comparable size
        usd_volume=(pl.col("volume") * pl.col("vwap")).sum(),
    )
    .with_columns(
        # state: how big is this market
        log_volume=(pl.col("usd_volume").clip(lower_bound=0) + 1.0).log(),
        # flow: where did this hour's close sit inside its own tape
        close_vwap_dev=pl.col("close") / pl.col("vwap") - 1.0,
        buysell_imbalance=(pl.col("buy_vol") - pl.col("sell_vol"))
        / (pl.col("buy_vol") + pl.col("sell_vol")),
        # momentum: the price path
        mom_1h=pl.col("close") / pl.col("close").shift(1).over("coin") - 1.0,
    )
)

# Open interest is not on the minute bars: it is the positioning tile's snapshot
# for the same hour, joined on (coin, hour).
pos = (
    positioning.sort("coin", "time")
    .with_columns(hour=pl.col("time").dt.truncate("1h"))
    .select(
        "coin",
        "hour",
        log_open_interest=(pl.col("open_interest").clip(lower_bound=0) + 1.0).log(),
    )
)
```

Those three lean on different things, and the difference is not how long the window is: all three are computed from the same hour and nothing else. **Open interest is a standing property**: it describes how big the market is, and it will still be roughly that big an hour later. **Close-versus-vwap is a transient**: it describes where the closing trade sat inside the final minute's tape. A stale reading of a standing property still ranks the cross-section. A stale reading of a transient is a memory of a move that already happened.

That distinction is the classification the rest of this post uses. The axis is *what the number is about*, not how long its window is:

| class | what the number is | examples |
| --- | --- | --- |
| State | a level or cumulative snapshot of the market's standing | `log_open_interest`, `log_volume`, `cum_funding`, `whale_long_account_share` |
| Microstructure | a quantity measured *inside* hour H, describing hour H | `close_vwap_dev`, `buysell_imbalance`, `d_cvd`, `pnl_imbalance` |
| Momentum | a price path | `mom_1h` |

Some of these names are columns the tiles publish — `cum_funding`, `funding_rate`, `whale_long_account_share` and the rest of the positioning block arrive as columns — and the others are one-line transforms built here. The MCP plane ships five factors of its own with different names. The code sample spells out five, and the rest are the same shape: `log_volume` is the log of the hour's traded notional, `cum_funding` the running total of funding paid, `funding_rate` the hour's funding rate and `d_funding_rate` its hour-on-hour change, `whale_long_account_share` the share of the largest accounts that are net long, `d_cvd` the hour's change in cumulative volume delta, and `pnl_imbalance` the balance of realised PnL between shorts and longs.

The prediction, stated before the measurement so it can be wrong, is that **a factor's retention at a two-hour entry depends on which class it belongs to.** If it does not, the delay is not a discriminator, the post has no thesis, and the finding is a negative result.

## The measurement

For every factor, forward horizon `k ∈ {1, 4, 24}h` and entry delay `L ∈ {0, 1, 2, 4, 8, 24}h`, the label is `close(H+L+k)/close(H+L) − 1`. The delay moves the *entry*, not the holding period: still a k-hour position, just opened later. Four decisions make the resulting curve mean something:

-   **Gap-guarded.** A return is null unless *every* hour from H to H+L+k is published for that coin, so a data hole can never masquerade as a short return.
-   **Identical coins at every delay.** For a given horizon, a coin-hour counts only if every delay in the sweep has a price. Otherwise the 24-hour delay is measured on a smaller, more liquid sample than the zero-delay one, and part of the "decay" is just a different cross-section.
-   **A median over factors that actually had an edge.** A retention ratio computed on a factor whose zero-delay IC is 0.0002 is noise over noise. Factors below a materiality floor are excluded from the class summary rather than quietly averaged in.
-   **One family, one bar.** The significance bar is set by the size of the search, because this is a search: a circular block bootstrap for the overlapping returns, then Benjamini–Hochberg across all 396 tests. A single factor's p-value is not the number to trust here; whether the class pattern survives is.

## What survives

Panel: 9,503 hours (2025-10-01..2026-10-31, 13 closed months), 225 coins after the liquidity floor, 1,978,253 coin-hours, 22 factors.

Share of each class's zero-delay IC that survives at a given entry delay, at the class's decision horizon (state and momentum 24h, microstructure 1h). Median across the class's factors.

The collapse across the first two hours is the whole story: by the first hour-aligned entry the flow edge is gone, and state barely notices. Delays are evenly spaced, not drawn to scale: 1h and 24h sit the same distance apart.

At the delay you actually get, two hours, **state keeps 99%, microstructure keeps 7%, momentum keeps 58%**. A factor of roughly 14 between the two ends of the split.

| class | h | |IC|@0h | |IC|@2h | @0h | @1h | @2h | @4h | @8h | @24h |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| State | 24h | 0.0160 | 0.0159 | 100% | 100% | 99% | 99% | 99% | 93% |
| Microstructure | 1h | 0.0076 | 0.0019 | 100% | 21% | 7% | 20% | 12% | −1% |
| Momentum | 24h | 0.0186 | 0.0108 | 100% | 66% | 58% | 45% | 26% | −16% |

Retention is `IC(L) / IC(0)` at the class's decision horizon, median across the class's evaluable factors (State: 10/11, Microstructure: 4/10, Momentum: 1/1). |IC| is the class mean absolute IC at that delay.

The microstructure number is not monotone (7% at two hours, back up to 20% at four), and that is what a ratio near zero looks like. The flow factors carry |t| of 0.1–0.9 at a two-hour entry, so their ratio to a 0.01 IC is noise, not a decay curve. The class statement is "the edge is gone", not "the edge is 7%".

A few individual factors, at their decision horizon:

| factor | h | IC@0h | IC@2h | IC@24h | retention@2h | t@2h |
| --- | --- | --- | --- | --- | --- | --- |
| hhi\_gross | 24 | −0.0131 | −0.0134 | −0.0148 | 102% | −2.49 |
| log\_open\_interest | 24 | −0.0506 | −0.0504 | −0.0485 | 100% | −7.01 |
| cum\_funding | 24 | 0.0440 | 0.0439 | 0.0424 | 100% | +7.39 |
| whale\_long\_account\_share | 24 | 0.0176 | 0.0173 | 0.0179 | 98% | +4.03 |
| funding\_rate | 24 | 0.0139 | 0.0134 | 0.0059 | 96% | +3.55 |
| close\_vwap\_dev | 1 | −0.0275 | −0.0001 | 0.0002 | 0% | −0.09 |
| d\_cvd | 1 | −0.0104 | −0.0009 | 0.0002 | 8% | −0.89 |
| buysell\_imbalance | 1 | −0.0096 | −0.0005 | −0.0010 | 5% | −0.61 |
| pnl\_imbalance | 1 | 0.0185 | 0.0094 | −0.0028 | 51% | +8.25 |
| mom\_1h | 24 | −0.0186 | −0.0108 | 0.0030 | 58% | −6.65 |

Gross rank ICs; signs are the measured direction (a negative IC on `log_open_interest` says the larger markets underperformed, not that the sign is an error).

## Is it the class, or the sample?

The same measurement, re-run on four disjoint sub-panels, gives the same ordering with the same magnitudes, so the contrast is not one period's accident and not an artefact of the most liquid coins. State holds at 98–100 % in both time halves and both liquidity tiers; microstructure collapses in all four (to somewhere between nothing and 17 % two hours out); momentum sits in the middle at 58–60 % everywhere.

The significance bar tightens the same way. Of the 66 (factor × horizon) tests at each delay, the number clearing the joint Benjamini–Hochberg bar is **39 at zero delay → 31 at two hours → 23 at twenty-four**. The delay does not merely shrink each IC; it removes tests from the family entirely.

## The inversion that didn't happen, and three exceptions

The flatness test was rejected decisively: 99% against 7% is a factor of 14, in both halves of the sample and in both liquidity tiers. The delay is a discriminator, and it is the mechanism of the split.

The data did not agree. I had guessed that sorting factors by zero-delay IC would sort them *backwards*: the fast factors have the biggest zero-delay IC (`mom_1h` at −0.045, `close_vwap_dev` at −0.028 for a one-hour horizon), while the state factors look unexciting (`log_open_interest` at −0.017). The ranking should invert once the delay is applied.

**It does not.** Across factors within a horizon, the rank correlation between |IC@0h| and retention@2h is ρ = −0.14 (p 0.74) at a one-hour horizon, +0.08 at four, and −0.00 (p 0.99) at twenty-four: no usable relationship in either direction. The delay does not rank factors by strength; it **partitions** them by mechanism. That is a weaker claim than the inversion would have been, and it is the one being published.

Three details worth keeping:

-   **`pnl_imbalance` is the flow exception.** 51% retention at two hours, t +8.25: the only flow factor that survives. It also saturates at ±1, so it carries last hour's *side* rather than a magnitude, which makes it a state flag wearing flow clothes. Classified by how it is computed, it is microstructure; classified by what it does, it is state, and the curve agrees with the second.
-   **Momentum depends on the horizon you ask about.** At a one-hour horizon `mom_1h` keeps 22 %; at twenty-four hours it keeps 58%, both at a two-hour entry. The one-hour reversal is gone by the time you can enter; the day-long window still contains enough of the same drift-and-revert structure to rank.
-   **State's edge is slowly shrinking, not flat.** 100 % → 93 % by a 24-hour entry, and `d_funding_rate` never had anything at all (IC 0.0002, t 0.07). "State keeps its edge" is a statement about the ten evaluable fields as a group, not about each one.

## What this does not tell you

-   **Nothing about costs.** Every number is a gross rank IC. The state class is the only one whose gross IC is large enough to survive a fee and slippage budget, and it survives because it is slow, not because it is big.
-   **One regime.** Thirteen consecutive months. Any claim that depends on the market being in a particular state is not supportable from this; every statement here is cross-sectional and within-sample.
-   **Coins that are still listed.** The universe is whatever had data, so delisted coins are absent and survivorship is not controlled for.
-   **Closed months only.** The sample ends at the last complete month. A month in progress is published as one object per coin-day, which is a different read shape and is excluded.
-   **Three columns are consecutive-row differences, not gap-guarded windows.** `mom_1h`, `d_cvd` and `d_funding_rate` are computed against the previous *row*, so on a thin coin they can span more than an hour. That is the published definition, kept as-is so this measurement and the dataset agree.

## Run it yourself

Everything above is one script, and it is public: [github.com/tesseralytics/examples](https://github.com/tesseralytics/examples). A free key covers the trailing 30 days, so you can reproduce the shape today. The thirteen-month tables need the history behind that window; the script is the same either way. `uv` resolves the environment from the repo's `pyproject.toml`; plain `pip install "tessera-api[polars]"` works too.

```
export TESSERA_API_KEY="sk_..."   # free key, no card: https://tesseralytics.dev
git clone https://github.com/tesseralytics/examples
cd examples
```

First, confirm the delay is real on your own key:

```
import datetime as dt
import tessera

client = tessera.TesseraClient()   # reads $TESSERA_API_KEY
bars = client.read(
    "gold_funding_1h",
    coin=["BTC"],
    month=tessera.MonthSpan("2026-11", "2026-11"),
    columns=["time", "coin", "funding_rate"],
)
newest = bars["time"].max()
age = dt.datetime.now(dt.timezone.utc) - newest
print(f"newest bar {newest}, {age.total_seconds() / 3600:.2f} h old")
```

Then the two guards against a fake decay. A missing hour has to be a *row* before `shift()` can notice it, otherwise the gap is silently bridged and a hole becomes a return:

```
# A calendar over the panel's whole span, crossed with the coin list. A coin that
# starts late just gets a run of null rows before its first bar.
hours = pl.datetime_range(
    panel["hour"].min(), panel["hour"].max(), interval="1h", eager=True
)
grid = pl.DataFrame({"hour": hours}).join(
    pl.DataFrame({"coin": panel["coin"].unique()}), how="cross"
)
panel = grid.join(panel, on=["coin", "hour"], how="left").sort("coin", "hour")
```

And the delay grid itself, with the gap guard built in:

```
HORIZONS = (1, 4, 24)          # forward holding period, hours
LAGS = (0, 1, 2, 4, 8, 24)     # entry delay, hours

def lag_grid(panel: pl.DataFrame) -> pl.DataFrame:
    """One forward return per (horizon, lag), gap-guarded over the whole span."""
    df = panel
    for k in HORIZONS:
        for lag in LAGS:
            span = lag + k
            # Every hour from H to H+lag+k must be present AND priced for this
            # coin, otherwise a data hole masquerades as a short return.
            window = pl.col("close").is_not_null()
            for s in range(1, span + 1):
                window = window & pl.col("close").shift(-s).is_not_null()
            df = df.with_columns(
                    pl.when(window)
                    .then(
                        pl.col("close").shift(-(lag + k)) / pl.col("close").shift(-lag) - 1.0
                    )
                    .otherwise(None)
                    .over("coin")
                    .alias(f"ret_{k}_{lag}")
                )
    return df.drop_nulls("close")
```

Then the rank IC per hour and the retention ratio. The `keep` mask holds the cross-section identical across delays, and skipping it is the easiest way to manufacture a decay that is not there:

```
def rank_ic(df: pl.DataFrame, field: str, ret: str) -> pl.DataFrame:
    """Cross-sectional Spearman IC per hour (average ranks for ties)."""
    return (
        df.filter(pl.col(field).is_not_null() & pl.col(ret).is_not_null())
        .group_by("hour")
        .agg(
            n=pl.len(),
            ic=pl.corr(pl.col(field).rank("average"), pl.col(ret).rank("average")),
        )
        .filter(pl.col("n") >= 25)          # a cross-section needs breadth
        .drop_nulls("ic")
    )

# For each field at its decision horizon, hold the coin set IDENTICAL across lags,
# then divide each lag's mean IC by the zero-lag one.
for field, class_ in CLASSES.items():
    k = DECISION_HORIZON[class_]
    keep = pl.lit(True)
    for lag in LAGS:
        keep = keep & pl.col(f"ret_{k}_{lag}").is_not_null()
    sub = panel.filter(keep)
    base = rank_ic(sub, field, f"ret_{k}_0")["ic"].mean()
    retention = {lag: rank_ic(sub, field, f"ret_{k}_{lag}")["ic"].mean() / base for lag in LAGS}
```

The script wraps all of that with the panel build, the 22 factors and the liquidity floor:

```
# One month, every listed coin, free key, ~10 minutes:
uv run python lag-discount/lag_discount.py --months 2026-10:2026-10

# The thirteen closed months behind the tables above: the same script, wider span:
uv run python lag-discount/lag_discount.py --months 2025-10:2026-10
```

It reads the coins in small batches: every coin in a batch is one presigned request, and a single call for a whole month trips the rate limit. If you see a 429, lower `CHUNK`. One month takes about ten minutes on a laptop; the thirteen-month run is roughly 7.7 GB of minute data.

Run on a single month, expect the ordering and not the digits. On 2026-10 (291 coins, 216 213 coin-hours) the same code reads state **98 %**, flow **20 %**, momentum **76 %** at a two-hour entry, against 99%, 7% and 58% here. A month is one regime and one universe; thirteen months spans more of both, which is what moves the flow class from a fifth to almost nothing. The claim that survives either window is the ordering, and the mechanism behind it.

The other two tables are the noisiest things to reproduce on a short window, and that is arithmetic rather than a caveat about the result. The family bar needs length to be readable: wider standard errors on 700 hours mean fewer tests clear any threshold, so over one month three of the 66 tests clear it at zero delay and none at two hours, where thirteen months gives `39 → 31 → 23`. And a one-month replication split leaves some halves with no factor above the materiality floor at all. Both are in the script; read them on the long window.

Score your factors at `L = 2`, not at zero. The factors that die there were never tradeable. They were memories of a move that had already happened. The ones that survive describe where the market stands, and being slow is why they still work.

[← Back to blog](https://tesseralytics.dev/blog)
