Category Archives: strategy development

Will We Ever Kill The Bug? The Enhanced Permanent Portfolio

Will we ever kill the bug

There is something very attractive about vintage items that just won’t die.
 

They just keep coming back. Same philosophy but better up-to-date technology.

It’s not just cars. It’s investment strategies, too.

Vintage strategies are often simple, easy to execute and provide amble ‘out-of-sample’ data. In other words one can see how they performed in real life years after they have been proposed. And like the VW bug, they are “safe” choices. Tried and true.

Can you imagine a 1965 VW running in the Autobahn? 
Although the essence counts for a lot, for the car to survive at today’s highway speeds the tech needs to be up to date.

So let’s take my favorite oldie and bring it up to speed:

Harry Browne’s Permanent Portfolio investment strategy.

From Investopedia:

… Browne believed that each of the aforementioned four asset classes would thrive in one of the four possible macroeconomic scenarios that exist.

  • Stocks would thrive during periods of economic prosperity.
  • Bonds would do well in deflation and acceptably well during periods of prosperity.
  • Gold during periods of high inflation would rapidly increase in value as the only true defense against a deteriorating currency.
  • Cash would act as a buffer against losses during a routine recession or tight-money episode, and would act well in deflationary times.

So let’s see how it has performed.

The original rules:
25% in a stock market Index (SP500)
25% in Treasuries.
25% in Gold.
25% in Cash or similar.

Permanent portfolio version backtest

Not bad. Annual return is 7.1% and maximum draw-down comes in at 17.84% since 1992.

For a far more detailed analysis of the so called “PP” you can see Gestaltu’s excellent “PP Shakedown” series as well as Scott’s Investments analysis. There are many other articles and analysis that serve as inspiration to this article.

Building a new investment strategy.

So let’s update this permanent portfolio strategy by using some recent tactics. All further rules assume monthly rebalance.

Read the rest of the article about how to improve on Harry Browne ‘s Permanent Portfolio at the Logical Invest’s whitepaper section or track performance at the Logical Invest site.

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:

 Conclusion:
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: 
Dayreturn=ROC(C,1);
AutoCor=Correlation(Dayreturn,Ref(Dayreturn,-1),22);

Simple Regime Switching for SP500

black-in-white-big-300x225
image from  http://brucekrasting.com/

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.

2013-08-21_0314-300x219

Mean Reversion Trading On SP500
2013-08-21_0315-300x220
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.

2013-08-21_0313-300x215
Here’s the Amibroker Code:
 <!–more–>
Dayreturn=ROC(C,1);
AutoCor=Correlation(Dayreturn,Ref(Dayreturn,-1),22);
BuyContr=RSI(2)<20;
SellContr=RSI(2)>70;
BuyMom=RSI(2)>60;
SellMoM=RSI(2)<50;
Buy=IIf(AutoCor<0,BuyContr,BuyMom);
Sell=IIf(AutoCor<0,sellContr,sellMom);
SetTradeDelays(1,1,1,1);
BuyPrice=SellPrice=O;
qty=1;
PositionSize=-100/qty;
SetOption(“MaxOpenPositions”,qty);

Strategies on The Cloud: TAA on Google Docs

Did you want to have a strategy on the cloud that monitors the market and updates you on new Buy/Sell signals (as well as number of shares, etc)  by email. Did you want to run it on best of breed “always ON” servers with free and accurate data?
How much would that set you back?Well, Nada! Courtesy of Google.This post will guide you through coding a simple Tactical Asset Allocation on Google’s Docs.
You need:
1. A Google account.
2. Google Docs.The system is similar to Faber’s TAA model using 5 Etfs.: SPY,TLT,VNQ,EEM,DBC
We buy or sell at the beginning of the month ONLY.
If Close > 200-moving Average then we buy the ETF.
If Close < 200-moving Average then we sell the ETF.

Pseudo Code:
If TodayIsNewMonth AND CloseETF>MA(200) Then Buy
If TodayIsNewMonth AND CloseETF<MA(200) Then Sell

Let’s get started. Go to Google Docs and create a new SpreadSheet. Call it TAA_5.
Once the spreadsheet is open in your browser, go up to the menu and select Tools–>Script Editor…
This should open a new script Editor. Select “SpreadSheet” as your project.

TTA5g-300x152

Lets start coding.
Google Docs scripting uses a version of JavaScript which seems fairly easy for non programmers.

Continue reading Strategies on The Cloud: TAA on Google Docs

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