Saturday, September 25, 2010

Implementing stock strategies using options

There are many stock trading strategies that are quite attractive in terms of Sharpe ratios, but not very attractive in terms of returns. (Pairs trading comes to mind. But in general, any market neutral strategy suffers from this problem.)  Certainly, one cannot feed a family with annualized returns in the single or low double digits, unless one already has millions of dollars of capital. One way to solve this dilemma is of course to join a proprietary trading group, where we would have access to perhaps x30 leverage. Another way is to implement a stock trading strategy using options instead, though there are a sizable number of issues to consider. (I recently brushed up on my options know-how by reading the popular "Options as a Strategic Investment".)
  1. Using options will allow you to increase your leverage beyond the Reg T x2 leverage (or even the day trading x4 leverage) only if you buy options only, but not selling them. For example, to implement a pairs trading strategy on 2 different stocks, you would have to buy call options on the long side, and buy put options on the short side (but not sell call options). Otherwise the margin requirement for selling calls is as onerous as shorting the underlying stock itself.
  2. The effective leverage is computed by multiplying the delta of the option by the underlying stock price divided by the option premium. If you buy an out-of-money (OTM) option, the delta will be small (smaller than 0.5), but the option premium is small also. Vice versa for an in-the-money (ITM) option. So you would have to find the optimal strike price so that the effective leverage is maximized. I personally choose to buy an at-the-money (ATM) call or slightly ITM call without actually computing the optimized strike, but perhaps you have reached a different conclusion?
  3. Naturally, the shorter the time-to-expiration, the cheaper the option and higher the effective leverage. Additionally, for ITM options, their deltas increase as we get closer to expiration, which also contributes to higher effective leverage. However, the time-to-expiration must of course be longer than the expected holding period of your position, otherwise you would incur the transaction cost of rolling over to the further-month options.
  4. The discussion of finding the right strike price based on its delta is moot if your brokerage's API does not provide you with delta for your automated trading system. In theory, Interactive Brokers's API provide deltas for whole options chains, and quant2ib's MATLAB API will pass these on to your MATLAB exeuction program too. However, I have not been successful in retrieving deltas using quant2ib's API. If you have encountered a similar problem, and perhaps have found the reason/cure for this, please let me know. For now, I am reduced to assuming that all my near ATM calls for different stocks have the same delta, and I increase this common value from 0.5 to close to 1 as time passes.
  5. Options don't have MOO, LOO, MOC or LOC order types. If one uses market orders to buy at the open or close, one would incur significant transaction costs due to the much wider bid-ask spread compared to stocks. I try to use limit orders on options orders as much as possible.
If you have used options to implement stock trading strategies, and have experiences with these or other issues, please do share them here.

====

Reminder: my next pairs trading workshop will take place in New York on October 26-27th.

33 comments:

jb said...

Computing the delta is not hard?

Josh said...

What about portfolio margin? IB offers it for account sizes of only 100K.

B said...

IMHO, it makes more sense to use futures for leverage instead of dealing with the other variables such as volatility, expiration time etc., which come in when you trade options ?

Josh said...

There aren't liquid futures for individual stocks.

Btw Ernie, what about gamma, theta, and implied volatility? How do you deal with changes in these values affecting your effective leverage over the life of a trade?

Svetlin said...

Hi Ernie,
buying short-term options is generally considered very risky practice because of the large loss of time-value per day. In case of 1-month contracts you can easily lose 20-30% on both sides in only 1-2 weeks if the underlying stocks do not move significantly.
If you consider longer-term options instead, then you are actually going long large amounts of Vega (which determines how much the position depends on volatility). In that case, only a small drop in the implied volatility can make you lose significant amount of money as well. Please also note that volatility generally shrinks when stock prices rise gradually. You may also experience considerable volatility drops immediately after important company events...
Generally volatility is the main factor in the options play. So it would be a mistake to apply a stock trading strategy to options without having a view on the future volatility. Unfortunately these issues are not covered with enough focus in the McMillan's book as he describes the effects of volatility only in a separate chapter at the end of his book.

