Friday, January 24, 2020

Straight up market finally pauses; Traderbot is in testing with a Python IB library that works! Minding the gap

Friday's market down move was blamed on the coronavirus now troubling China ...
But: who knows? The market has been going mostly up for almost 11 years, so any change would not be a surprise ...

However, with the Dynamic Covered Strangle, it doesn't make any difference what the market does (with one exception, discussed below).

Once again, we sell a futures put and call, not too far away from the money (.30 delta) and then set our traderbot to watch the two short strikes and buy or sell the underlying future as needed. Then we relax and let the options expire down to near their external value, close the trade and do it again, forever.



The main risk we face is a gap in the futures price, when an external event (especially during the shutdown in trading Friday to Sunday) happens, like this:


I don't have the data to detect the frequency of this sort of thing, but it seems to be rare enough to be not a risk to the overall strategy, especially if (as I plan) I'll be diversified over several different futures underlyings. Oil is vulnerable to this particular shock; soybeans more vulnerable to this one:


These shouldn't happen at the same time ... and my strategy for managing such a thing would be like this:


  • Move the "virtual short strike" to wherever we got the underlying futures price filled at, and run the traderbot as normal, trading back and forth around this value.
  • Wait for most time value of the option to expire ... if the underlying value is still way up beyond the gap, we have to take whatever loss is the value between the original short strike and the new "virtual one." But we also have a chance for the underlying price to snap back, as happened recently during one of the Iranian attacks on a Saudi oil facility; the price spiked over the weekend but came right back to the mid-50's where it started ... no harm done if managed as described above.
Keep calm and carry on, in this situation as in much of life!

Finally a piece of excellent news .. I am testing the traderbot with a Python library that works with Interactive Brokers! 

I should have this ready to deploy by next week ...

Watch this space!


Friday, January 17, 2020

The million-dollar traderbot

The trade I described last week is possible to manage "by hand" with the addition of contingent orders, alerts, and so forth. In fact I'm testing this right now on a paper trade account:

  • started with $25000 last week
  • currently $27000 or so (+ 8%) ... I can't tell exactly because option prices are wacky after the close on Friday; net liq says $28039 but I don't believe it.
But! Futures trading is 24 hours per day, 5+ days per week and it's not possible to watch all the time.

Even with contingent orders, on some platforms it costs margin/buying power to put all those orders on -- you really need every side of every trade.

It works much better with a software "traderbot" to watch it closely 24/7 and to put in the order only when the strike is actually breached!


The algorithm is very simple:

for each short put strike:
       if futures_position_is_on:
             if the underlying price > short put strike:
                  close_futures_position()
             else:
                  pass
       else:
           if the underlying price < short put strike:
                  open_futures_position()
           else:
                  pass

(similarly: loop through short call strikes and do the same checks)

Then sleep for 1 second, and do it over again!

So How Good Is This?

I'm just getting started doing this, but I think the setup keeps it from losing more than one in every 45-60 trades, if that. Let's say one per year ...

If we make 8% every two weeks (as the example above) then we can do that 26 times per year ... and that comes out to a 7.39X return on starting capital. So 7.39 x $25000 == $184750 ... and then let's say we lose one $4750 at the end of the year, leaving $180000. This is all perfectly scalable, so starting with $250,000 you come out with $1,800,000 ... and so forth.

This is all entirely speculative at this point, but I don't see why this can't be true ...

Another Promotion Starts Now

Anybody signing up as a new client now to January 31 gets 6 months free .... Take a look!

More next week ...






Friday, January 10, 2020

A "new" trade: Dynamic Covered Strangle

First, this isn't new; I thought of a version of this a couple of years ago and it may well be standard practice by organizations who aren't publishing their trade ideas.

But it looks good enough to me that it reminded me of this guy:

This is Pele, the Brazilian soccer star, who came out of retirement in 1974 to play for the New York Cosmos for an amount of money that he described as "The Sun, The Moon and The Stars."

Now for the trade ... it requires these brokerages attributes:

  • SPAN margining ... one could theoretically do it with equity options, but the margin requirements are so much greater it probably doesn't make sense in most cases
  • trading of futures and futures options
This makes it challenging to work inside IRAs in many brokerages; some don't allow futures trading or futures options trading, inside IRAs. Make sure you know your brokerage's rules before getting excited about doing with your IRA.

