Category Archives: ETF / Stocks

Selling Puts on Breakouts

If someone asked you to sell Puts on the SP500 and hold to expiration, when would you sell them? On a correction or a bullish breakout?

This is a strategy that I came about by accident. I actually meant to do the exact opposite of what I ended up testing…  I can’t say I would trade this as-is but there are some lessons to be learned here, at least for me.

The rules:

When SPY makes a new 15-day high, sell a next-month out-of-the-money PUT.
Pick the farthest strike whose corresponding option price is larger than $0.60.
So if SPY trades at 140, we would try selling the 125 strike. If it’s priced at $0.10, we check a higher strike, i.e.,126, 127,128… until we get to a strike whose option price equals or is greater than $0.60.
If the option looses more than 30% of it’s value at the close of the day (not intraday), we sell it on the next day at the close.
Otherwise hold to expiration.

Annual Return: 11.73%
DrawDown: -10.11%

Just to get some context:
You need to contrast the above chart to the typical Put-selling strategy. High win ratios (i.e., winners > 80% of the time) but when we have loosers, they are usually huge ones.

PnL of typical option selling strategy

Thoughts and Conclusion:
Having tried different versions of strategies that sell naked options, I can say that I would recommend against it. And if you must, please try to somehow backtest the strategy first.
My results have been mediocre at best. The risk of being short an option is just too massive. One loss may cripple months of winning. Stops may help but they tend to level the winning ratio and often cause multi-year flat equity curves.

Another conclusion is that complex option strategies can be thought of as  multi-strategy (MS) systems. In other words, a Buy-Write strategy, where one buys SPY and sells a call against it is nothing more than:
Strategy 1: A (very simple) long only  SPY stock strategy.
Strategy 2. A (very simple) short only call strategy.

Similarly, an Iron Condor is a simplified 4 strategy MS system.
All this is still work in progress as other factors like early exercise are being looked at.

What is interesting about the above strategy is that :
1. It’s not intuitive (to me at least) that one would sell Puts on Bullish Breakouts*.
2. It limits draw-downs by not triggering unless we have a breakout on the long side. So if the market falls and keeps falling, this strategy stays flat.
3. A 30% stop on the option is a very tight stop. It means that  even a small move against us will immediately trigger an exit. On the other hand, by exiting on the next day close, we take advantage of mean-reversion. So if a 1% move down of SPY triggers the exit, chances are the next day will be an up day and we would sell (cover actually) at this up day’s close.

*This is counter-intuitive since a bullish breakout would imply a collapse of implied volatility premium on the option to be sold. It’s a proposition to sell on low premiums. Intuitively one would sell on bearish breakouts, where implied volatility surges causing the put to be more expensive (and us collecting a higher premium).

Backtesting Options: Selling SPY Puts on RSI(2)

Let’s try the good old strategy for RSI(2) mean reversion.
Buy on Rsi(2)<30
Sell on Rsi(2)>60
Execution is on the Open of the next day.
This is what trading the SPY etf looks like.

How about using the same signals and selling 10, 1-point away from the floor price, front month Puts.*
Again, we sell 10 Puts right below the SPY price. 
So if SPY is at 145.7 we would sell the (floor(145.7)-1) 144 strike Put.
We sell the front month before the 11th of the month, otherwise we shift to the next month.
We cover the position on an Rsi(2) sell signal or let it expire.
All Buy and sells are on the next day Close and on the ask for buy orders and bid for sell orders.**

Of course there are money management differences: The top chart reflects %-of-equity money management (hence, the compounding), while the bottom does not (it buys 10 contracts, rain or shine) . But otherwise, I am surprised at the similarity in the shape of the equity curve. Where is the extra time premium I would expect on buying the fear? 
How about selling further out of the money Puts. 1–>5 points away from the current price:

Similar results. Any thoughts?

*Many thanks to Dave. for his help.
**I will caution the reader that backtesting options is fairly involved and may contain errors including but not limited to: historical data errors, programming errors, underestimation of slippage and execution costs, unrealistic assumptions on price fills, etc. I use EOD data, so there is no information on the open/high/low of the day. 

CBA – Quick test drive

Inspiration strategy:

Quoted from
“We propose a model that is designed to identify bull-market and bear-market regimes. We examine correlation between stocks and bonds as a signal. Our hypothesis is that negative correlation between long bonds and stocks represents a bear-market regime, and a positive, or non-existent correlation, reflects a bull market regime.The model calculates rolling 90-day correlation estimates between the S&P 500 and long-bonds. At each month end, the model computes the 60-day MA of the correlation against the 600-day MA of the correlation. If positive, the model invests in risk; if negative, the model invests in riskless.”

