Documentation

How NeuralHFT works.

Technical reference for the signal encoding pipeline, CL1 hardware integration, spike-to-trade mapping, and closed-loop architecture.

Architecture

From tick to trade
in under a millisecond.

NeuralHFT operates as a closed-loop biological computer. Raw market ticks enter as numbers and exit as signed trade orders — the intervening computation happens entirely inside living neurons.

01

Market Data

Price · Volume · OI

02

Encoder

Float → waveform

03

MEA Stim

μV biphasic pulse

04

Spike Record

64-ch · 25 kHz

05

Decoder

Rate → signal

06

Order Router

BUY · SELL · HOLD

Tick ingest

~12 μs

Encoding

~18 μs

Stimulation

~40 μs

Spike window

~800 μs

Order emit

~30 μs

End-to-end closed-loop latency · CL1 running accelerated-time mode · measured at the SDK layer

Signal encoding

Translating price into voltage.

Market features — mid-price, volume-weighted return, bid–ask spread, and short-horizon momentum — are normalised to [−1, 1] using a rolling z-score window of 200 ticks. Each feature maps to a dedicated electrode channel pair via amplitude modulation of a biphasic square pulse.

Positive values increase cathodic phase amplitude; negative values invert polarity. Pulse width is fixed at 200 μs per phase with a 50 μs interphase gap. This ensures charge balance across the MEA surface and avoids electrode degradation over extended sessions.

encoder.py — feature normalisation
# Rolling z-score, window = 200 ticks
def normalise(series, window=200):
 mu = series.rolling(window).mean()
 sig = series.rolling(window).std().clip(lower=1e-9)
 return ((series - mu) / sig).clip(-1, 1)

# Map normalised feature to biphasic amplitude
def encode_stimulation(features: dict) -> list[Pulse]:
 pulses = []
 for ch, feat in CHANNEL_MAP.items():
 amp = features[feat] * MAX_AMP_uV # ±50 μV
 pulses.append(Pulse(ch, amp, width_us=200))
 return pulses

Channel map

Ch 1–4Mid-price Δ (normalised)
Ch 5–8VWAP return
Ch 9–12Bid–ask spread
Ch 13–1610-tick momentum
Ch 17–20Volume imbalance
Ch 21–24Volatility (realised)

Biological substrate

Living neurons as compute.

The MEA inside the CL1 hosts a dense culture of human cortical neurons derived from iPSCs. After a 21-day maturation period, the network forms spontaneous activity patterns — a resting state that serves as the baseline before any conditioning.

Hebbian-adjacent plasticity means synapse weights shift in response to correlated stimulation and spike timing. After sufficient market exposure, the network begins to preferentially fire on certain price configurations — without any explicit training signal or backpropagation.

Neuron culture parameters

Cell typeHuman iPSC-derived cortical neurons
Maturation period21 days
Electrode count64 active channels
Inter-electrode spacing200 μm
Sampling rate25,000 Hz per channel
Voltage range±3.2 mV ADC input
Plasticity mechanismSpike-timing dependent (STDP)
Human neurons cultured on a 64-electrode MEA inside the Cortical Labs CL1

Human cortical neurons on the CL1 MEA surface, day 28 post-plating. Bright points are electrode pads; branching processes are axons and dendrites.

Spike raster — 64 channels · 50 ms window

01
05
09
13
17
21
25
29
33
37
41
45
49
53
57
61

Simulated raster · ~12% firing probability · each column = ~0.8 ms

Hardware

The CL1 — technical spec.

Cortical Labs CL1 biological intelligence device

CL1 specifications

Electrodes64 active (8×8 grid)
Recording bandwidth0.1 Hz – 7.5 kHz
Sampling rate25,000 Hz / channel
ADC resolution16-bit
Stimulation range±3.2 V biphasic
Stimulation resolution10 μV LSB
Closed-loop latency< 1 ms end-to-end
InterfaceUSB-C · Gigabit Ethernet
SDKPython 3.10+ · cl-sdk
OS supportUbuntu 22.04 · macOS 14

NeuralHFT integration

Active channels24 stim · 40 record
Tick rateUp to 1,000 ticks / s
Trade cadence1 decision / 5 sec (live)
Spike window800 μs post-stimulus
Voting threshold≥ 3 channels above FR

Spike-to-trade mapping

How spikes become orders.

After each stimulation event, NeuralHFT opens an 800 μs recording window. Spikes detected above a per-channel threshold are counted across three electrode banks — each bank represents a directional vote.

Bank A — Ch 1–20

BUY

Firing rate ≥ 1.4× baseline on ≥ 3 channels. Indicates the network has associated current market state with upward price movement.

Bank B — Ch 21–40

SELL

Firing rate ≥ 1.4× baseline on ≥ 3 channels. Indicates learned association with downward price pressure or mean-reversion signal.

Bank C — Ch 41–64

HOLD

No bank exceeds threshold, or both A and B exceed simultaneously. Network is ambiguous — position is held flat, no order is emitted.

decoder.py — spike voting logic
# 800 μs post-stimulus spike detection window
def decode_spikes(recording, baseline_fr) -> str:
 THRESHOLD = 1.4 # 1.4× baseline firing rate
 MIN_VOTES = 3 # channels above threshold to cast a vote

 buy_votes = count_above(recording[0:20], baseline_fr, THRESHOLD)
 sell_votes = count_above(recording[20:40], baseline_fr, THRESHOLD)

 if buy_votes >= MIN_VOTES and sell_votes < MIN_VOTES:
 return "BUY"
 if sell_votes >= MIN_VOTES and buy_votes < MIN_VOTES:
 return "SELL"
 return "HOLD"

Simulation results

Early results from the CL SDK simulator.

All results below were generated using the Cortical Labs SDK simulator in accelerated-time mode with Poisson-distributed spike generation. No real capital was deployed.

NeuralHFT simulation results — asset price, mark-to-market P&L, and position size over 6,000 ticks

CL SDK Simulator · 6,000 ticks · accelerated time mode · Poisson-distributed spike generation

Mark-to-Market P&L
+$0.65
Ticks Simulated
6,000+
Closed-Loop Latency
<1 ms
Sharpe Ratio (sim)
2.1

SDK & integration

Get running in minutes.

The Cortical Labs Python SDK exposes the full stimulation and recording pipeline. NeuralHFT wraps it in a thin async loop that feeds market data in and pulls trade signals out.

install
$ pip install cl-sdk neuralhft
$ cl device list
hft_live.py — minimal integration
from cl.sdk import CL1, Pulse
from neuralhft.encoder import encode_stimulation
from neuralhft.decoder import decode_spikes
from neuralhft.feed import MarketFeed

# Connect to CL1 device
device = CL1.connect()
feed = MarketFeed(token=TOKEN_MINT)

async def run_loop():
 async for tick in feed:
 # 1. Encode market features → stimulation pulses
 pulses = encode_stimulation(tick.features)
 # 2. Stimulate MEA, open spike window
 spikes = await device.stimulate_and_record(pulses, window_us=800)
 # 3. Decode spike votes → trade signal
 signal = decode_spikes(spikes, device.baseline_fr)
 # 4. Route order
 if signal != "HOLD":
 await feed.place_order(signal, size=0.005)

import asyncio
asyncio.run(run_loop())