Options strategy backtester

Discussion in 'Options' started by Aquarians, Apr 6, 2020.

  1. Hi y'all!

    Talked about this a few times here (usually after a few beers, not the case now :). I'm developing an application for backtesting option strategies and it's already in usable form.

    Initially I've put it free and open source on GitHub but then I changed my mind and made the repository private: I fail to see the benefit of offering further chances to my competition, and the competition is brutal. I posted here a shapshot of a LinkedIn job for a quant developer which already had 1048 applicants at 12 hours after being posted.

    Anyways, I've ran the first backtest and already I'm surprised by the results :) One feature of the application is to generate "theoretically pure" market data and run the backtest on it - in this case the results are beautifully aligned with theory. It may seem artificial but it's actually necessary in order to rule out software bugs: in the first runs the results WEREN'T confirming the theory, so I knew the problems are in the software and not the data, found the problems, fixed them and got perfect theoretical results.

    Armed with the certainty that the software is working correctly, I backtested the same strategy on actual market data... and disaster! :)

    Well, there still was a problem with the data: some of it it's effectively garbage and it's exactly the garbage that fucks up the tests: good data is usually arbitrage-free so it's ignored in the backtest, but crap data presents itself as an arbitrage opportunity - only it's not real but a fake. So I had to curate the data and managed to do it to some degree but I'm still not 100% sure it's perfect. That's because due to the huge amount of data I do the curation automatically, which means the result is only as good as the algorithm. Eventually I plan to do some painstaking manual curation, but for now I'm good with "probably mostly reliable data".

    So even with this probably quality data I had a shock: THE MARKET DOESN'T OBEY THEORY! :)

    What happened is that when trading arbitrary stocks, my strategy got destroyed by jumps in the stock price - legitimate jumps, not garbage, I cross-checked a few cases with market data from Yahoo Finance.

    So now I gotta incorporate this knowledge into the strategy and re-do the test. Will tell you how it goes :)
     
    .sigma likes this.
  2. I think of option trading as mining gold and my software as a tool for mining gold. It's like those documentaries along https://en.wikipedia.org/wiki/Aussie_Gold_Hunters , I admit watching them sometimes when I'm bored and surfing TV channels.

    In the days of the California gold rush, or the much less romantic Klondike gold rush, an entrepreneur could make a living by just selling tools to miners, but those days are over both in real gold mining and in electronic trading.

    Still the chances of finding that gold in the option market are much higher if one is using some sort of mechanical machine to ingest, digest and excrete large amounts of sterile, compared to digging with bare hands or some measly shovel and hoping for a lucky strike.
     
  3. traider

    traider

    What is your source for options data?
     
  4. Replied on a private thread. Reason is I don't wanna badmouth them, since they're affordable. Plus the data is mostly OK and with some curation (ideally automatic, worst case manually), it's definitely usable. I'm just saying it's not perfect. Heck knows how data from such as Reuters or Bloomberg would be, but it costs astronomically more, could be that even their data is not perfect.
     
  5. The guy / company I buy the data from, to my knowledge is only offering the data. Using it, writing the tools / software to use it, is up to the client. And even for an experienced quant developer like me (developer since 20 years, worked as an options quant about 10), writing this software is not a trivial task. I developed it over the course of several years, by trial and error, until it got the current form.

    So I thought I might contact my data providers and propose a deal to bundle my software with the data. But read my original post: I'm not sure it's worth it, and for the time being I'd rather use it myself and try to dig up some gold :)
     
  6. Matt_ORATS

    Matt_ORATS Sponsor

    Hi Aquarians
    My company, ORATS, has market data and backtesting for US equity options. Let me know if I can help.
     
    taowave and .sigma like this.
  7. Thanks for pointing you out as a possible alternative... in the future. Could be your data is more reliable but by taking a look at your prices, I can't afford it :) Will have to make do with my data provider for now, it's good enough for my needs.
     
  8. Matt_ORATS

    Matt_ORATS Sponsor

    If you need to check the results of your strategies against ours, I'd also be happy to help. We backtest on market data snapped 14-minutes before the close back to 2007. We have entry and exit rules based on options data levels and technical indicators so hopefully we can replicate what you are doing.
     
  9. Roger, thanks.
     
  10. RedDuke

    RedDuke

    do you also have futures data for CME products? If yes, how far does it go?
     
    #10     Apr 6, 2020