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 moving average. Show all posts
Showing posts with label moving average. Show all posts

04 June 2014

Chart Quiz

Click for a larger view
The chart above is of the S&P 500 futures contract, daily close prices, for the past year (ending with the current price today, 4 June 2014, as of the time of this blog post). The pink/yellow/green lines in the price pane are 100-day, 200-day, and 300-day moving averages of price.

In the next pane we have daily volume. Notice how in the circled area the volume is significantly lower than average. Below that we have an RSI (Relative Strength Index) indicator. This is an oscillating indicator, meaning that the value is always between 0 and 100. The purple horizontal lines through this oscillator pane are the oversold (lower) and overbought (higher) levels. Basically, a trader uses this graph to see if the futures contract has been increasing or decreasing in price lately. If it has been going up a lot, it can be argued that it's a good time to sell, and vice versa. As with any indicator, fortunes have been lost trading blindly along with its output. One has to treat it like another voice in the committee.

In the bottom pane, we have an ATR (Average True Range) indicator. This is a simplified measure of volatility: the value of the True Range as a moving average over 14 days. The higher the ATR, the higher the day-to-day volatility.

I don't think I have ever seen the price action, the volume, and two unrelated indicators line up like this before.

So here's the quiz. Is this chart:

  1. Indicating how healthy and bullish the market is?
  2. Scary as hell?
  3. Completely unrelated?

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.

05 August 2011

Another Flurry of Trades

Remember a couple of days ago I said I thought the stock market was overpriced and due for a correction?  Well I certainly didn't expect it so suddenly.  Since my blog post on 2-August, the S&P has shaved off 6% of its value, dipping as low as 1163.25 (futures) on an intraday basis.  This intraday low represents a -13% peak-to-trough return in the past month. Meanwhile gold rallied hard (at first), making me very glad I hadn't taken my entire call position off.  I had another flurry of trades the last couple of days, most of them defensive.

S&P 500 (proxied by SPY) since 1-Jan-2011

Yesterday, my GLD calls were close to triple the price I paid a few days prior.  I was working a 400% profit order on 25% of them to secure a profit and let me continue to ride the train as long as I could.  As they hit their high, rumors emerged that big London-based hedge funds were getting margin calls on their gold positions.  Our company's market analyst mumbled the announcement about the rumors (a frequent problem lately), and NeighborTrader and I thought he said that the CME was raising its margin requirements on gold futures.  Either way, gold immediately went into a hard sell-off, and I was reminded of what happened to silver when the CME raised its margin requirement a few months ago.  Now gold today is a very different market than silver then, but that wouldn't stop a mini-panic from pushing gold down and keeping it there until my calls expired worthless.  To control the cost of this possible outcome, I sold enough calls to guarantee a profit, getting a trade price only 4c below the high.  Immediately afterward, the calls sold off and are now trading 33% lower.  Whew!  I still hold a little less than half my initial position at about double my purchase price, and if I let it expire worthless I will still make 6% profit - enough to cover commissions.

Gold (proxied by GLD) since 1-Jan-2011

The day after SPY opened below its 200-day moving average, causing CS|MACO to close its long SPY position, the AAII released its weekly investor sentiment survey.  Over 10% of investors stopped being bullish this week, which was enough to get a Buy signal out of the CS component.  Buy + Flat = Buy, so yesterday I bought SPY back at 124.30, which seemed great at the time (it was 3.50/share lower than where I sold it), but isn't looking so wonderful now that SPY is trading at 120.

I was working target exit orders on both of my SPY put positions, which I mentioned in the previous post; I never dreamed both of them would fill yesterday, but then yesterday was an unusual day.  Despite making a combined 56% on those puts, by the end of the day I was kicking myself for not holding the second batch until the market stabilized.  I left a significant amount of money on the table: the position I sold for $7/share is now worth $10.50/share, and the one I sold for $6/share is now worth $8.25/share.  Sigh.  NeighborTrader pointed out that I can't always sell the high, and I suppose he's right.