Ernie Chan said...

Josh,
Portfolio margin does give better leverage on market neutral portfolio than the Reg T margin. However, it is still nowhere near that afforded by options. If, however, we are trying to implement directional (unhedged) strategies, then portfolio margin won't give you much better than Reg T. Also, the margin is solely at the discretion of IB, and I have spent much time arguing with them why my account deserves better buying power to no avail. Perhaps you have better luck with them?
Ernie

Ernie Chan said...

B, Josh and Svetlin:

Josh is right. Even the available single stock futures have lower leverage than their corresponding options, I believe.

And Josh and Svetlin are also right
that all the Greeks and imp. volatility etc. change with time, which is why I only use options to implement quite short term stock strategies (no more than a couple of days holding period).

Ernie

Ernie Chan said...

jb,
True, if one uses Black-Scholes model to compute delta. I just need to first compute historical volatilities which is quite easy for a portfolio of stocks.
Ernie

Josh said...

Ernie,

I was referring to p-margin for short calls. I don't have any experience with it yet. If you'd be up for taking a blog post request, an explanation of your experience with portfolio margin would be much appreciated. I understand basically how it works but I wouldn't know where to begin with backtesting.

An idea I have on the backburner is to buy puts/calls on stocks that my strategies issue signals for. Then "finance" these options with the sale of broad index options and use the emini S&P futures to delta hedge. The idea being that the amount of time I'm exposed to tactically unhedgable gap risk per week is low, and managing risk on one liquid and arguably more predictable position reduces the number of "moving parts" in my workflow.

Problem is that I don't know how much of a p-margin credit I would receive so don't know what kind of leverage I can expect. I would have about 10-20 longs and 10-20 shorts, across multiple sectors, and be net sector neutral at all times (for the long calls/puts). I like to think of it as a pseudo-dispersion trade overlay, similar to currency overlays. Any thoughts?

P.S.

What kind of situations did you believe warranted higher margin that IB disagreed with?

Ernie Chan said...

Josh,

As I mentioned, usage of p-margin is entirely at the mercy of your brokerage (or their risk management formula specifically). If your portfolio trades a large number of liquid stocks with hedged positions, you are likely to get higher margin. If you have concentrated positions in small-cap stocks with no hedging, you are not likely to get portfolio margin. The formula is complicated and differs from broker to broker. So it is best to ask your broker to explain their formula.

The disagreement I have with IB is hard to pin point, since their risk management formula is very complex. Basically I feel that my day trading position is liquid and low risk, but they think otherwise.

As for using portfolio margin for short calls, I am not even sure IB allows it.

Ernie

Josh said...

Unless their website is out of date they use the TIMS model "disseminated by the OCC" which is described here:

http://www.optionsclearing.com/risk-management/cpm/

Is that still accurate as far as you know? And do you mean they possibly don't allow *extra* margin for short calls? One would still get Reg T margin I hope!

Thanks, Ernie.

Ernie Chan said...

Josh,
For Reg T accounts, a naked short call requires a margin of

Call Price + Maximum((20%[2] * Underlying Price - Out of the Money Amount), (10% * Underlying Price))

