Backtesting with Interactive Brokers

None of this means you will be *filled* at the prices the data indicates.

Assume you'll have the honour of paying the spread .. one way or another .. then maybe another tick to boot.

Algo developers in co-lo have an easy life by comparison.
 
Quote from Rationalize:

None of this means you will be *filled* at the prices the data indicates.

Assume you'll have the honour of paying the spread .. one way or another .. then maybe another tick to boot.

Algo developers in co-lo have an easy life by comparison.
Modelling fills in a realistic way is a subject of it's own. There is certainly more to it than assuming you get filled at the next trade price (which is, by the way, is gross oversimplification). Realistically, you should add order placement delay and being filled on the right side of the spread. For simple tests adding fixed slippage is often good enough.
 
Quote from intradaybill:

Surprise, surprise....IB is a broker and TWS is an execution platform. Surprise, surprise...

You found out all that after you wrote your algo....surprise, surprise...

Maybe you should write an algo for these other programs that call home and ship it over for backtesting. They will be very glad to anticipate your trades in ways that they avoid being called "frontrunners".

HFT often means someone knows when your trades will be coming in...

Now, friendly advice. backtesting is useless for algos.

Lol. :D

I guess unless you are talking about straight trading I don't see why you'd say that backtesting is useless for algos. Backtesting and optimization <b><i><u>IS ESSENTIAL</u></b></i> to building algorithms that work.

It's just common sense. You don't know how well the algo works until you do this, so I only have an issue with this statement. The rest is hilarious.
 
Quote from LeeD:

Modelling fills in a realistic way is a subject of it's own. There is certainly more to it than assuming you get filled at the next trade price (which is, by the way, is gross oversimplification). Realistically, you should add order placement delay and being filled on the right side of the spread. For simple tests adding fixed slippage is often good enough.

If the edge of your strategy is approaching single tick territory, I think you'd agree that it becomes *all* about placement for an expected fill. Mostly with them coming to you.

Of course, at this point backtesting becomes a bit of a bitch..

Really got to rebuild the orderbook yourself .. multiple price layers .. including an arrival queues per price step .. and remembering to put your order at the back of the respective queue .. handle the trades of others .. etc. Essentially you build an exchange.

In reality though, through a non-co-lo'd satiation I'd say forget it.

Just move to a longer timeframe.

Let paying the spread become a minor detail in your multi-tick edge strategy.

You're on the buy side. Act like it.
 
Quote from bwolinsky:

I guess unless you are talking about straight trading I don't see why you'd say that backtesting is useless for algos. Backtesting and optimization <b><i><u>IS ESSENTIAL</u></b></i> to building algorithms that work.
Perhaps, intradaybill is referring to datamining bias. Properly done, backtest can be considered a difinitive proof that that an algorithm doesn't work but backtest is not sufficient to confirm that an algorithm does work. A perfectly smooth asset growth curve on a backtest is more often a result of overfitting than a strong trading edge.
 
Quote from LeeD:

Perhaps, intradaybill is referring to datamining bias. Properly done, backtest can be considered a difinitive proof that that an algorithm doesn't work but backtest is not sufficient to confirm that an algorithm does work. A perfectly smooth asset growth curve on a backtest is more often a result of overfitting than a strong trading edge.

right on.
 
Quote from LeeD:

You make a good point.


No offence but this is bullshit. Interative Brokers don't give you any "tick" data and you can download "1-minute" data for only a month or two back. Note that IB don't provide timestamp on their market data. So, minute bars you see based on real-time data from IB will be different from historical minute bars downloaded from IB for the same time period.


What you say about IB historical data is bullshit, using your word. There is time stamp on IB historical data, and you can get 1-min data for 1 year (by making multiple api requests) or even longer if you spend enough in commissions or have a large enough account.
 
Back
Top