Yesterday crude oil dropped by $5.50/barrel, or -6% *on the day*.  If you need any confirmation that the global economy is slowing into a new recession, this is it.  Demand for crude waxes and wanes based on industrial activity, and the capital markets are exceptionally good at predicting and magnifying changes in demand.  When crude sells off hard over several days, it's a very bearish economic signal.  On 26-July, crude oil futures hit a high of 100.62/barrel.  Today's low in crude was 82.87: -18% in less than 2 weeks, a very bearish signal indeed.  I had an order working to buy USO at $35, which was filled yesterday during the craziness.  I'll buy more when I think we're near the nadir of the recession.

Oil (proxied by USO) since 1-Jan-2011

After the massive sell-off yesterday, I came in this morning expecting:
  1. a better than expected monthly payrolls number
  2. a big number-driven rally in the stock market
  3. a post-number sell-off to yesterday's close price or lower by the end of the day.

In fact I was so sure about this that I bought Nasdaq futures at about 7:15, 15 minutes before the number.

What happened was:
  1. a better than expected payrolls number (+117k/9.1% vs expected +85k/9.2%)
  2. a big number-driven rally (S&P rallied about 19 points, Dow rallied about 280)
  3. the craziest roller coaster of a day I've seen since the Flash Crash; S&P has had a 60-point range, Dow has had a range of about 460 points.  It closed 3 points below yesterday's close.

I sold back my futures immediately after the number for a $430/contract profit.  It's nice to be right every once in a while, and it's even nicer to be able to make a little money doing it.

The final trade of the day today was that Xilinx (XLNX) sold off enough to hit my target exit on the put position I've had there for a while.  At last glance, I sold the high price of the day in that option market.  That doesn't really make up for the SPY puts, but it's a start.

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)

31 March 2011

Not The Spreadsheet's Fault

Two weeks ago, CS|MACO gave me a Buy signal when AAII.com released a bearish investor sentiment report -- bearish investors correspond well to short-term market bottoms, that's why we call it Contrary Sentiment.  The moving-average crossover component had no strong feelings either way, so the CS-based Buy signal was allowed to generate a system-wide Buy.  I dutifully bought SPY near the open price in my paperMoney account.

A week later, as the market rose, investors relaxed their concerns somewhat and found their bullish mojo again.  37.7% of them gave the thumbs-up to the world, which was outside of the Buy range, but not above the 41.5% required to close the trade.

Finally last night, a new report came out at 41.8%...just high enough to get a close signal.  But now SPY was above its 25-day moving average, which in turn was above the 200-day moving average.  So while CS went from Buy to Flat, MACO went from Flat to Buy.  Flat+Buy=Stay-Long.

If I had managed to put the numbers into the newly-fixed spreadsheet correctly, that's what I would have done.  Instead, I fat-fingered the 200-day moving average, entering 4119.49 instead of 119.49.  The spreadsheet was a little taken aback by this sudden 4000% spike in the long-term moving average, but kept a stiff upper lip about it.  "Guess you better sell, boss," it said.  I sold.

Hey, I got a great price, getting out about 35c above the close for the day.  But first thing tomorrow I'll have to get back in.  And I'm betting that the Employment Situation Report tomorrow an hour before market-open is going to send the S&P up sharply, causing a gap-up in SPY that will cost me for my stupidity.

Can't blame the spreadsheet this time... garbage in, garbage out.

26 March 2011

A Little Success

I had some tough trading days this month, so it's nice to have the kind of success that makes it all feel easy.

In Motion, but In Which Direction?

Research in Motion (RIMM), maker of fine Blackberry-branded devices, is a company built on a fad.  Corporate users relied on their "crackberries" for years, especially when travelling or otherwise out of the office.  But Apple's iPhone was Blackberry's first serious competitive threat, and the flood of Android devices were the second half of the one-two punch.  The fad is over, and RIMM is shrinking. 

