Flowlyte Research
Engineering Blog 6 Jan 2026

Teaching an AI to Backtest: Building Flowlyte's Advanced Backtester

How we taught an LLM to understand perform complex 'What If' analysis, and simulate entire portfolios without hallucinating.

Published 6 Jan 2026 Updated 16 Nov 2026 2 min read

Building a chatbot that can summarize a news article is relatively "easy" in 2026. Building an AI that can accurately simulate a complex quantitative trading strategy over 5 years of historical data (while understanding nuance like "short selling" and "portfolio weighting") is an entirely different beast.

With the release of Flowlyte AI Backtester (v0.40.5), we've achieved a significant milestone. But getting here wasn't a straight line. Here's a look at the engineering challenges we faced and the powerful new features they unlocked for you.

Flowlyte AI Backtester

The Challenge: Context is Everything

When you talk to a normal AI, it treats text as text. But in trading, words have mathematical consequences.

Take the phrase "Add stop Loss at 5%".

  • If you are Long (buying), a stop loss is 5% below your entry.
  • If you are Short (betting against), a stop loss is 5% above your entry.

If the AI gets this wrong, it tells you that you made a fortune when you actually wiped out your account. We had to fundamentally retrain Flowlyte's orchestration layer to be "Directionally Aware." It now understands that "Shorting TSLA" implies an entirely different set of mathematical rules than "Buying TSLA."

Feature Showcase: 4 Ways to Use the New AI

We didn't just fix the math; we unlocked four powerful ways for you to test your ideas.

1. The "What If" Scenario (Parameter Overrides)

You no longer have to stick to the default settings of a strategy. You can simply ask the AI to change the rules on the fly.

User Prompt: "Backtest the A+ Setup on NVDA, but what if I used a tighter 3% stop loss?"

The AI's Logic: It runs the standard strategy but injects your specific 3% rule into the engine, giving you an instant comparison against the baseline.

2. The Face-Off (Multi-Ticker Comparison)

Wondering which stock handles a specific strategy best? Don't run five separate tests. Just ask for a comparison.

User Prompt: "Compare the Squeeze strategy performance on NVDA vs AMD vs INTC."

The Result: The AI runs parallel simulations and presents a ranked leaderboard, showing you exactly which ticker offered the best Win Rate and Return for that specific strategy.

3. The Big Short (Bearish Strategies)

Markets don't always go up. Flowlyte now supports full Short Selling backtests.

User Prompt: "How would a short strategy have performed on TSLA during the 2022 crash?"

The Magic: The AI automatically selects the _Short variant of our strategies, calculates profits based on price drops, and reports the inverse ROI correctly.

4. The Fund Manager (Portfolio Simulation)

This is the big one. You can now treat your entire watchlist as a single fund.

User Prompt: "Backtest my Tech Watchlist with the Trend Following strategy."

The Power: The AI looks up the tickers in your private watchlist, simulates them as a unified portfolio, and reports aggregate risk metrics like Max Drawdown and Expectancy.

Ready to Test Your Assumptions?

The market punishes guesses but rewards precision. We've done the hard engineering work to make sure Flowlyte AI gives you the latter.

Stop guessing. Start simulating.

See this week's data in Flowlyte

Free to start. No card needed.

Start For Free

Read more