Saturday, March 25, 2017

Markets | The Most Peculiar Positioning Build Up Since US Election

Last week's S&P sell-off was apparently a big news. We had some serious analyses why it happened like here and of course the usual noise about end of Trump trade and reflation trade. Also the indomitable cottage industry of the permabears quickly felt a sense of vindication. However, the real surprise was why it took so long for S&P 500 to suffer a 1% down day. If we have only one 1% down day since October (roughly say 100 trading days), it is equivalent to an approx 7% annualized vol. VIX has been near record low, but at the 12-13 handle, looks quite rich given this 7% realized (or a bit over 8% if the standard deviation of daily returns is used to calculate the annualized vol). In fact the realized volatilities are very very timid and just barely off the historical lows.

In this light one the most interesting development that I suspect few has noticed is the curious build up of S&P option positioning. CFTC publishes the participant-wise positioning data at both futures and combined levels. The combined data is calculated by adding the futures equivalent option positioning (delta equivalent) to the futures data. So the difference between these two shows us the net option positions in delta equivalent terms. And as the chart below shows, it has never been more peculiar.

Among the major categories in CFTC reports, asset managers at present have a historically large short positions in options, against the dealers and the CTA/ leveraged  money managers. This is a remarkable build-up of positions since the US presidential election. It is interesting to note the usual trading incentives of these major players. The dealers are mostly market makers and their positions are in general reflective of other players' views. Leveraged/ CTA funds, to a large extent, are momentum driven. The asset managers on the other hands perhaps represent the most discretionary part, although most of them will be long-only players. In fact they as a group have built up a combined long position after the US election results - no surprise there. Along with this particularly interesting short build up in options space - quite unexpectedly.

The large short delta equivalent option positions from asset managers can be built in two ways. Buying puts - which is a common hedging strategy for the asset managers, or selling (covered) call - which is again a very standard income strategy. But their impact on the market dynamics are quite different. We do not have enough information above to see which one is more dominant. So to do that we look at what the behavior of S&P 500 price itself tells us.

From the chart above, we see the dealers positioning mirrors that of the asset managers. If the asset managers are mostly long puts, that will mean dealers are short puts and hence short gamma. On the other hands if the asset managers are net short delta equivalent in options through short calls, the dealers will be net long gamma (long calls). And since the dealers, as market makers, will tend to run a hedged book - this will lead to some expected gamma signature in the market dynamics. When the dealers are net long gamma, they will tend to sell in a rally and buy in a sell-off (sticky gamma). This will have a stabilizing effect on S&P. The reverse is true when they are net short gamma (slippery gamma), a move reinforcing itself away from stability. We compute an approximate measures of this relationship. First we see the how much the open to low move is reversed by low to close move for each day in a given time period (20 days) for S&P 500. Then we use least square regression to estimate a beta between these two moves. This beta signifies how likely in a given day, a down move will witness opposing flows to reverse it completely or partially. A high beta signifies a large pressure of opposing flow (beta = 1 means all downside move reversed by day end). The major drivers in this reversal will be the dealers long gamma hedging activities and potentially the buy-the-dip or momentum flows from other players (apart from other flows which we assume to have a zero net effect on the balance over a time periods). We call this beta (kernel-smoothed to capture the trend) downside gamma. The chart below shows this juxtaposed with the above positioning data, as well as S&P 500.

The interesting thing to note that during the last large short delta equivalent option positioning build up by asset managers (following Brexit), the downside gamma measure actually dipped, signifying a net short gamma for the dealers, and hence long put positioning from the asset managers. The current positioning, following the same logic, points to a large short call positioning from the asset managers. In fact there were some noises around this in February as well. As a result of this, the recent moves in S&P has been remarkably resilient. However as of last Tuesday's (21st March) data, it seems this long gamma positioning is coming off from the peak. Which has also coincided with a reduction in net short delta positioning of the asset managers in the option space. Theoretically, this means we can now expect a pick up in realized volatility in S&P. And it is time to shelve the buying-the-dip intraday strategy till the next opportunity comes.

Wednesday, March 22, 2017

Off Topic: A Package to Send Text Messages From R

If you often run long processes in R and want to get the results notified to you once finished, but not always around to check it on the terminal, this is a very useful package. 

Of course one option is to send a mail from R (there are quite a few packages for that). However, this may not be a very safe option if you are running the R process on a remote machine (on the cloud). Most mail packages in R will require you to enter your mail password in clean text. While this is okay for your local machine, on the cloud it is a little bit unsafe. Another difficulty is your R process will have to sign in to your mail account (Gmail for example) to be able to send the message. However, your mail provider can refuse - like Google will, citing an unidentified app access. To bypass that you have to considerably reduce your security option in your mail account - which is not ideal.

Texting the message using a third party service like Twilio is a great alternative. They offer a free-tier account (with no expiry as they claim). If you are not a heavy user, my best guess is that will be sufficient in most cases. This package simply wraps the REST API interface from Twilio for the simple text messaging service inside an R package for convenience. All that is needed is signing up for the service and obtain the assigned mobile number, and authentication details and you are good to go. I am not sure about the restrictions on international texts, but this works fine for me for local texts. Results direct to my mobile with insignificant time delay.

You can download the package from here. The installation and usage (pretty straightforward) are in the readme file in the repository.