For some reason, the investment community doesn't seem to have accepted this obvious fact.  Analysts still talk in breathless whispers about RIMM's upcoming tablet devices (I'm betting it'll suck), and the amazing experience provided by its latest phone operating system refreshes (evolutionary, blah).  Many otherwise intelligent hedge fund managers still treat RIMM like a tech sector bellweather, buying it up on every positive rumor, selling it off again on every fundamental stumble.  As far as I'm concerned, RIMM is as relevant today as Digital Equipment Corp was in 1997.  Unfamiliar with DEC?  I rest my case.

Just like an eccentric hermit who occasionally ventures into the big city for a group therapy session, RIMM lovers are periodically snapped back to reality.  This check happens quarterly, when RIMM reports earnings.  This is my opportunity for one of my very most favorite short-term trades: buying puts on RIMM just before earnings come out.  I have had varying success lately, as bubbly investors drunk on excess Fed liquidity shrugged off what could only be described as luke-warm results.  But overall I believe the trade is a good one, and I had another opportunity for it this week: RIMM reported its latest earnings on Thursday after the market closed.

I bought puts on Tuesday, and when the market rallied, taking RIMM along with it (thus reducing the price of my puts as well as the delta), I bought more on Thursday.  RIMM closed at 64.09 on Thursday, just before its conference call.

Don't ask me how RIMM did last quarter: I don't know and I don't really care.  But I know they disappointed both in their top-line revenue numbers ("oh but look at the continued cost-cutting!" the analysts said) as well as their outlook for the next quarter and rest of the year ("they're in a retooling phase, just like the late 90s!" the analysts screeched)*.  Ms. Market would have none of this posturing and spin management, and she sold that sucker off by 11-12% in after hours trading.  The next morning, RIMM opened at 57.17 (-10.7%), and my puts were up about 80-90%.  Hapless investors who haven't yet learned not to listen to analysts started buying the stock up, topping it out at 58.40 (-8.9%) about an hour after the market opened. 

2-day, 5-minute chart of RIMM showing the 11% drop after earnings
By the way, the first hour of trading is known in the professional trading community as "amateur hour."

I exited some of my puts pretty early, in case the rally had legs, and in doing so I took all of my investment out of the trade - the remainder of my puts were pure profit.  Later in the day, as the dead-cat bounce pattern continued to take shape, I exited the rest at a slightly higher price.  Total return: 90% in 3 days.

* I distinctly remember reading that exact comment ("retooling phase... just like the late 90s") on Thursday night after the release, on a news item linked from Yahoo Finance.  I remember noticing that the related links section at the end of the post included Jim Cramer and other well-known "pundits".  I also remember the analyst giving an unequivocal Buy! recommendation based on how he saw the market reacting the next day (he expected a lot of buyers to step in, for some reason).  Now that the market has spoken, essentially confirming what the overnight traders knew already, somehow I can't find that article anywhere.  Too bad, I would have included a link to it.

CS|MACO: Unnaturally Quiet

First the good news: the AAII sentiment survey for March 23 did indeed reflect a more bullish flock, but insufficiently bullish to make the CS|MACO trade exit the next morning.  Meanwhile, SPY rallied above its 25-day moving average, so I now have a Hold signal from CS and a Long signal from MACO.  Unless CS goes all the way to Short, or SPY sells enough to get a Flat signal from MACO, I can stay in the trade.  SPY is already up nearly 3% from where I bought it on Thursday morning.  One of these days I'll do some more formal backtesting and maximum-drawdown analysis so I can leverage this trade up, but for now I'm content to let it just time an unleveraged entry and exit.

