Disclaimer: I am not an investment advisor. When I describe my own trading activities, it is not intended as advice or solicitation of any kind.
Showing posts with label trend. Show all posts
Showing posts with label trend. Show all posts

09 November 2012

CS|MACO Wakes Up

On Thursday morning, the American Association of Individual Investors' Sentiment Survey showed that 38.5% of their (paying) members reported being bullish. This was up 2.8% from the previous week. At the end of the trading day on Thursday, SPY closed below its 200-day moving average, down $5/share, or 3.5%, from Tuesday's close.

This close below the 200-day moving average caused CS|MACO to signal a position-closing trade. Don't remember what CS|MACO is? I don't blame you - it's been very quiet since May, when it went long SPY. As a primarily trend-following trade, the longer it holds a position the more likely it will make serious money. But unfortunately, it also means it will give back a large proportion of its profits when the market turns against it.

This position was typical. CS|MACO signaled a buy on May 10 when the folks who feel obligated to pay AAII for the privilege of filling out a weekly sentiment survey reported that they felt profoundly un-bullish (only 25.4% of them were optimistic). That entry at 136 was about 1/3 of the way through a down-move in the S&P that bottomed on June 4 at 128 (closing price), only to rally throughout the summer to a high of 147.20 (closing price) on September 14 - one of my favorite days of the year. Since then the volatility of the S&P has been increasing and it has been drifting lower through a series of bounces. I knew it was only a matter of time until the 200-day moving average was crossed.

CS|MACO will stay out of the market until one of the following occurs:

  • AAII comes out with a bullish number below 27.5% (buy signal); or
  • SPY closes above the 200-day moving average again (buy signal); or
  • SPY closes below the 200-day moving average, and it in turn closes below the 300-day moving average (short signal). That will be a while.
Just for fun, here's a little chart that plots the weekly prices of SPY (taken on Wednesdays) and the AAII bullish sentiment number. I've limited the time range to be the period of CS|MACO's latest position; that is, May 10-Nov 8.


Including dividends, CS|MACO is up about 4% on a Return on Investment basis since its inception in September 2010. Not a great track record, but I'm sticking with it for now. 

28 October 2011

CS|MACO: Out At Last

The CS|MACO trade has been long SPY since Mid-March, entering back then on excessive bearishness on the part of the survey-responding individual investors of the AAII (Association of American Individual Investors). It finally exited this morning on excessive bullishness from those same investors. Since it's been such a long holding period, a review of the trading methodology might be in order.

Every week, the AAII solicits a survey from its members about how they feel about the market that week - bullish, bearish, or neutral. Then they publish the percentages of each of those numbers on their website in time for trading on the open on Thursday morning. Long-term analysis has shown that these respondents get more bullish the higher the market goes, regardless of other factors, and they get less bullish the lower the market goes.

My own back-testing indicates that there is a significant skew to the results, which I think is best explained in the psychological terms of a typical "amateur" investor. Having been burned before, this investor remains bearish or neutral until the market is so strong that he can no longer deny its strength. Then he flip-flops his opinion, deciding that it's a bull market after all, and buys shares. As the market rises and falls, he is unable to separate himself from his position, rationalizing his losing days and patting himself on the back for his winning days - despite being a passive holder of shares who didn't really do anything. When the market enters a downtrend, he continues rationalizing his position longer than he should, telling himself it's okay because "it's a long-term trade," or "it's a minor correction," or "they're just shaking out the weak hands." He remains bullish until the moment of capitulation, finally selling his shares in despair.

This is a classic investing behavior that is driven by the sunk-cost fallacy. This dilemma is usually explained in terms of movie tickets: you bought the tickets, but the movie sucks and you want to leave. But you don't leave, hoping against all odds that it will get better, because you don't want to "waste" the price of the ticket. While this example is very easy to understand, and most of us have experienced it directly, it doesn't map perfectly to an investing situation. So let me attempt to redraw it.