Step 1: sell N contracts of any futures options strangle, 30-50 DTE. So far I've backtested this only with /CL (West Texas Intermediate), the only dataset I have, but I don't see a reason that it shouldn't work with any futures product that supports options.

Step 2: set a contingent order with a tight stop to buy N of the underlying futures only when reaching the short call strike. (If your brokerage doesn't support contingent orders you'll have to do this with alerts.)

Step 3: set a similar contingent order and stop to sell N contracts when reaching the short put strike.

Wait and watch ... 80% of the time (on a one-standard-deviation strangle, with strikes at the 16 delta), nothing will happen and you can just close the trade for a profit of 50% or 80% or even 100% of the credit received.

Another advantage: you are not worried about a huge move in either direction! I'd be fine doing any /CL trade with this setup with the war drums beating last week ...



Backtesting results!

Setup details:

  • January 1 2016 to Dec 23 2019, /CL (West Texas Intermediate crude oil)
  • Futures options prices, including 'delta' and underlying price
  • End of day prices only
  • Tests were run with just a 1-lot strangle (i.e. selling 1 call and 1 put)
  • I used 30 to 50 days until expiration
  • I set to take 85% of the credit we got on opening of the trade
I varied the delta of the options I sold:

.16 delta            + $28577               13 whipsaws
.30 delta             +$52997               15 whipsaws
.40 delta             +$70907               28 whipsaws

The "whipsaw" count is the number of times that the underlying price went through the strike price once and then came back once ... Clearly making sure that these whipsaws are handled optimally is key, and they will be a small drag on earnings nonetheless ... but selling the options closer to the money (.40 delta) pays enough extra to compensate you for this extra attention.

Also, you need to watch the extrinsic value left in your options to decide when to get out ... if you're getting whipsawed around a strike early on you need to hang in there as the option price will still be too high for you to close for a profit. Later on with the extrinsic value down to 50% or less of the opening credit, you can certainly get out and move on if getting whipsawed at that point.

Note that the option price will collapse to the amount it's in the money; for example, if you sell the 65 /CL call and /CL closes at 67 at the time your option expires, you are down $2000 on that option ... But: (1) you got credit when opening the position and (2) you bought the the /CL option contract at 65 that covers your option loss ... so you are just left with that opening credit!

Note also: there's no reason this couldn't work with shorter timeframes like those available in /ES and /GC ...

I'd suggest to start:

  • Take 1/2 of your account's buying power and set up a variety of futures options trades as described above ... /CL, /GC, /NG are three you should definitely consider.
  • Try the .30 delta to start and make sure you stay on top of the strike breaches going back and forth
  • After you work with this for a couple of months, you can try the .40 delta ...
Have fun! More next week ...





Saturday, January 4, 2020

Surprising backtest results now available; geopolitics intervenes in the oil market

I got a response from iVolatility; their data includes futures options out through 2021, and I had missed that. Screening those out and just focusing on the current futures contract gave me the results I was expecting (i.e. all the same futures closing prices on the same day.)

I tried various parameters (delta of the short strikes, mainly) and was only able to show a small profit at best ($2200 over the 4 years 2016-2019) ... I did notice fairly extreme volatility especially in 2016 so decided to try adding a "swing trade" component.

Here's what I added:


  • buy 1 /CL futures contract when the price goes below $40;
  • sell 1 /CL futures contract when the price goes above $60;
  • in either case, close the trade when $10000 profit target is reached
Running this 2016 to 2019 gives these results:

  • $2270 profit on options trades
  • $31470 profit on futures swing trades
  • max drawdown was around $11000
I didn't exceptionally "curve fit" ... I could have shown better results and less of a drawdown choosing $35 or $30 as the point to go long ....

Now for the geopolitical component:

Iranian General killed by U.S. drone strike Friday
The /CL (West Texas Intermediate) went only to $63.04 on Friday ... the plan above would have it going short. I'd certainly have to watch it closely if I were to do this, or else wait and just use a limited-risk call spread until the situation is resolved. /CL is $1000 per point, so one can't let it get too far out without managing it!

I need one of these to be able to glance at overnight:

Ambient orb displays market data at a glance



More next week!