The bad news (and here, my poker friend Missy will start snickering if she's still reading) is that I discovered on Thursday that my spreadsheet that does all the calculations and boils the numbers down to Long/Hold/Exit/Short had some serious flaws that caused CS|MACO to miss two entry signals for smallish winning trades this fall.  Oops.  A craftsman is only as good as his tools, I guess.

The Condor Has Landed

My April Iron Condor managed to finish legging out of its bullish wing at a reasonably good price on Friday, completing the exit of the trade and profiting a nice solid $1.10/contract.  I never had to take any risk-management positions - just reduce quantity on the initial position as I worked my way out.  I'm looking for a good entry point for the May IC, but volatility is back down in the doldrums again.  I'll have to wait until the market gets skittery about something again - if that means skipping until June, so be it.

23 March 2011

CS|MACO... Finally!

Mea Culpa

First, I need to relate a painful but valuable lesson I learned last week.  In my previous post, I said that the CiG trade had fired a Buy signal on S&P Futures.  As a fade strategy, the CiG trade frequently signals trades that I view as bat-shit crazy.  It takes some teeth-gritting and reminding myself that this is fake money in order for me to be able to enter the trade sometimes.  Last Wednesday was one of those times.

I dutifully entered the trade, but I put a $500/contract stop-loss order in, instead of the $1000 that the script calls for.  I congratulated myself a couple of hours later when my stop-loss was hit, closing me out for a $500 loss, on saving the other $500 dollars.  Well... go look at a chart for S&P Futures.  My max unrealized loss that evening would have been about $700, and over the next two days we had a sizable rally.  By the time the exit signal arrived, the trade as designed would have been up over $2000/contract, a big return.  Instead, I was sitting on the sidelines with a $500 loss.  My "judgement", in this case, cost me a total of $2500/contract.  Ouch.

So why did I go against the trade as back-tested by NeighborTrader?  My rationale at the time was that this was a fundamental market move, and we were in uncharted territory that couldn't possibly be handled by back-testing.  OK, fair enough, and that's what judgement is for.  But I took the wrong action based on that judgement: instead of tightening my stop, which cut my max loss by 50% but increased my probability of experiencing that loss by far more than 100%, I should have opted not to place the trade at all.  If my comfort level with the risk is insufficient to execute the trade as designed, I should avoid the trade entirely - not cripple it and damn it to fail.

My conclusion was invalid, even if my assertion (these unprecedented times are likely to cause the trade not to work) was valid.  But what about my assertion?  If we want to look at unprecedented times, let's look at May 7, 2010, the day after the "Flash Crash" (I hate this term, by the way).  CiG would have similarly fired a Buy signal at the end of the day that day, and the exit signal would have come two trading days later, for a profit of over $2200/contract.  And here's the thing: NT back-tested this trade before May 7, 2010.  That's out-of-sample data, and thus can't be discarded as sample bias in his back-testing.

So my assertion -- unprecedented times invalidates the trade signal -- was invalid, and my conclusion on how to act on it -- tighten the stop -- was invalid as well.  Look, I'm not perfect, but if I had gotten either thing right, I'd feel a lot better about it.  Anyway, $2500 lesson learned: either follow the trade, or don't do the trade - don't adjust the trade on the fly based on my gut.

Oh, and you may recall me mentioning that "by rights, I should be short Ten Year Futures, too". That trade, if entered, would have made another $1250/contract over the course of three trading days.  Sigh.

CS|MACO

Last Wednesday night, not long after my stop-out, AAII's sentiment survey for March 17 was posted, and those inversely prophetic investors had some pretty negative things to say about the market.  Bullishness dropped all the way to 28.5%, just below the CS Buy signal level of 31.5.  With SPY trading between its 25SMA and its 200SMA, the MACO component was giving a hearty "meh" signal.  Buy + don't-care = Buy.  So I bought a unit of SPY the next morning... at 128.  SPY is still in MACO's "meh" territory, but up 1.66/share from my buy price; AAII publishes another weekly survey overnight tonight.  If my individual investor peers recognize the cessation of the downtrend last week and get more bullish ("bullisher"?), I might find myself selling SPY on the open tomorrow morning.  But they'll have to get a lot "bullisher" - 41.5% or more - for me to take my profits and go home.  We'll see.

General Thoughts

As regular readers of this blog know, I run multiple trades in my paperMoney account at ThinkOrSwim.  Besides the ones mentioned above, I also have a bullish NDX option vertical spread on to simulate a collar, a bearish SPX option vertical spread, an Iron Condor in RUT (Russell 2000) and naked-long SPY puts.  I'm also looking for a dip in gold to buy back some GLD calls, after having exited my March calls before expiration.  The problem that I am starting to run into is that I have too many trades on the stock market - and many of them are nearly perfectly inversely correlated.  The worst offenders are the bearish SPX and bullish NDX spreads.  CiG and CS|MACO only hold positions once in a while - but the option spreads are there all month long, every month.

This false diversification doesn't benefit me at all - if they were real trades I would be spinning my wheels spending commission on an expectation of about 0 profit.  In a paperMoney account, this isn't so bad, because I can use the excuse that I am looking for profitable trades: the unprofitable ones will never "go pro" into a real money account.  But this is kind of a hollow argument, because any of these trades can be profitable or unprofitable, depending on the market conditions.

This issue bears more consideration.

And a Micro Rant

"They", whoever they are, changed the Nasdaq-100 ETF's symbol from QQQQ to QQQ last night.  WTF???  Didn't they just change it from QQQ to QQQQ a few years ago?  Make up your minds!

16 November 2010

Big News for Boring Trades

It's been a busy few days.  The CiG trade finally fired a signal on Friday, but I was in Colorado all weekend so I didn't have time to write it up.  Then I came home with a head-cold just in time to support a major roll-out at the office that went pretty wrong.  By the time I got home last night all I wanted to do was sleep.  So now here we are.  Excuses excuses.
 
Saving Money While Asleep
First the CiG trade on Friday.  You may recall I decided to run it on S&P futures as well as treasury note futures, because I feared that treasury notes would bore me to death.  On Friday, it signaled a buy-on-close on the S&P, so I did.  Things were looking good Monday morning, but not good enough to reach the target exit signal.  By this morning, the whole world was fleeing from risk again and the stock market opened significantly lower.  Since there are no clearly-defined stop rules, I decided to sell the position for a loss shortly after the stock market opened.  I felt that what we were seeing was not a momentary blip but in fact a setup for a selling day.  I was right: I sold the position at 1188 at 9:00.  At the 3:00 close, ES was down to 1176.

Because CiG tries to buy on dips, though, it had another buy signal come out on ES today.  Pleased at my ability to dodge at least some of the sell-off today, I decided to get back in with a new long position at the close.  So I'm still long from Friday, but I took a 12-point ($550/contract) hiatus.  That's almost a winning trade all by itself.  Not a bad money-saving siesta.

No joy in treasury note futures yet.  Yawn.

Insert Spy Pun Here
CS|MACO, another boring trade, is finally starting to see some life.  It has been locked flat while SPY has rallied over the last 3 months, due to the bearish signal coming out of the contrarian investor sentiment component and the bullish signal coming out of the moving-average-crossover component.  One of those two opposing forces was removed today when SPY closed below its 25-day moving average, breaking the SPY>25MA>200MA relationship that has been in place since October 4.  That's not a sell signal yet, though, because the terms of the trade state that I won't enter a position on the removal of a signal.  I need the CS component to affirm its bearishness tomorrow after the close before I can short this puppy.

A Boring Iron Condor is a Good Iron Condor
Unfortunately, this one is starting to get a little exciting.  When I opened the position I groused about my poor judgment a little bit regarding the low price I was paid to initiate.  Sure enough, the VIX almost immediately rallied while RUT flagged, causing my delta to increase as I rode the curve down toward my put spread.  Delta of +16 this morning, so time to adjust already.

It seems ridiculously early to be thinking about exit orders, but I could buy back my call spreads for only 60c already; so I put in some limit orders to buy back at 20c.  That doesn't help my delta, but it does lock in a profit on half the trade - and with some careful adjustment the other half might not cost too much.

As for the put spreads, I looked at the mouse-ear like I used last month and decided it was overkill: RUT was 710 or so when I was adjusting, and my put spreads are 660/650s.  A mouse-ear would throw my delta so horribly negative that I would have to buy back most if not all of my call spreads to contain it.  Plus it was crazy-expensive, at $21.

The next thing I looked at was simply reducing the call spread position.  That would certainly help the delta and the feel of the position, but I felt the cost was a little high.  A variant of this is to roll the call spread down a few strikes, also increasing the position a bit to finance the roll.  This increases risk, and I wasn't happy with the outcome or my perception of the risk-reward trade-off.

I also looked at Wolfinger's Kite Spread, which involves a naked long OTM put and a credit put spread even farther OTM with 3-4x the size on it for financing.  That had some real potential, but it really hurt the theta.  Ultimately I decided I could achieve my delta goals and flatten the value graph best by putting on some 630/640 debit put spreads.  I bought just enough (at 1.90) to get the delta under +5.  By the close, the delta was back up to +5 again, but that's within my parameters.

Boring News for Big Trades
I'm still not holding GLD calls, and I'm glad.  I'm looking for bargains in some of the mining companies right now, but I haven't had time to look very hard yet.  Earnings season is upon us, and if I can capture a couple of positive earnings surprises before the event-driven IV goes through the roof, I'll be a happy camper.

30 October 2010

Collaboration is Good

NeighborTrader has been making some comments lately about a trade he has been backtesting.  At first, he was trying to work out a way to make it an intraday trade so that he could run it at the office as part of his job.  A fairly new trader like him tends to prefer that route, because he has a lot more resources to throw at it sooner if it goes well than if he has to save his money to cover the margin.  Unfortunately for him, after playing with a lot of different variables he came to the conclusion that the trade worked best on daily charts, which means long-term holding times.  Since our firm has a day-trading culture and isn't really set up from a risk-management standpoint to hold trades for more than a few hours, that pretty much precludes him running it as part of his job.

Knowing that I've been running long-term trades in paperMoney, he chatted with me yesterday about his trade and the methodology he was using to backtest it.  I have to admit, I'm pretty impressed at how rigorous he's being with it considering: (a) he has no academic or professional experience with formal backtesting; and (b) it's something he's doing for himself on the weekends and committing very little capital to.  He even went so far as to buy historical data, something most of the guys at the office don't do for their big trades.  He also bought a book to learn proper backtesting methods to minimize the chance of sample bias and curve-fitting.

Since it's his trade, I don't think it's right for me to go into it in detail on a public blog.  He gave me all the information I need to run it myself, and suggested some products to run it in, and I plan to do so, although I can't think of a good name for it right now.  But I'll leave the parameters a little hazy to protect his intellectual property.  Suffice to say that it is pretty similar to CS|MACO in that it looks to enter positions contrary to market consensus, but only to do so when it isn't fighting a strong trend.  It seeks to buy dips and sell spikes, and it's purely technical, using indicators widely available on most charting packages.  It also trades very infrequently, so I might have to run it on more than one product just to avoid being bored.

He's been running it in S&P-500 Futures (it needs a lot of leverage to succeed, and he understands futures very well since that's his job) and a couple of other products.  He just exited a trade in it today for a nice fat profit.  Since I already have CS|MACO running on SPY (the S&P-500 ETF), and I have other trades running on other equity indexes (Iron Condors on Russell, Collars on Nasdaq-100), I think I'll run it against US Treasury 10-year Note Futures.  This trades at the CME since they merged with CBOT, and it's available in paperMoney. 

Speaking of CS|MACO, it's been quiet for a while now.  Individual investors have stayed bullish (they've been right for once), and SPY has stayed above its 25-day moving average.  Long+short = flat, so I've been watching this whole move from the sidelines.  The last couple of weeks haven't been good for any trade except iron condors, with the stock market going pretty much sideways.  Something has to give with CS|MACO soon, though, because the 25-day moving average and the closing price are converging.

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.