Independent research · C++ / CUDA
FTAIS-BT
GPU backtesting research
A backtester asks how a trading rule would have behaved on historical prices. I built FTAIS-BT to evaluate batches of prepared strategies on the GPU, test small changes to exit settings, and follow the same rules across time.
Code & recorded researchInteractive walkthrough
What happens
if you nudge it?
Start with a small trading idea. Change when it buys or exits, then see what holds up. The four views below make the mechanics visible through a simplified, playable model.
Synthetic examples, with links to the actual code and recorded measurements.
One idea. Three versions of the rules.
Change one assumption.
Pick a market. Set when you’d take a profit or cut a loss. The experiment also moves both exits 5% closer and 5% farther away. Do the results stay together?
In this illustration, a $2 target and $1 stop also become $1.90 / $0.95 and $2.10 / $1.05. FTAIS’s direct evaluator makes the same joint ±5% change to its supplied target/stop parameters. It keeps the original profit, the largest drawdowns, and the lowest fitness across those runs.
A separate rolling-window evaluator compares a fixed rule on earlier and later slices, with unused bars between them. The rule is evaluated again; it is not retrained. The interactive illustration uses synthetic prices and a simplified exit model.
A climb, a reversal, and a change of direction.
The signal uses closing prices. A trade waits for the next opening price.
Dollars above the entry price.
Dollars below the entry price.
Three results: $0.00 to $0.00
A small change to an exit can change which price is reached first.
Original settings · rolling windows
Would it hold up later?
Keep the entry rule and your original exits. Compare 24 earlier bars with 12 later bars, leaving two bars unused between them. Then move the window forward.
The rule and exits stay fixed. Two bars are left unused between the slices.
What this borrows from the actual code
Three checks per idea. The direct CUDA evaluator runs original and jointly ±5% target/stop parameters. Its output keeps original profit and trades, the largest drawdowns, and the lowest fitness. This illustration lets you inspect each result separately. Read the scenario calls and aggregation ↗
Fixed rules, moving windows. The separate CUDA walk-forward path evaluates prepared signals with the same supplied parameters in both slices. It skips the later evaluation if the earlier slice has no trades; it does not fit or retrain a strategy. Read the public API ↗
A teaching model on synthetic prices: long positions, one unit, fixed-dollar exits, no fees. Drawdown uses closed trades. The full engine also models risk, sessions and execution costs; its fitness is not reproduced here.
Change a setting to explore.
Traditional event-driven tools
First, replay
what happened.
An event-driven backtester follows market updates, applies a rule, places simulated orders, and tracks the account.
Here’s a tiny example: after two rising days, buy at the next day’s opening price. Sell if the price rises $5 above the entry.
A detailed replay helps you examine how trades happen.
Two rising days create a signal. The trade waits for tomorrow’s opening price.
FTAIS-BT’s GPU approach
Give more ideas
the same history.
Prepare the buy/sell signals first. Then give the GPU a batch of independent strategies to evaluate together.
Each row is one idea. Each idea still moves through time in order; the parallel work happens across ideas.
Larger batches can spread the cost of getting work onto the GPU.
From the recorded study
A batch of 32 ideas
44 ms
Measured time for 100,000 price steps per idea.
3,200,000 input price steps per scenario
In this run, 32 ideas took about as long as one. One synthetic workload on an RTX 4060 Laptop GPU. Each idea checks three target/stop settings; timings include moving data to and from the GPU. Medians of 30 timed runs after five warmups. View the measurements
The part speed can’t answer
Agree on
what counts.
Imagine buying at $100, with a $101 profit target and a $99 stop to limit a loss. That day touches both prices.
Daily data tells us the high and low. It doesn’t tell us which came first.
Illustrative outcome for one unit, before costs.
This possible path reaches the stop before the target. The daily prices alone cannot confirm this order.
FTAIS-BT’s rule: stop first.
When both levels are touched, the evaluator uses the stop. Defining this rule makes the result repeatable—even when the data leaves the order unknown.
Focused test cases matched
between CPU and GPU.
Press replay, or move through the history yourself.
A fair comparison means knowing what each tool does.
Event-driven tools can simulate richer orders, accounts, and trading venues. Array-based tools such as VectorBT also support batches. FTAIS-BT’s GPU path evaluates prepared signals and returns compact summaries; these jobs and outputs differ, so the research keeps their timings separate.
The chart shows FTAIS-BT’s own July 2026 batch-scaling study. The separate August daily-workflow study of five other engines uses different tasks and is not combined with it. The eight matched cases establish focused correctness, not complete feature equivalence.
Methods, results & limitationsKeep exploring
More things I’ve been building.