How the backtest engine works
1
Data fetch
Mobius fetches OHLCV (Open, High, Low, Close, Volume) bars for your selected asset and date range from Alpaca Markets. For crypto, daily history is sourced from Yahoo Finance; intraday crypto bars use the Alpaca crypto feed.
2
Indicator calculation
All technical indicators referenced in your strategy (RSI, EMA, MACD, Bollinger Bands, etc.) are computed from the raw price data using TA-Lib. Alternative data (Reddit sentiment, congressional trades, fundamentals) is fetched from the appropriate provider and merged into the same timeline.
3
AI decision loop
For each bar in the date range, the AI receives: the current date, price, indicator values, and current position. It returns one of three actions — buy, sell, or hold — along with a reason and quantity. This decision loop runs bar by bar across the full backtest window.
4
Trade simulation
Buy and sell decisions are executed against the simulated portfolio. Commissions and slippage are applied as configured. The portfolio value is tracked at each bar.
5
Results
At the end of the simulation, Mobius calculates performance metrics and renders the equity curve.
Performance metrics
Supported timeframes
Important limitations
- Backtest data reflects historical prices — it does not account for corporate actions (splits, mergers) in all cases.
- Alternative data (Reddit sentiment, congressional trades) may have limited history before 2020.
- Fundamental data updates quarterly, so intraday fundamental strategies have lower granularity.
Next steps
Configure a backtest
Set capital, date range, slippage, and commission before running.
Interpret results
Understand every metric in the backtest results panel.