Matana Labs

Costs in a backtest

A Matana Labs backtest charges commission and slippage on every fill, interest on borrowed money, and, when you turn them on, the bid/ask spread and forex swaps. Each is set per strategy; the defaults below are read from the code.

Commission by asset type

AssetDefaultHow it is charged
Stocks and ETFs$0.0035 per share, at least $0.35, at most 1% of the trade valueOn every fill; a sell multiplier covers fees charged on sales only
Forex, spot metals$70 per $1 million traded, round trip ($7 per standard lot)Half on entry, half on exit; the per-share rate does not apply
FuturesPer contract per side from the contract table: $2.25 for E-mini contracts, $0.62 for microsYour own rate per contract can replace it; 50 contracts in the table
Crypto0.1% of the trade value per sideOn entry and exit

Commission is a cost of the trade: a trade’s result includes the commission of its entry and of its exit, so the win rate and average trade are net of it.

Slippage

Slippage is a percentage of the price added to every buy and taken from every sell. New strategies start with 0.01%; futures round the slipped price to the next tick against you. Slippage comes on top of the fill rules: a stop already fills at the real price of the second that reached it (see order execution).

Optional bid/ask spread

The price of the data is the middle between bid and ask. With the spread model on, a market buy fills at the ask (middle + half the spread) and a sell at the bid; a limit waits until the other side reaches its level; a stop triggers on the middle price and fills at market. “Auto” uses a typical spread per asset type; you can also set your own in price or in ticks, and the costs ×2 and ×3 check multiplies it.

Asset typeFull spread
Stocks and ETFs$0.01
Forex majors0.8 pips by default; per pair from 0.8 to 2 pips
Forex crosses2 pips
Exotic forex pairs10 bps
Spot gold, silver$0.25 and $0.03
Other spot5 bps
Futures1 tick
Crypto5 bps

Spreads are off by default, so existing results stay as they were. Typical spreads are constants per asset type, not the historical quotes of each second.

Interest on borrowed money

When a position costs more than your cash, the difference is a loan from the broker. With a margin rate set (percent per year), each day the engine charges the rate / 360 on the borrowed amount for every calendar day until the next trading day, so a weekend costs three days. Futures margin is not a loan and is not charged.

Forex swaps

A forex position open at the roll, 17:00 New York time on weekdays, pays or earns one night’s swap; the Wednesday roll counts three nights because settlement moves the weekend there. Rates are percent per year of the price on a 360-day year, or pips per standard lot (100,000 units). “Auto” rates come from central-bank rates (as of November 22, 2026) minus a broker markup of 1.5% per side. Swaps go into the account and the day’s result, not into a trade’s P&L.

Currency conversion

The account is in US dollars. An instrument priced in another currency (a yen pair, a euro future) has its profit, commission and margin converted at the exchange rate of the second of each fill; open positions are valued at the current second’s rate. If no rate is available for more than 7 days, the run stops with a message instead of guessing.

Updated 2026-11-24. Describes the product as it is today; numbers are read from the code when the site is built. Educational content, not financial advice.