You bought shares in a company, excited because you felt that they were developing the next great product sure to be on everyone's list during the Holidays, and you reckoned the stock was under-priced. Unbeknownst to you, the management team was running the company into the ground by taking crippling salaries and under-funding research and marketing. For months, the stock slid steadily lower for no apparent reason. Your initial investment fell by 10%, then 20%, then 30%. Every month, you reviewed your holdings and couldn't bring yourself to sell, because:

  1. Rationalization: Maybe when that new product comes out, things will be different. Rebuttal: What was your target return on that product at the beginning? 20%? 40%? What kind of a return do you need to get now just to get even?
  2. Rationalization: If you sell now, you'll never make the money back that you've lost. Rebuttal: If you sell now, you can invest in something else with a higher probability of return, enhancing your chances of profiting from now on.
  3. Rationalization: You bought this company because you felt it was under-priced. Now it's an even better bargain! Rebuttal: Imagine how great a bargain it will be when it goes bankrupt.
Does any of this sound familiar? I'm not immune: I bought Yahoo in 2000 for $100, $80, and again at $40 before I finally capitulated and sold at $20. That sure was a good tax write-off. But I digress.

This psychology is important to CS|MACO because the trade seeks to get long when the typical investor described above finally gives up and dumps his shares in despair. This is the moment of capitulation, and it generally marks the bottom of a correction in the market. Because most individuals are long-only investors, using the inverse doesn't work so well: it makes no sense to get short when everyone is exuberantly bullish. Also, long-term up-trends are much more common than long-term down-trends - market corrections tend to be much faster and more violent because of the pain-avoidance behavior described above.

Since long-term up-trends involve ever-higher bullishness on the part of investors, it is frequently the case that the AAII survey gets so bullish that CS|MACO gets an exit-long signal long before the end of the trend. The MACO component compensates for these premature exits by keeping the trade long as long as the daily close price is higher than the 200-day moving average, and the 200-day moving average is itself higher than the 300-day moving average.

As a matter of fact, the rally that SPY has been enjoying since its low on October 4 is very close to reaching that 200-day moving average. So with a little more buying and a little less bullishness (aka irrational exuberance), CS|MACO might find itself right back in that position.

So how did it do this time around? Including dividends, it's a 3% return. It's not a tremendously exciting strategy.

15 October 2011

Dipped in Gold

With all the Arch Linux posts lately, loyal readers may be tempted to think I have given up the aggressive-investing game. Not true. I recently completed my trade of the year with those out-of-the-money GLD calls I wrote about back in August. I bought them for 25c a share, and sold them for various prices, a few as high as $8. All told, those calls netted something on the order of 800% return on premium paid.

As I exited the last of those calls, GLD was in the midst of its toughest correction in the past few years. I bought my first shares of GLD in 2009, but even looking back as far as 2006, I don't see a correction as violent or as deep as the one we just completed. Gold bulls were hit with a triple whammy: a technical double-top formation around the end of August was followed by the Fed failing to signal much more in the way of monetary stimulus. As the investment world started its usual flight to quality in the face of disappointing developments, the CME responded to the increasing volatility in gold futures by raising the margin requirements. Everyone in the trading community still remembers how margin increases sparked the recent Silver panic, and so it is no surprise that GLD gapped-down two days in a row in the last week of September. It shed 8% of its value in two trading days, which is a pretty dizzying fall for a physical commodity unaffected by droughts and floods like gold.

The gold haters came out in droves, claiming this was the "popping of the bubble", and giving target prices of $700/oz (about $70/share in GLD terms). I stepped away from leverage on GLD, which I had planned to do during the fall, anyway, since September-October has historically been a bad season for gold (I have no idea why, it's not like there's a harvest or something). I gritted my teeth and held onto my outright shares of GLD, the straight-up gold ETF, and GDX, the ETF comprised of gold-mining companies. And I bought a few more shares of GLD on the way down, but far too soon (169). I admit I started worrying that the bubble was popping, too, but those fears are past.


Does the chart above look like a bubble to you? I have added a 100-day simple moving average to the price of GLD over the past 3 years. Notice the double-top, with a high of 185, and the two days of down-gapping shortly afterward. But also notice that GLD stopped its free-fall at the 100-day trendline, and resumed the trend. That's not a bubble-pop, that's the start of the mania phase.


Here's another chart you might recognize, this time of the NASDAQ from 1996 through 2002. See how there are corrections back to the trendline throughout the 1990s? Some of them undoubtedly looked like The End at the time, but those corrections ended up looking like little squiggles in comparison to the mania phase starting in late 1999, and of course the multi-year sell-off afterward.

