Backtesting for markets with more frictions
Many backtesters assume instant fills, the same settlement for every stock, short selling and deep liquidity. Plenty of markets work differently: slower settlement that depends on a stock's category, thin trading, no shorting, price limits and interventions. AnalystBro's backtesting engine is built to model those rules, so a test reflects what you could actually have traded.
It runs locally in the AnalystBro desktop app on Windows and macOS. Your AI agent, on the Claude, Codex or Antigravity plan you already have, writes the strategy and runs it there.
The frictions it models
- Settlement per stock and per date: bought shares can't be sold until they arrive (on the Dhaka Stock Exchange, T+2 normally and T+3 for Z-category stocks).
- A cap on volume: each fill can be limited to a share of the bar's traded volume; the rest carries to later bars.
- No short selling where there is none: a sell that would go below zero is refused and counted.
- Price limits and interventions: no buy fills on a bar locked at the upper limit, no sell at the lower one; floor-price periods can be left out of an extra set of results.
- Costs per market: commission and slippage per run, and sweeps over several cost levels.
The rules can make most of the number
In our own research, a breakout strategy on Dhaka Stock Exchange stocks showed about +676% from February 2024 to October 2026 in a naive backtest. With fills capped at a share of each day's volume and a minimum-turnover filter, the same idea came to roughly +24% a year.
The engine
- Pine Script-style strategies: strategy.entry, strategy.exit and strategy.close, partial exits, sizing by shares, cash or percent of equity.
- Checked against TradingView's Strategy Tester trade by trade on test strategies (e.g. QQQ, GLD).
- Fast whole-history plans, and daily and intraday prices from your own TradingView.
Built with these markets in mind
Bangladesh (DSE and CSE), Pakistan, Sri Lanka, Nepal, India, Vietnam, Indonesia and Egypt, among others.
Backtests show how a set of rules would have behaved on past data under the assumptions you give them. They are not predictions, and past results don't indicate future returns. Nothing here is investment advice.