Category Archives: SPY

Day of month effect on rebalancing a portfolio

In this post we will:

  1. Take a look at a simple, momentum based, monthly rebalanced Equity/Bond portfolio consisting of two ETFs: SPY and TLT.
  2. Search for what has been the optimal dates in the month to rebalance such a portfolio.

Each month we allocate to SPY and TLT.

If SPY has outperformed  TLT we rebalance to 60% SPY – 40% TLT.

If TLT has outperformed  SPY we rebalance to 20% SPY – 80% TLT.

For the first run we will re-balance on the first of the month and close at the last day of the month.

Rebalancing portfolio 1st day

Now will try different combinations of entry and exit days.

Continue reading Day of month effect on rebalancing a portfolio

The end of the end of month strategy

Has the end of month strategy stopped working?

Historically and up to 2013, equities have exhibited a positive bias during the end of the month.
Here is an example of buying the SPY etf on the first down-day after the 23rd and selling on the first up-day of the next month. Trading is at the same day close.EOM_All

This has been well documented in academic papers as well as blogs. The main reason quoted for this persistent bias has been end-of-month window dressing.

As one of my favorite author/blogger/trader, Mr. Grøtte, has also recently blogged the EOM bias is no more.


Why is this important to know?

A lot of investors re-balance monthly. The day of the re-balance used to be somewhat important as there was an EOM bias. So it was better to ‘buy’ at the end of the month rather than at the beginning of the month. As of late (2013) this is less true.

What this means in practice is that the specific timing for re-balancing monthly strategies may be less important than it used to be.

//Amibroker code:
Buy=Day()>=23 AND C<Ref(C,-1) ;//AND C>MA(C,100);
Sell= (Day()<11 AND C>Ref(C,-1));
posqty=Param("nUMBER OF pOSITIONS",1,1,30,1);
PositionSize=- 98/posqty;
bars = 10; // exit after 10 bars
ApplyStop( stopTypeNBar, stopModeBars, bars, True );

From Regime Switching to Fuzzy Logic -SP500

In the previous post I showed how one can implement “regime” switching to create a strategy that switches between a mean-reverting and a momentum sub-strategy.

Can we do something similar (or better) using Fuzzy Logic?

  Here’s the setup: (here for some Fuzzy Logic backround)

We create a basic membership function for the RSI(2) indicator: “Low”, Medium” and “High”
We create a basic membership functions for the Correlation* indicator: “Low”,”High”.

We implement these rules:
1.//mean revert – LOW Autoccorelation
IF “rsi” is  “Low” AND “autocorrel” is “Low”, “Action”, 1 ; //Buy
IF “rsi” is “High” AND  “autocorrel” is “Low”, “Action”, -1 ; //Sell

//MOM – HIGH Autocorrelation
IF “rsi” is “Low” AND “autocorrel” is “High”, “Action”, -1 ; //Sell
IF “rsi” is “High” AND “autocorrel” is “High”, “Action”, 1 ;  //Buy

Here’s the Equity:

As with Regime switching we can use Fuzzy Logic to solve the problem of using one strategy for trading pre- and post-2000 SP500. Furthermore, we have more robust and less specific rules to deal with (buy on “Low” RSI rather than Buy=RSI2<30).

*By “Correlation Indicator” I am referring to the  22-day Correlation (see previous post) between the current return and the previous day’s return. In Amibroker Code: 

Simple Regime Switching for SP500

image from

Let us consider two possible ways to trade the SP500.

1. If the index falls today, we buy tomorrow at the open. This is a “mean-reversion” strategy.
2. If the index rises today, we buy tomorrow at the open. A “follow-through” strategy.

From the graphs below, we can see that neither of these strategies worked well from 1960 to today.


Mean Reversion Trading On SP500
Follow-Thru (momentum) trading on SP500

Let’s introduce a qualifier that will tell us which strategy to trade at what time.

We will try the most basic one: The correlation between today’s return (close to yesterday’s close) to the previous day’s return. If it is negative we ‘ll use a contrarian logic. If the correlation is positive we ‘ll use a momentum logic.

The indicator of choice is the 2-period Relative Strength Index (RSI).

So if correlation between yesterday’s and today’s return is less than zero we buy on a correction. Otherwise we buy on strength. We trade at the next Open.

Here’s the Amibroker Code:

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).