So I'm looking to buy dips in gold again, since I think we'll start another leg up in this market sometime around year-end. I've already bought some shares in GDXJ, an ETF comprised of smaller-cap mining companies, and some calls in GDX, expiring in January. Both are already priced higher than where I bought them, but I can't take credit for that -- it was just an effect of the risk-on-risk-off hokey-pokey the markets have been dancing since 2008. At the moment, we're putting a foot in, so all risky assets are going up. Later, we'll take it out, and they'll all fall again.

Why mining companies instead of gold itself? I mostly prefer to trade the metal on its own, so as to slightly reduce the vast number of variables acting on my investment, but we are entering Q3 earnings-reporting season. There will be a lot of bad news coming out of the tech industry (Google's blow-out notwithstanding), and a lot of good news coming out of the mining industry, as gold miners realize higher and higher prices for the more or less constant rate of supply they are pulling out of the ground. Also, mining companies have lagged behind gold prices during this bull market. If they close the gap, I'd like to be there to profit from it. And finally, dividends. Gold doesn't pay a dividend, but miners do. Consequently, I might look to buy a few outright shares of individual mining companies so as not to dilute my dividends through the GDX ETF.

I have some trades unrelated to gold in progress, too, but that's another post.

20 April 2011

Revamping CS|MACO

NeighborTrader and I have been talking a lot about back-testing lately.  Back-testing is when you take a bunch of historical price data, and push it through a trading strategy to generate buy/sell/close signals as if you were running the strategy at that time.  Then you see how the strategy did, and try to extrapolate how it might do in the future based on those results. Ever hear the phrase: "Past performance is no guarantee of future results"?  Well, the same applies to back-testing, but a little information is better than no information at all.

NeighborTrader back-tested the CiG trade before he ever talked to me about it last fall, and he's been combing through data ever since to find more trades he can run.  I've been meaning to do the same with CS|MACO for quite some time, and I finally did this weekend.  I learned some interesting things, and I found a few changes I want to make.

I grabbed daily historical prices for SPY from January 1993 through March 2011.  I also grabbed the AAII sentiment data for that same period of time.  I wrote myself a little Python script to collate the data together, and then plugged all of that into a spreadsheet that created signals just like my present-day trading spreadsheet.  To this, I added some calculations to figure out the results of the trades, and compare them to simply buying SPY and holding it. 

As designed and outlined in this post, CS|MACO underperformed SPY over the 18-year period from 1993-2011.  Then I abstracted away all of the parameters so I could change them easily, and started playing around.  Next I evaluated various time periods based on the sort of market they covered: I looked for bullish and bearish periods, triangular moves up and down, and sideways choppiness.  I compared CS|MACO against SPY in bottom-to-bottom and top-to-top time periods, as well as a simple 5-year rolling time period throughout the 90s.  Once I had a feel for how CS|MACO behaved in various market scenarios, I started changing the parameters, and learned some things.

The first thing I learned is that the 25/200 moving average crossover component of MACO is far too responsive, and tends to trade into choppy sideways markets, losing money on every reversal.  To catch the really big trends, much bigger moving average periods, and more similarly sized periods, are far better: 200/300 seemed to be a good mix.

The next thing I learned is that the arbitrary 10% collar I have on the CS component is about right, but only for the buy signal.  This outcome was fascinating, and I think it gives insight into individual investor psychology.  If I'm right, it means that the CS buy signal (which is based on below-average levels of bullishness in the survey) is a leading indicator while the CS sell signal (which is based on above-average levels of bullishness in the survey) is a lagging indicator.

Bear in mind, this all just my viewpoint: I think we as humans tend to invest our emotions as well as our money, and we are very slow to accept that we are in a losing position and get out of it.  On the other hand, we are much quicker to jump into a new position if we think there is opportunity there.  The vast majority of us do not short-sell anything (my father thinks it's un-American and somehow Satanic), and so statistically, investors tend to become bullish faster, and become bearish much slower.

To handle this lopsided behavior, I changed things so that I could control the bullish/bearish thresholds independently.  Then I tried turning one and then the other off by setting them so wide that the indicator could never reach them (+/- 100% certainly works).  I discovered that turning CS off entirely made things worse: MACO, by itself, is not a winning strategy.  Actually, let me be clear: it does have positive returns, but it does not beat SPY itself.  Turning on only the buy (bearish investors) signal had the most positive effect. 

So, how about the results?  In rolling 5-year periods, CS|MACO was profitable in just about all of them - can't say that for SPY, not by a long shot.  When it beat SPY, it beat it badly; when SPY beat it, it wasn't nearly as big a difference.  The best part is that CS|MACO tended to diverge up from SPY in down markets, and pace it fairly well in up markets.  It really only lost ground in prolonged sideways chop markets.  And by prolonged I mean like longer than a year of nothing but sideways chop - that's pretty rare.

A big danger of back-testing is sample bias, also known as curve-fitting or false optimization. This is where you optimize your strategy against all the data you have, and assume that tomorrow will just like your data sample.  In a perfect world, we would like to use a sample of, say, 1995-2000 to train our strategy, and then make sure it still works from 2000-2011 before committing real money to it.  This is called split-sample testing.  However, I feel that the behavior of the markets and the attitudes and psychology of the individual investors have changed somewhat over the last 18 years.  For me to find a strategy that works well in the 90s, and expect it to continue working in 2012 and beyond, is naive.  So I have to flirt with that sample bias problem, but I try to watch for it and be aware that it is always there without falling into it.

Below is a graph that compares SPY to CS|MACO for the whole 1993-2011 period.  SPY is the red line, and CS|MACO is the blue line.  Notice how when SPY suffers, CS|MACO profits.  This makes it a very viable strategy for running alongside a standard retirement account holding index funds.  And for me, that's just perfect.

(click for the original size)

16 March 2011

Keep Your Head Back

Let's lead this one with a chart, courtesy of BigCharts.com.  I'm using SPY here as a proxy for the S&P 500... mostly because I couldn't figure out how to hide the volume, and the index's volume is empty and boring.  The shape is the same, so it doesn't matter.  It looks a lot like the first 60 seconds on an awesome roller coaster.



Let's put this in perspective.  This is a 6-month chart, so it goes back through mid-September.  SPY was somewhere around 112 back then, and it closed at 126.xx today.  That's a 12.5% return over 6 months, or 25% annualized.  Wow, what a great stock market!  OK, yes, from the high of 134.xx one month ago on February 18, SPY is down 6%, or 72% annualized -- but of course if you really think it's going to continue at this pace for 11 more months, I have some swampland to sell you.  But let's look at the last month, shall we?

  • Major unrest in the Middle East, including full-scale revolt in many of our oil suppliers, has caused Crude Oil futures to shoot up above $100/bbl (only $98/bbl today - what a bargain): well into production-drag territory;
  • Japan suffered the worst earthquake in... what? forever? a long freaking time, anyway, and its nuclear plants are about to unleash a glowing hell on the Pacific Rim;
  • The festering pimples in the European economy are starting to look like they're about to pop one after another: Ireland, Portugal, Greece, etc;
  • The Federal Reserve's credibility is finally starting to be questioned, and major indications have started surfacing that inflation will be a bigger problem than people have been assuming;
  • And Charlie Sheen, OMG.

Watching the activity in the market on Feb 23, I started worrying that we were about to see another Flash-Crash-type event.  The spreads were widening and the markets were looking really jittery.  I bought some puts on SPY, expiring in April.  I still have them, and I see no reason to sell them just yet.  I also have a bullish option spread that simulates a collar in NDX.  It's pretty deep underwater (duh), but this is a continuation of the collar trade I've been running for a long time, and I won't be changing it now.

Besides the stock market, what have been the other financial effects over the last month or so?  And just for fun, I'll talk about my activities where appropriate.

  • The Canadian Dollar roared up and then slunk back, since the Fed-bashing started early on, but the flight-to-quality has taken over the last few days.
    • I bought FXC (the Canadian Dollar ETF) today.
  • The Ten Year Note, in a strong downtrend at the end of the year and trading sideways-to-down through mid-February, suddenly pointed its nose at the sky as of the end of last week and turned on the after-burners.
    • By rights, the CiG trade should be short the ten-year note futures, but I opted for buying S&P futures instead, reasoning that the return on S&P should be more extreme than on Ten Years.  I was right.  I bought S&P on the close, and was just stopped out for my max loss a moment ago.
  • Crude Oil futures traded as high as $107/bbl on March 7, and are back down to $97/bbl now in a pretty (but meaningless) isosceles triangle pattern on the chart.  Daily ranges expanded big-time, as the market tried to constantly adjust to unfolding events in the Middle East.  It's back down now mostly on Dollar strength, I think, but 97 is still far above the 85 it started from in February.
  • Agriculture futures (corn, wheat, soybeans) all have the same triangle pattern as Crude Oil, without the big gap-up at the beginning.  Again, USD strength as everyone runs like hell into something "safe".
    • I hold DJP, which is a commodity ETF which holds 33% energy, 30% agriculture, and 31% metals.  This is a long-term play against the USD that I put on back in January.  I have no interest in selling it at this point -- I only wish I'd bought a long time ago.
  • Gold has traded pretty sideways recently, victim of the risk-on/risk-off tug-of-war that's been going on since Charlie Sheen started distracting us from trivial Middle Eastern matters.
    • I've had big gold positions on for a long time, and just today I sold some calls that are due to expire on Friday, taking a small loss.  When the nuclear crisis in Japan finally settles down, I'll buy some more, because the dollar will suddenly seem like a bad idea again.
Oh, I also had a bullish option spread on SPX that I liquidated today for just about max-loss.  Option spreads are great because they let you define your max profit-loss range and sleep well knowing that you will neither make nor lose more than that range.  I had been fighting the uptrend in the stock market for 6 months, and finally capitulated with this option spread.  I told myself when I suffered a loss I would reverse direction and start doing bearish spreads instead.  That's tomorrow's trade.

26 February 2011

CiG Finally Closed

As I mentioned in my previous post, the Collaboration-is-Good trade signalled a Buy on S&P Futures on Tuesday at the close.  This is a fade trade -- others might call it a mean-reverting trade, but it isn't really, since there is no "mean" we're reverting to.  By fade trade, I mean that it buys on strong dips of otherwise up-trending markets, and sells on strong rallies of otherwise down-trending markets.  So when S&P Futures shed 28 points on Tuesday after trending up quietly and strongly for months, CiG jumped on it. 

I bought S&P futures in my fake-money account at the close on Tuesday for 1314.50.  Wednesday close was 1305.25 (down another 9.50) and Thursday was 1302.25 (down another 3).  If I had simply held that position throughout that time, by Friday morning it would have been down $612.50 per contract, or about 11%.  But I didn't. 

Wednesday morning before the stock market opened, I saw the hard sell-off at 2am from the mess in Libya, and I decided that although futures had come mostly back that night, I should move my stop up to 1312.  Sure enough right after the open, the S&P sold off and hit my stop.  I got a little lucky on the execution, and sold it for 1312.25, saving $12.50/contract in losses.

By the close on Wednesday, the trade was still signalled, so I rebought at 1306, starting at -$112.50/contract.  Thursday was quieter, moving mostly sideways and a little down, and my trailing stop-loss of 10 points ($500/contract) was never hit.  It was still a down day, however, so the trade stayed signalled.

Friday morning, my tour de force of trading skill failed me.  I saw that the rally had finally started, and I wanted to set a closer stop before heading off to work.  Somehow I mis-entered the price, and instead of putting in a stop order to get me out on another big sell-off, I accidentally sold at the market, then 1311, for a reversal in fortune to +$137.50/contract.  Nice to have a profit, for sure, but I didn't want out at that point.

After arriving at the office, I kept an eye on the market and managed to buy back in at 1310 about an hour before the markets opened.  I then set a 5-point trailing stop, which is generally way too little room for this trade, but I was pretty skittish of the stock market by this time; and got to work on my day job.  Somewhere around 11am, after rallying all morning, there was a little market dip that closed me out at 1313, for another $150/contract.  I saw no reason to press my luck further, and closed the trade.

Total profit: $287.50/contract, or about 5% on margin capital.  If I had not been so skittish with my stop order on Friday, the close signal would have come in the afternoon at around 1318.75, profiting $575/contract, or about 10%.  On the other hand, my discretionary trading had a positive impact: if I had just bought on Wednesday afternoon and held on, the trade-prescribed 100-tick stop-loss would have just barely not kicked in at the low on Thursday, so my open-to-close profit would have been $225/contract.  So to recap, my discretionary trading was good, but I got a little more nervous on Friday than I should have.

Making the decision to violate the rules of a mechanical trade in real-time is always a tough judgement call.  Mechanical trades are useful for finding entry and exit points when an emotional human might not be able to pull the trigger on his own.  But blindly following them is not a long-term profitable decision -- despite my active trading behaviors, I believe in an efficient market most of the time.  In this context, that means that if there were a profitable mechanical trade out there, someone has already done it so much that it has been used up. 

By carefully considering whether now is the time to stray off the path laid out by the mechanical trade plan, and using the plan to question his decisions and lend some objectivity to their logic, an experienced trader can enhance his returns.  I'm not experienced enough to do that reliably, but in this case I had the help of NeighborTrader to reason out the pluses and minuses of each individual trading decision, and it worked out very well.

Collaboration, it seems, is indeed good.

22 February 2011

Some Trades Are More Frightening Than Others

Not Frightening
Over the weekend, the Collar trade was assigned on its QQQQ calls, meaning that my QQQQ position was closed out at 58.  After the events over the weekend, and the markets today, that ended up being a great trade all by itself (QQQQ closed today at 57.03, down 1.70 on the day).

The QQQQ Collar trade has been one of the few that I have been running with real money, and it has been going for about 18 months now.  Over the last 18 months we have had, overall, a pretty significant up-trend to the market; and a limited-profit trade like a collar is going to underperform during strong up-trend periods.  Sure enough, I've made some pretty good money in the collar trade: just under 16% in 18 months.  But if I had just bought QQQQ and held it, I would have had a much better return: close to 39% over the same period.  Despite this drastic underperformance, the trade is a success - it is a super-long-term trade, and in losing years, its losses are much more limited than a simple buy-and-hold.  If it had not underperformed, that would be a signal that something wasn't being hedged correctly.

This trade is not without its problems, however.  First, there is a great deal of subjectivity about what strikes to use for the covered calls and the protective put - I tried to solve this problem by setting some range parameters.  Next, I have been running this trade in an online broker that is geared more toward stock traders than option traders.  As a result, its commissions for options are terrible: $10.75 for a one-way one-lot option trade, vs the $1.50 I negotiated with thinkorswim.  When I'm doing 14 option trades a year, plus the fairly frequent assignment fee of $25 followed immediately by the need to repurchase the QQQQ outright for $7 flat, it gets expensive fast.  Finally, I have noticed that the time value on the about-to-be-front-month options drains significantly over expiry weekend.  But since my online broker is very touchy about naked short options, I have to choose between an expensive fee-to-price ratio rolling trade, or letting the premium disappear over the weekend.

Since the collar essentially closed itself out over the weekend, I decided now would be a good time to transfer its required capital to thinkorswim and run it there.  I may retain the stock/call/put configuration, or I may run an equivalent position of a simple bullish vertical option spread.  If I do that, I lose the calendar component of the 6-month put vs the 6 1-month calls, but I'm not convinced that component is valuable anyway.  In any case, I have some research to do before the money transfer settles.

Frightening
Back to fake money, the CiG trade lit up like a Christmas tree today, thanks to those crazy Libyans.  S&P futures sold off 28 points or about 2%, which signalled a Buy at the close.  I have been bearish S&P for about 6 months (it has gained 300 points during that time) but this is a mechanical trade -- my viewpoint doesn't figure into it.  Have you ever tried to make yourself buy something when you don't believe in it and it has just sold off by 2%? It isn't easy.

The gold futures trade last month wasn't easy, either, but it turned out fine; by the law of single-datapoint-patterns, that means this one should be just fine too.  Nevertheless, NeighborTrader and I did have some vertiginous fun imagining that we were each managing million-dollar accounts and thus had to buy 100 futures knowing that each point would make or lose $5000.  That would make today a $140,000 losing day for that account, had it been long that amount.  I think I'm happier in fake money for now.

I also had a preliminary Sell signal setting up in Ten Year Note futures... we'll see what tomorrow brings on that one.

Somewhere in Between
Rounding out the flurry of activity today, the sudden market downturn made the volatility indexes pop about 4 points.  Everyone has heard of the VIX, which measures implied volatility in options on the S&P 500.  Since my iron condor trade is on Russell (RUT), I use the VIX's cousin: RVX.  Anyway, the 4 point pop in the RVX was just what I needed to get a better price on opening an iron condor position, since it is a negative-vega trade.  I put on the 760/770/900/910 April Iron Condor, for a credit of $3.25/share.  Pretty respectable, considering the low-IV environment we've had the last few weeks.  If the RVX is predictive, however, I'll be in for a roller coaster ride this month.

05 October 2010

I Spy a Crossover

I'm running a mechanical trade in paperMoney on SPY that is based on Simple-Moving-Average Crossovers.  I just started running this trade, but I did a little back-of-the-envelope backtesting before I started and I really liked the way it performed over the last couple of years.  Since the 25-day SMA crossed the 200-day SMA to the upside today, it bears mentioning.

There are two competing indicators in this trade: moving average crossovers (MACO) and individual investment sentiment, which I use as a contrary indicator (CS).

Moving Average Crossovers
MACO is bullish when the SPY daily closing price is higher than the SPY 25-day SMA, which in turn is higher than the SPY 200-day SMA.  MACO is bearish in the opposite situation: when SPY closes below the 25-day SMA, which in turn is below the 200-day SMA.  In any other closing price configuration, MACO is neutral/flat.

If this was where it ended, this would be a classic long-term trend-following trade.  It would have killed in 2009, and been killed in 2010.

Contrary Sentiment
The American Association of Individual Investors publishes a set of weekly indicators based on surveys of their members.  They give the percentage of their responding members that are bullish, bearish, and neutral.  I have arbitrarily chosen the bullish indicator, and I use the prior calendar year's average value as a midpoint - this year, that midpoint is 36.8%.  I then set the entry lines 10% above and below that value.  I get a new value from AAII every Wednesday, when they publish the survey.

CS is bullish when the surveyed value is below (yes, below) the low entry line, bearish when the surveyed value is above (yes, above) the high entry line, and signals "exit" when the surveyed value crosses the midpoint.  I basically use it to fade individual investor sentiment, because I think most people are morons - especially those who spend money on a membership to a website so they can donate their time filling out surveys.

So when that bullish indicator is above 46.8%, CS will initiate a "short" signal, remaining in "short" state until the indicator drops below 36.8%.  When the bullish indicator is below 26.8%, CS will initiate a "long" signal, remaining in "long" state until the indicator rises above 36.8%.  I'm trying to only place bets against other investors when it is more or less universally agreed upon how great/shitty the world is.

As a momentum-fading indicator, CS kills in sideways markets like most of 2010 has been.  It gets killed in trending markets like 2009, where everyone got really excited and stayed really excited while the stock market rallied a gazillion points for no reason.

Putting it all together
Now I aggregate the signals thus:
  • If both CS and MACO say "flat/neutral", my position is flat
  • If CS and MACO disagree (long/short or short/long), my position is flat
  • If CS and MACO agree on a position (rare), I take that position
  • If one says "long" and the other "neutral", I'm long (but see below)
  • If one says "short" and the other "neutral", I'm short (but see below)
  • If there was a disagreement (long/short, short/long), and MACO goes to neutral/flat, I do not initiate a position until the next CS survey release is in the "initiate" zones.  I do not "back into" positions.
  • I only use closing prices for the MACO portion, and I trade the next day on the open.  If SPY gaps back through into neutral territory before the open, I treat it as no signal.  This basically just makes the backtesting easier.
In my backtesting, I compared various combinations of CS and MACO to a simple "buy and forget" strategy, resetting the entry price on 1 January each year.  I found that CS tended to keep MACO out of trouble by catching the tops and bottoms of the market trends really nicely.  On the other hand, MACO would keep CS from gritting its teeth and fading a long-term trend for a huge loss.  In fact, as a long-term trend asserted itself, CS would gradually drift into neutral territory, allowing MACO to get a position on and chase the trend.

The combination I describe above didn't consistently beat the "buy and forget" strategy, but: (a) it was a lot more fun; (b) buy-and-forget is what we all already do in our 401(k)s anyway - this whole trade is a diversification, in my opinion.  And, honestly, it has beat the snot out of "buy and forget" so far this year.

Where are we now?
The last entry signal in CS was "short" on 16 September, when the survey came out 50.89% bullish.  It has since drifted lower.  The most recent survey on 30 September was 42.5%, which would not cause a new position, but it remains "short" because we haven't gone through 36.8% yet.  We get a new survey tomorrow, and I'll go out on a limb and predict that it will remain above 36.8%.  In fact, for double-or-nothing I'll predict an up-tick from last week.

MACO, on the other hand, has been flat/neutral since 2 September, when SPY closed at 109.47: above the 25-SMA of 109.09 but below the 200-SMA of 111.79.  SPY has been trading above both of its moving averages since gapping higher over the weekend before 13 September, and today it finally dragged the 25-SMA higher than the 200-SMA at the close, generating a "long" signal:
  • SPY Close: 116.04
  • 25-day moving average: 112.46
  • 200-day moving average: 112.05
With MACO transitioning from "neutral/flat" to "long", there is a disagreement so the trade is flat.