I will do a different kind of implementation so my results will differ due to different data and different strategy. When referring to correlation I will be referring to the correlation of the SP500 to the inverse of the 10-year Treasury yield.

The system will either be long the SP500 or be in cash.
Each month it will look at the short and long term correlations and if stocks/bonds tend to be more correlated than usual, it buys the SP500. If not, it sells it and holds cash.

I will be using yahoo free data: ^GSPC (S&P500 Index) data as the “risk” asset and (1/ ^TNX, the reverse of the 10-year Treasury Yield) to represent long-bonds.

We ‘ll keep 2 parameters optimizable and lock the long moving average period to 600, to keep things simple.
Params [90,60]
a. CorelationPeriod (default=90)
b. MAshortPeriod (default=60)

Buy=MoreCorrelated=MA(Corr,MAshortPeriod )>MA(Corr,600);

 The above graph is using params [90,60]

Just for fun let’s do the exact opposite: We will buy when the short term correlation is less than the long term one. Same parameters.

Let us optimize the parameters to get a better sense of what is happening. Is there a “general acceptable area”?
params: [10–>300 10–>300]

There seems to be a “better” area of settings than the one we are using.
Let’s try the backtest with params [40 220]. In other words we are calculating correlation using a 2-month window. We are then comparing the almost yearly moving average of that to the 600-day longer term one.

Using these optimized parameters, what would trading the 5 core etfs would look like? Risk on means buy SPY,EEM,EFA and VNQ. Risk off means buy IEF.

The equity is for the whole 5 -asset system. The lower pane shows the Emerging Markets time series (NYSEARCA:EEM).
You can see from the lower graph, this system did not buy EEM for the whole 2010-2013 period.

Going back to just trading the SP500, what would happen if we added the simple MA rule. Buy as before but only if price is above it’s 200-day moving average. Sell as before but also sell if price is less than it’s 200 moving average:

Disclaimer: This is a quick and dirty try-out of whether stock/bond correlation can help differentiate bull/bear regimes. It’s not meant to be precise but rather to get you started in performing your own tests.

Few thoughts on TAA:
I will caution the reader that when it comes to “TAA” strategies, for the past few years, holding both the S&P500 (SPY) and bonds (IEF) was an exceptional strategy whether you timed it or not. That is mostly due to the fact that IEF, the 10-year treasury proxy had both an exceptional run and a fairly uncorrelated one to the stock index. As others have mentioned, TAA systems may have a hard time delivering if Treasury yields stop dropping (below zero..?). But one way to look at the typical TAA strategy is that it is a diversified “short-the-dollar” strategy. Looking at it that way, there is room to diversify to non -U.S. denominates assets.

The code in Amibroker:

/----Code by Sanz P.-----------------------------------------------------// 
MAperiods=Param("MA Periods",200,100,400,5);
Corrperiod=Optimize("corr Period",40,10,300,10);
MAshort=Optimize("MA short period",220,10,300,10);

Buy=MoreCorrelated AND newmonth;// AND abovema;
Sell=(!MoreCorrelated /*OR !abovema*/) AND newmonth;
Buy=!MoreCorrelated AND newmonth ;
Sell=MoreCorrelated AND newmonth;
PosQty =Param("How many Positions",1,1,20,1);
SetOption("MaxOpenPositions", PosQty );
PositionSize=-96/PosQty ;

Seasonals – SP500, Euro

Here’s the strategy:
Each month we buy at the Open of the first day of the month and sell at the close of the last day of the month.

Here’s the average profit loss for the S&P500 Etfs, SPY  (yahoo:SPY). Data from 1993.

This chart shows that for example if we bought every December @ the open and sold at the end of the month @the Close, we would average a 1.97% profit.
But is average profit, alone, a good indication of profit loss potential?

One way to look at this is his:
Mr. X., a french expat and a bon viveur, wakes up and just feels like gambling. He takes a trip to the nearby casino. We ‘ll call it the Casino “Royale”. He enters the lobby and is presented with 12 different slot machines.

Mr. Francois is the oldest employee of the Royale and has been there since the very beginning. His job is to record the history of those machines. How many times each paid off and how much. 
Mr. X and Francois are buddies. So Mr. X has access to Francois’ notes. 
Francois keeps telling Mr. X, that past does not guarantee the future: If machine #3 paid off 100% of the times it was played, does not mean that it will pay off the next one.
But if it did, if the winning rates and payoffs were “stable”, ie, we expected future statistics to be similar to past statistics, which machine should Mr. X choose and how much should he bet?
The answer to both is the Kelly criterion: f=(bp-q)/b