(http://institutions.interactivebrokers.com/en/p.php?f=margin&ib_entity=inst)

For a portfolio margin account, the margin depends on all the other positions in your account. In that case, yes, you have to use TIMS to determine the total buying power of your account.

Ernie

Proprietary Trading Guy said...

For anyone interested in this subject of joining a prop firm, there is an ineresting article at the following link:
http://www.proptraders.net/questions-for-proprietary-trading-firms/

Basically a list of questions you should ask any prop firm before joining to help you evaluate what the prop is offering you and to avoid getting involved in a weak or shady setup.

Paul Teetor said...

Thanks for covering this topic, Ernie. I've used options this way quite often. It's a matter of efficient use of capital. This technique is often called "stock replacement" -- replacing a stock position with an equivalent option position.

Here are some notes from my experience.

(1) I always choose the strike with a delta of 70%, whether I am long or short the option. The main advantage is that those options have a modest gamma, reducing the need for frequent rebalancing. Another advantage, if you are long, is the smallish time premium you'll pay.

Interactive Brokers has a handy Option Trader screen that calculates the deltas for me in real-time. I sometimes use an inexpensive Excel add-in, or even a (very) inexpensive Android app instead.

(2) I never use front-month options for stock replacement. If I'm long the option, the time decay is too large, driving up my costs. If I'm short the option, the greeks are changing too quickly, making risk management difficult.

(3) When the bid/ask spread is wider than 5 or 10 cents, I use limit orders, with a limit price near the market mid-point. Being a little patient pays off.

(4) I never trade options on illiquid stocks. If the stock's average volume is below 300,000 per day, forget it. You won't get good execution on your option orders, so trade the stock, not the option.

Ernie Chan said...

Hi Paul,
Thanks for your informative post. I agree with all your advice. Good to know about the 0.7 delta rule. That is actually close to my options' deltas as well. On point 4, I personally trade options only on OEX components!
Ernie

Glyphard said...

Calculating the bid/ask delta via IB is very simple given that they supply you the bid/ask implied vol. The IV feed works fairly consistently.

If you take bid/ask implied vol and do a sped up black scholes (look on wilmot for some quick approximations for normcdf that use constants instead of direct integral evaluation) you get a delta that is accurate to 0.01 or so...

It's fast, and efficient. Ads one function of about 20 lines to your codebase.

Ernie Chan said...

Glyphard,
Just as I was unable to obtain delta through IB's API via quant2ib, I am also unable to obtain implied volatility there. Do you use IB's native Java API?
Ernie

Glyphard said...

Yes, I use the native socket API. I'm not familiar with quant2ib, but it sounds like it might be an issue in their software...

In any event, if you can get BID/ASK price for a contract via quant2ib, you can use newton's method to get implied vol, usually in 3 iterations. Sometimes two iterations, if you use a good heuristic. If the speed of IB's api is good enough for your needs even 10 iterations should be plenty fast, particularly if you use the quick normcdf approach that I mentioned.
(With some cleverness I suppose you could even use fzero() in matlab).

Ernie Chan said...

Glyphard,
That sounds like a good idea - thanks. When you said that the delta calculated this is accurate to 0.01, do you mean compared to IB's delta, or some other source?
Ernie

Anonymous said...

Ernie,

If you're just trying to create a synthetic stock position, what's wrong with Single Stock Futures (SSF)? You can get 5:1 leverage that way. Do you really want more than 5:1 leverage? How much leverage would you want for your pairs trading?

-aagold

Ernie Chan said...

aagold,
For my intraday positions, I can already get x4 leverage, so x5 leverage offered by SSF is not particularly attractive. I think ~about x10 leverage is suitable for my strategy, based on Kelly formula.

For e.g. GOOG last price is $536, and the October 500 call traded at $38.54. Assuming a delta of 0.7, the effective leverage is 9.7.

For pair trading, even though one may hold overnight positions, the risk is reduced because of hedging. So again, > x5 leverage is not unreasonable for some ETF pairs. (As you may know from my writings, I don't trade stock pairs.)

Ernie

Glyphard said...

@Ernie,

Accurate compared to IB's delta, which by default is generated by their implementation of black-merton-scholes.

The 'accurate to .01' comment is more a reference to speed of convergence than 'correctness'. IB will actually let you select which model you'd like them to use to generate your basic greeks(though you're on your own for explicit gamma, theta, and vega), but then you'd need an implementation of the same model on your side. Which is what motivated teh comment about speed.

Ernie Chan said...

Glyphard,
Very useful points -- thanks.
Ernie

Anonymous said...

Ehrman, D. The handbook of pairs trading. John Wiley & Sons Inc, 2006 has a pretty good discussion of the use of options in pair trading, including a number of examples where back spreads or verticals might be useful.

Ernie Chan said...

Anon,
Thanks for mentioning this book: I have added it to my recommended books list on the right sidebar.
Ernie

volatile smile said...

Well if you are trading public equities, the market is already so efficient; that's the economic reason a market neutral strategy would be limited.

On the other hand, even "market neutral" strategies are still Taking Opinions on the prices of securities.

To paraphrase Jesse Livermore, you make money from taking an opinion and being right.

Nutmeg said...

Enrie,

If you were to use options instead of stocks for a pairs trade , how exactly would you do that? The problem you would run up against is that that usually options can be traded in specific market lots only in most markets. If you have stock A with market lot X and Stock B, has a market lot Y, and if you find that A&B are cointegrated pairs and from OLS you get a Beta of say Z (stocks of B for every A), the problem is when you try doing it with options, the amount Z might not be trade-able because the ratio of market lots might not be a factor of Z! This problem usually does not arise because the market lots of equities are usually much smaller (even if there is one) and in most cases, even ONE share can be traded.

How do we deal with that. Will applying a constraint on the Beta such that it is a multiple of the hedge ratio a way to go to find out if there is cointegration under such cases ? Or is it just okay to ignore market lots, just generate the buy/sell/exit signals just like you would do for equities and trade the options in the ratio as close to the one suggested by the OLS for equities?

Ernie Chan said...

Nutmeg,
Even when we trade ETF or stock pairs, we usually trade round lots instead of odd lots. Some brokerages won't even allow odd lots trading. So there is no difference between trading 1 option or 100 shares. You just need to be prepared to trade large sizes!

Ernie

Ken said...

I saw the Ehrman book in the list of books at the right of the web page. I interpreted this as a recommendation by Ernie - an endorsement - a book that Ernie himself found useful. I went to Amazon and the reviews there are awful (apart from two dubious 5 star reviews from authors who have not reviewed any other book). So, I searched this blog and found "Erhman" in a comment by a reader and then a note from Ernie that he is adding it to the list. So, Ernie, may I ask whether you are familiar with this book or not and whether you truly recommend it or not?

Ernie Chan said...

Ken,
I personally have not read Ehrman's book, but as you saw, I made the recommendation based on the reader's comment and the fact that there isn't any other book on pair trading different stocks using options that I know of.
Ernie

Anonymous said...

Hello Ernie,

According to the IB website, they allow MOC orders for options.. Haven't tried it myself though.

http://www.interactivebrokers.com/en/trading/orders/moc.php

If you were unable to use the MOC orders and your strategy involves the closing of your option positions at the close , how would you implement that ? Obviously you can't use LMT orders as it may not execute, so MKT ???

Also one question for the more experienced options traders please. For stocks in the SNP500, typically how wide are the bid/ask spreads (%wise - roughly) for ATM options with about 30 days to expiration ?

The reason I ask is that I trade several mechanical systems on stocks within SNP500 and I would like to change the tradable instrument from stocks to options. So what I was thinking was OK, everytime I pick up (buy) a new stock position, I will automatically submit an order to purchase an ATM Call with about 30 days to expiration using MKT orders.

The expectancy from trading stocks is good enough for me to want to take every available position. However, when I convert this strategy over to trade options using MKT orders, I could get slaughtered if the bid/ask spread is too large.

Many thanks in advance.

Bing

Ernie Chan said...

Bing,
I am not sure that MOC orders for options are applicable to all options exchange (if any). For e.g., IB did not list CBOE as an exchange with this type of orders.

I used MKT orders to exit near the close.

My experience has been that the options markets is too illiquid for many stock strategies (equivalent to your saying that bid-ask spread is too wide.)

Ernie

Brendon said...

I am using quant2ib as well, and have the same issue of not being able to retrieve deltas (or use the getOptionsChains function at all). I contacted the developer on July 7th, but have heard nothing about it, even after repeated requests.