BI-Day 2026

From Pixels
to Signals

Hierarchical Vision Transformers for Return Prediction

Jonas Theill Bøjstrup · Bezirgen Veliyev · Jesper N. Wulff

Aarhus University

Act I — Charts

The oldest "alternative data"
in finance is a picture

  • →18th-century Japanese rice traders drew the first candlestick charts — centuries before Wall Street.
  • →Today they're on every trading screen in the world — and traders claim to see meaning in them.
  • →Our question: if we let a modern vision AI stare at millions of these pictures…  can it learn to predict returns?

One day, one candle

Four numbers — open, high, low, close — become one shape. (click video to replay)

Twenty days become one picture

Candles → volume → moving average → a 224 × 224 image. (click advances each step)

Traders gave the shapes names

Hammer, Doji, Hanging Man, Abandoned Baby… an entire folk taxonomy of squiggles.

Colorful names.
But is any of it real?

Let's ask a machine that has never heard of a "hammer".

The academic verdict

Do chart patterns actually work?

  • ✗Decades of research: hand-picked rules mostly die under scrutiny — data snooping, trading costs, vanishing effects.
  • 💡2023, a twist: don't tell the machine what to look for. Show a neural network millions of raw chart images — it finds its own patterns, and they predict returns (Jiang, Kelly & Xiu 2023).
  • ✗But follow-up work found the signal fading after 2019. Charts dead again?
  • ? Or did the machine just need better eyes?
Machine vision 101

How the 2023 model sees: a CNN

Zoom into the pixels → a tiny filter sweeps → a feature map lights up → many maps combine into a prediction. (click for each step)

Better eyes

Our model reads the whole chart at once

Cut into patches → zoom into one → 16 tokens → attention between every pair → Hiera's pyramid. (click for each step)

Better eyes — under the hood

Four stages, one chart — tokens merge as the network deepens. Training uses a "mean teacher" copy to survive noisy labels. (click per stage)

The setup

A brutally honest horse race

~7,000
US stocks
NYSE · AMEX · NASDAQ
2M+
chart images
one per stock per day
5 days
prediction horizon
up or down?
0
peeking
strictly chronological
train & tune
test — never touched
post-2019 holdout
1993–2000
2001–2019
2020–2024

Every week: score all stocks → sort into 10 buckets → buy the top, short the bottom → hold 5 days. Repeat for 24 years.

Results

The ranking works

Out-of-sample 2001–2024, real numbers from the paper. (click: CNN → Hiera → the point)

Cash it out

Buy the favorites, short the rejects, hold 5 days

+15% / yr
CNN benchmark
Sharpe 1.43
+24% / yr
Hiera
Sharpe 2.17

Same images, same portfolio rules, 24 years out of sample — the only difference is the eyes.

24 years, compounded

The actual cumulative H–L curves from the paper (SSRN 6274640). (click: CNN → Hiera → robustness, beat by beat)

Peeking inside

Where does the model look?

input chart
the input
a real stock, 2012 — model says Up (it was)
occlusion 56x56
cover 4-px squares,
re-ask the model
occlusion 28x28
bigger patches…
occlusion 14x14
bigger…
occlusion 7x7
whole-region blocks
red = held up-evidence · blue = pushed down
evidence by position in window
The evidence piles up at the right edge — averaged over 1,000 forecasts, the model's attention is squarely on the last few days of the window.
Controlled experiments — feed it synthetic charts

Dial a pattern from 0 → 100%

down momentum 0%
strength 0
→dial up
down momentum 100%
a hard sell-off
It's a contrarian. The harder the fall, the more bullish the model: P(up) climbs 0.516 → 0.535 — while rallies leave it cold.
inverse H&S 0%
strength 0
→dial up
inverse H&S 100%
inverse head & shoulders
It knows its folklore. A rounded bottom is its favorite bullish shape: 0.481 → 0.534 — the classic (peak) version stays bearish.
mean reversion 0%
strength 0
→dial up
mean reversion 100%
choppy, range-bound
Chop turns it bearish. Structure without direction is a warning: 0.522 → 0.483.

5,000 synthetic charts per pattern per strength level — the responses are smooth, monotone, systematic.

Act II

Why does this
even work?!

A chart is just a drawing of numbers the quants already had.

The puzzle, precisely

Rendering is deterministic: picture in, nothing added. (click for the punchline)

Paper 2 — the fair race

Same 20 days of data, three contenders

Linear model220 numeric features from the window
14.0%
Sharpe 1.04
Boosted treessame 220 features, nonlinear
17.6%
Sharpe 1.34
Hiera on the picturethe exact same window — drawn
20.7%
Sharpe 1.50

Largest 500 US stocks, out-of-sample 2006–2025. The picture wins — but why?

Interrogation

Break the chart, watch the signal

Trained model frozen; we vandalize only the input image. Real numbers. (click for each break)

Reverse engineering

Write what it sees as numbers

recent-bar geometry
sizes & positions of the last candles
wick structure
how far intraday highs & lows reach
the order matters
direction sequences
the exact order of up / down days
price × volume
big moves on big volume ≠ on thin volume
path shape
wiggle vs. straight line: efficiency, curvature, endpoint

201 new features — every one computable from the same 20-day window.
Linear model: Sharpe 1.04 → 1.42. Boosted trees: match or beat the image model.

The "vision magic" is mostly… good feature engineering, discovered automatically.

The decomposition

Where the edge really comes from

Capacity ≈ nothing · encoding is real but copyable into features · noise handling covers most of the rest. (click for the verdict)

The noise-handling reveal

Even with all 421 translated features, agreement with Hiera is only R² 0.45 — swap the noisy-returns target for Hiera's score and it jumps to 0.78. (click per step)

What this means for you

Five things to take home

  • 1Price charts still carry real, tradable signal — out of sample, in large caps, after costs, through 2024.
  • 2Architecture matters. The post-2019 "death of chart signals" was partly the model's eyesight, not the market.
  • 3No tea leaves. The signal lives in recent days, their order, and intraday extremes — not in magic patterns.
  • 4Most of the AI edge is statistics, not sorcery — explicit features copy the performance, better noise handling explains most of the rest, and the truly vision-only residual is ≈5% a year.
  • 5Representation is a lever. How you show data to a model changes what it learns — the chart acts as an attention prior. That's a design tool you can use.

Thank you

From Pixels to Signals — SSRN 6274640
Decomposing Price Chart Signals — SSRN 7119420

jwulff@econ.au.dk · jobo@econ.au.dk · bveliyev@econ.au.dk

← → navigate · F fullscreen