Estimation of spread cost and input into commission table

I would like to account for the cost of spread in amibroker, ideally using the commission table in analysis settings.

I have created a chart with the % cost of spread Vs share prices on the ASX and would like to break down the % costs in terms of price scale. ie 0-0.5, 0.5-0.1, 1-5, 5-10, etc. for use in back testing.

Is this possible and also for completeness am I a total idiot?

cheers :slight_smile:


Cost of spread price vs percentage cost

I don't know a ton about the backtester commission settings from the dialogue because I've been in the habit of writing it all into my code since I started with AMI. But honestly, that might be the best route for more complex modeling like this. Look into all of the SetOption() functions and/or bake it into the execution prices.

Oh, and you sound very reasonable. :yum:

1 Like

@Random_Entry I think the "cost of spread" you are referring to is often called "slippage". If I am interpreting your question correctly then search the forum as there are several posts discussing slippage. A couple of informative posts below,

And useful info on AmiBroker's "BuyPrice" and "SellPrice".


Maybe I’m getting my wires crossed but my interpretation of slippage is the effect of getting filled at a higher or lower price due to lack of buyers or sellers (liquidity) at the intended price level.

I am referring to spread which is a transaction cost.

Bid = $0.95
Ask = $1.00
Spread = $0.05
Spread = 5%

I’m trying to estimate this cost as a function of price and apply to amibroker.

Looks like it’s not possible in the commission schedule and must be coded.

@Random_Entry I think I misinterpreted your post. But I think the solution will be similar, ie a programmatic / coding solution.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.