f* is the fraction of the current bankroll to wager;
b is the net odds received on the wager (“b to 1”); i.e., if you play $1, how much do I win/loose.
p is the probability of winning;
q is the probability of losing, which is 1 − p.

The bigger the probability of winning and the bigger the money paid per $1 bet, the bigger Kelly becomes. . Which only makes sense since we want to play games with big winning percentages and large payoffs. So we can use Kelly as an “indicator” to tell us what would be our “best” bet.

So again, here’s the SPY chart using Kelly instead of Average Profit.

For December here are the stats:

NumOfwins[12]: 14     – i.e., 14 Decembers were wins
NumOfloss[12]: 6        – i.e., 6 Decembers were losers
AvgWin[12]: 2.6075
AvgLoss[12]: -2.02946
Certainty[12]: 70             – i.e. 14 winning Dec’s out of 20 = 70% winning prob.
EXPECT[12]: 1.21641
KELLY[12]: 0.466505

So now that we got all that out of the way, here’s a longer term chart for the SP500 (^GSPC) with data since 1960:
Here you can visually see where the “sell in May and go away” saying comes from. Again, this is historical stats. Doesn’t mean they predict the future.
Probably all this is known to you: The best months to have invested on the SPY are November and December and the worst are May to October. 
And why am I posting this now? It’s already the end of December…
So here’s another seasonal for my European friends that have lost much of their purchasing power over the last 2 years.
This is the Euro (using the Futures prices, since 1995). Keep in mind that the Euro has had a bullish bias through most of it’s history. But look at January:

Approximate continuous “averaged” EURO graph Jan. to Dec

Past returns may not be indicative of  future returns.

Connors RSI – Part 1

One of the readers of this blog, Mark, alerted me to a new indicator/system published from Connors/Alvarez : The ConnorsRSI.

What is the ConnorsRSI?

It consists of three components:
a. Short term Relative Strength, i.e., RSI(3).
b. Counting consecutive up and down days (streaks) and “normalizing” the data using RSI(streak,2). The result is a bounded, 0-100  indicator.
c. Magnitude of the move (percentage-wise) in relation to previous moves. This is measured using the percentRank() function.

The formula given is:
ConnorsRSI(3,2,100) = [ RSI(Close,3) + RSI(Streak,2) + PercentRank(percentMove,100) ] / 3

Bottom line: Connors/Alvarez have used similar indicators in the past. What is happening here is that they are creating a more robust indicator by averaging the three. They are “normalizing” the three indicators (rsi, consecutive moves and magnitude of move) to a 0-100 range and then averaging.

Connors/Alvarez propose a strategy that uses the Connors RSI coupled with other rules and filters on large section of U.S. Stocks.
In this post we’ll test the indicator on one security only, the SPY etf (as a proxy for the SP500).

Test A –
Instrument – SPY
1. Using ConnorsRSI(3,2,100) – We ‘ll call it Crsi.
2. Buy on Crsi<15
3. Sell on Crsi>70
4. Buy /Sell on the next bar Open price.
5. Commision of $0.005.

Test B –
The obvious question is whether the parameters are “fitted” to the data. What about using other parameters:
BuyThreshold –>5-50
BuyThreshold –>50-95

Test C –
What about before 1994? We ‘ll use ^GSPC (the SP500 Index).
Same parameters as “Test A”

Detailed results Test A

All trades
Initial capital 100000
Ending capital 336322.84
Net Profit 236322.84
Net Profit % 236.32%
Exposure % 6.55%
Net Risk Adjusted Return % 3606.42%
Annual Return % 6.30%
Risk Adjusted Return % 96.17%

All trades 179
Avg. Profit/Loss 1320.24
Avg. Profit/Loss % 0.73%
Avg. Bars Held 4.77

Winners 136 (75.98 %)
Total Profit 439687.37
Avg. Profit 3233
Avg. Profit % 1.71%
Avg. Bars Held 3.93
Max. Consecutive 11
Largest win 15964.53
# bars in largest win 3

Losers 43 (24.02 %)
Total Loss -203364.52
Avg. Loss -4729.41
Avg. Loss % -2.37%
Avg. Bars Held 7.42
Max. Consecutive 3
Largest loss -35059.29
# bars in largest loss 10

Max. trade drawdown -58157.34
Max. trade % drawdown -23.75%
Max. system drawdown -58157.34
Max. system % drawdown -23.28%
Recovery Factor 4.06
CAR/MaxDD 0.27
RAR/MaxDD 4.13
Profit Factor 2.16
Payoff Ratio 0.68
Standard Error 20256.9
Risk-Reward Ratio 0.5
Ulcer Index 3.5
Ulcer Performance Index 0.26
Sharpe Ratio of trades 2.23
K-Ratio 0.0404