Backtest FX strategies and IB

Discussion in 'Automated Trading' started by sheepsucker, Sep 13, 2011.

  1. How is one supposed to reliably backtest fx-strategies on IB when they only provide data 1 year back and every brokers fx data is different?

    Almost like trading FX with IB is the first pitfall to avoid..
  2. Samsara


    Not sure why you'd want to use IB for anything aside from its brokerage services. All heavy lifting is probably best done with a front-end application.
  3. lol sure the trading logic is in a 3rd party application, I still use NT.

    But the point I was trying to make was that whatever application you prefer to use, you cannot reliably backtest for more than 1 year since you only get data for 1 year. You cannot use data from another provider either because the data is different from broker to broker.

    So why would anyone who likes to backtest for several years trade FX strategies with IB?
  4. Joman


    And how do you backtest stocks and futures ? you need historical data from an external provider !

    The quality of the data is always an issue but high quality data like Livevol is not for the average Elite Trader :)

    You need to make a balanced choice between quality and price.

    Here is a link that give you both free and paying sources, I think everything is there and well explained:

    You can also save IB forex data until you've got enough for your backtest.
  5. Stocks and futures are significantly different because they are traded on an exchange so the data is very similar.
  6. Exactly what do you mean ? Are you talking the API to get the historical data ? THAT'S A MUCH DIFFERENT ANIMAL !!!! Of course everyone's API is going to be different.

    But Data is data, whether it be in the form of ticks, multiple aggregated ticks, time bars, etc.
    Sometimes the only problem is related to time bars because some vendors timestamp the bar with the beginning of the bar, others timestamp using the time at the end of the bar. I use aggregated tick bars to avoid this problem.
  7. data is data, but sheepsucker is correct that there is no centralized/single market for FX.

    all the banks make their own markets with each other, many of these are disparate, spreads can vary hugely.

    there is no requirement that a group of FX trading partners report their quotes or trades back to a central exchange/clearninghouse as in US equities. nor is there a similiar requirement in FX where clients must be offered the best price out there. FX is still the wilderness.

    transparency of derivative markets is supposed to be improved with the passage of frank/dodd, although I don't know if it applies to cash FX transactions.
  8. I wrote data and meant data. Not going into the API here.
    Thanks for the tip about using aggregated tick bars.
  9. bln


    Skip the backtesting and focus on forward testing. As others have pointed out there is no central market for FX, pricing at every broker is unique and will differ then it comes to bid,ask,last,midpoint so any backtesting at one broker is only valid for that particular broker.
  10. I am not an FX trader (I trade stocks and futures), but the following occurs to me as I follow this thread:
    Q: Does historical FX have any value for testing FX strategies?
    A: It probably depends. If you’re scalping and looking for small wins each time, perhaps the only data that makes sense is historical data from the same broker (for all the reasons outlined above). If however your strategy looks for bigger wins, seeking to take advantage of bigger price moves, then perhaps the differences between brokers’ data become less relevant? And then you can usefully use historical FX data for testing/system design (with all the same cautions as when you use historical data for testing/etc for any instrument class) before moving to forward tests?
    I await the flaming ...
    #10     Sep 18, 2011