Backtesting with Interactive Brokers

Discussion in 'Automated Trading' started by kramer65, Jul 14, 2011.

  1. Bob111

    Bob111

    well...that's the problem..cause we don't what the f**ck OP is talking about..stocks(which exchange???), bonds, or f**ing pork bellies..:confused:
     
    #11     Jul 15, 2011
  2. http://www.youtube.com/watch?v=nOglE3wZjGo

    I do back test and yes the message que at IB TWS is throttled the values that work are 50 different symbols in a 10minute period i.e you can submit 50 requests with 250milli second gap in a 10 min period. That works fine for me I just did 600+ symbols going back to 2/7/2011 (2-10/day) with 5min bars.

    I have built back testing but the shortest time frame I've currently tested is 5min. When I run my greybox live my strategies can use updates at the candle level i.e. 1min thru 60min or candle updates every 5secs.

    So what I do as I trade of 5min candles for my entry Strategy I run 5min updates for these and my management Strategy updates every 5secs. So the Entry Strategy once filled kicks of a management Strategy.

    I have back tested 600+ stocks going back to 2/7 this created 266 trades with a batting of 57% and simple sharpe ratio of 1.82 (i.e for every lost risk unit my winners make 1.77).

    I will post another vid next week as I now have completed and tagged V1.0 of the app.
     
    #12     Jul 16, 2011
  3. +1

    1 second for a year is available, but takes a while to download because they do throttle it, meaning you have to make multiple requests, leaving some time between requests.

    As for the "need" for tick data .. considering the execution latency is often > 500ms .. tick data may send you down the wrong path anyway.
     
    #13     Jul 16, 2011
  4. 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.
     
    #14     Jul 16, 2011
  5. I disagree.

    Back testing is absolutely necessary for debugging, & back testing can be useful when used correctly, for verifying stat arb strategies.

    Back testing with tick data, then executing through a broker with multiple tick execution latency is not so useful.
     
    #15     Jul 16, 2011
  6. Your TS

    Your TS

    Hi!

    I don`t understand how trader can earn money for specific system without analyzing odds in past.

    Backtesting is absolutely necessary for most of traders :) .

    Alexander
     
    #16     Jul 16, 2011
  7. LeeD

    LeeD

    I understand it's only for stocks.

    With futures IB stops providing data for individual contracts very soon after the future expires... and I am not aware of IB offering any "continuous" future price series. Please let me know if you think I am missing something.
     
    #17     Jul 16, 2011
  8. I'm not sure but you may be right.
    IB for sure doesn't have a continuous futures contract but you may be able to get historical pricing on individual contracts and roll over during the expiration week (and adjust the spread obviously). For sure not as easy as some of the other platforms, if you're looking for futures data go to this site
    http://www.tradingsimulatorsoftware.com/dataindex.htm
    I'm not sure how "current" their data is but it seems they offer decent tickdata for free
     
    #18     Jul 16, 2011
  9. JackR

    JackR

    Lee:

    IB provides individual back contract futures data for a year, more or less. To see what's available without having to remember the symbol exactly, put a current futures contract in the TWS main window, then select "Previous Expiry" and repeat a few times. Then select Chart and if the data is available it will plot.

    Most decent commercial charting packages can retrieve the data. It is not continuous contract data. You have to link it.

    Jack
     
    #19     Jul 16, 2011
  10. Stats arb is primary application of back-testing.

    When doing INITIAL BACKTESTING of stats arb...
    One simplifies, simplifies, simplifies...
    I use ETFs, not Forex/futures ticks, at first...
    To look at basic correlations.

    Once you are actually trading...
    One can optimize with more detailed data.

    It's ALL ABOUT EXECUTION anyway...
    Your strategy is 10% of equation...
    EXECUTION is 90% of equation.

    And the whole idea of tick data and bars...
    Is a sinister invention to sell you shit for $$$...
    Imagine if your doctor divided your life into 5 min bars...
    You would think he's insane...
    Just like the people who divide the market into 5 min bars.

    It's a fucking continuum.
     
    #20     Jul 16, 2011