Automated Equity Options Trading System - seeking input

Discussion in 'Automated Trading' started by ensemble, Nov 19, 2018.

  1. ensemble

    ensemble

    Some background: I posted on ET 10+ years ago under a different moniker. In 2011, I handed all of my accounts to UBS due to lack of time, but after the VIX spike in February this year, I knew that I wanted to get back to trading...

    Subsequently, I spent Feb-June researching and developing an automated trading system that implements a long gamma/mean-reversion strategy for trading options at/near expiration with an intraday time horizon.

    Below are some screencasts on a small IB paper trade account. I ran the paper account pari passu with my live account, and the simulated fills seem representative of the worst-case (rarely filled at midpoint).

    Anyway, I am curious to hear what the ET community thinks.

    Thanks




     
  2. Robert Morse

    Robert Morse Sponsor

    If you want us to evaluate what you are doing, we will need to see live monthly trading results net of all costs.
     
  3. guru

    guru

    Difficult to understand what's going on there, but the concept looks good, especially as I had related ideas. Any reason you're not trading at least small qties in a live account?
     
  4. ensemble

    ensemble

    Thanks for the comments. I have traded/developed live and the drawdowns (sometimes exceeding -$10k) combined with a relatively unproven system made it a very excruciating process. I will be the first to admit that I have booked huge losses from panic selling. The unusual divergence between the S&P/Nasdaq in late September (Nasdaq positive, S&P negative) was one situation when the strategy broke down. These heuristics needed to be coded into the trading rules.

    So I have been forward testing on paper while continuing to collect data from IB and optimize the model. Currently I have 1.4 billion quotes for 53k contracts going back to July, plus a year of daily EOD quotes from LiveVol. The simulated results below on $50k daily starting capital (without transaction costs) was what originally convinced me to put real capital behind it.

    Code:
    JUNE    128766.0
    JULY    157231.0
    AUGUST    53332.0
    SEPTEMBER    127991.0
    OCTOBER    149721.0
    NOVEMBER    78897.0
    Total:    695938.0
    Win:    62.37% (1780.0/2854.0)
    Avg Win:    606.29
    Avg Loss:    -356.85
    Max Win:    27690.0
    Max Loss:    -6210.0
    Profit Factor:    2.82
    Payoff Ratio:    1.7
    Sharpe:    6.91
    Here is one that was live - this unrealized gain within the first 10 minutes quickly evaporated before I could close the positions:
     
    guru likes this.
  5. sle

    sle

    Started with 50k, producing 120k a month with a Sharpe of 7. My prior is that something is wrong at the assumptions level.

    PS. Oh, that's like 3k trades in 6 months, which probably means you are quazi-market making and making unrealistic fill assumptions (either due to latency or some other reasons).
     
    Last edited: Nov 20, 2018
    d08 likes this.
  6. If this is the account value you've experienced quite a drawdown there.
     
  7. jonahern

    jonahern

    Looks pretty cool to me... I’d love to figure out how to automate options trading in IB. What did you code the system in? As far as performance, keep experimenting and fine tuning your edge.
     
  8. Robert Morse

    Robert Morse Sponsor

    IMO, I would be careful automating option trading. WIth 15 option markets and unpredictable option spreads and liquidity at each price level, I find for a non-MM that manual executions provide a better results.
     
  9. ensemble

    ensemble

    I wrote it in Java. There are 3 components - market data server, analytics engine, and trading engine. The components communicate through a RabbitMQ broker and historical data is stored in Hadoop.

    The trading engine runs a model portfolio (which assumes fills at the bid/ask) and continuously adjusts the live portfolio to keep costs/quantities synchronized with the model (working the orders starting from the midpoint).

    If anyone has questions about the TWS API, feel free to ask.

    Anyway this AM it actually went long NFLX and FB calls and, like an idiot, I liquidated everything at 10 AM before the positions turned profitable.
     
    jonahern likes this.
  10. jonahern

    jonahern

    Thanks Robert, I agree. For my case - idk about ensemble’s- I’m actually interested in semi automated programming solutions, in order to speed up my manual trading.
     
    #10     Nov 20, 2018