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.

14 May 2011

Happy Belated 1979

Wow, is it mid-month already?  Sheesh.  A couple of weeks ago, I picked up the next installment in the year-a-month project: 1979. 

Led Zeppelin: In Through the Out Door
Rainbow: Down to Earth
Ted Nugent: State of Shock
ZZ Top: Degüello
To get free shipping from Amazon, I also picked up Ted Nugent's Scream Dream from 1980.

07 May 2011

*POP*!

It has been a busy month, and except for my mechanical trades (an update on those is coming soon), I haven't found the time to wander around looking at areas of the market that I don't usually trade.  About a week ago, though, I realized that I had heard a lot of buzz around the office about silver.  A month ago almost none of our traders were interested in trading silver futures, and now suddenly I was hearing about it from several different directions.  Curious, I brought up a chart.

(Silver ETF through May 2, 2011)
This, ladies and gents, is a bubble.  Having lived through the economic aftermath, we all have heard of the Tech Bubble of 2000 and the Housing Bubble of 2008.  Smaller financial instruments like silver don't get capitalized names, dates, and a lot of mainstream attention, because they don't push the economy around.  But here's a couple more from recent memory: the Oil bubble of 2007-2008, and the Agricultural bubble of 2007.  In the charts below, I have helpfully included the bubble-popping aftermath for 20/20 hindsight, which I held back in the Silver graph again (for the impatient, there is a full chart near the bottom of this post).


(Nasdaq ETF Apr1999-Apr2000)


(Oil ETF Mar2007-Jul2008)

(Commodity ETF Jan2007-Mar2008)

Sadly I can't find an ETF that captures the housing bubble well, but here is an excellent chart from another blog (thanks to James Parsons).  I haven't verified the source data, but it looks more or less correct.  The volume isn't pictured; in the context of home prices, that would be the real estate sales activity.  I could go do a bunch of research, but I won't.  We all remember the "flipping" craze of 2006-2007, right?

Housing prices 1970-2010, nominal and inflation-adjusted
In all of the charts above, notice the accelerating prices near the end of the bubble, and the corresponding accelerating daily volume.  This represents the "final blow-off phase", where everyone just has to be involved in this instrument.  Retail amateur investors do not belong in a frothy market like the ones pictured above, but the siren song of water-fountain stories about how Bob from Accounting doubled his money last month is a powerful draw.

In 2000, I had been reaping the rewards of the Tech Revolution, as I saw it, by working as an independent consultant on the side, more than doubling my salary by charging consultant rates and putting in 20-30 extra hours a week.  I suddenly realized that a lot of people had been making a lot of money in the stock market for a long time, and I was determined not to miss out on any additional free money.  I started reading the Motley Fool and buying more or less any stock that made a new high, with no regard for earnings (there weren't any) or prices.  I came late to the party, like most investors did, but I was convinced this New Economy (remember that?) was one that would love me and my technical mind, cradling me in its hammock of cash.  So I bought Yahoo at $120.  When it fell to $100, I listened to the Buy&Holders telling me what a great new bargain it was offering me, and I bought more.  When it fell to $60, I bought more.  When it fell to $40, I made my last purchase while gritting my teeth.  I don't remember where I sold it, but it certainly wasn't higher than $15.

I learned a lot in the next 8 years.  In 2008, when stock valuations were ridiculously high, the housing market was quietly imploding, and credit was rapidly shrinking, I heard a sudden increase in questions from people not involved in finance about how to get involved in finance.  I had doctors, dentists, and engineers wanting to argue with me about where oil was going in the next 5 years.  I had people telling me that $1.5million wasn't that much to spend on a 4-bedroom house with no land, and besides, you could just sell it for $1.8 in a couple of months! Suddenly everyone was a speculator, and everyone was loving the party.  Meanwhile I was reading economic analysis by folks like the Head Economist at Merrill Lynch, who was pointing out how silly it all was.  Every week he bemoaned the rapidly accelerating speculative frenzy, and forecasted a recession with increasing certainty and severity.  Finally in the summer 2008, I think in August, I decided it was time to take a position.  I bought puts on SPY, a lot of them.  I made about 800% on that trade; no, that is not a typo.  The money I made in that trade did not make up for the money I lost in my stock-index retirement accounts, but it certainly helped.

So a week ago, when I suddenly woke up and realized that I was seeing the top of a bubble in silver, I bought puts in silver.  I didn't buy many, because I'm unfamiliar with the market and I don't want to extend myself too far into a clearly volatile situation when I don't know what fundamental forces might be driving it.  Well, it turns out to be speculative craziness.  The CME decided to increase the margin requirements on its silver futures contract (SI), because it was seeing bigger daily ranges and was concerned that too many small speculators would be unable to make margin, leading to a meltdown (irony?).  Silver immediately turned about 120 degrees and headed straight for the floor.  I bought my puts the day after that announcement, so I missed the first big down day.  But here's the full-year chart of silver I held back at the top of this post:

SLV through present day

Is that not the most perfect bubble chart you've ever seen???

Two days later, I had more than doubled my money on the puts.  I sold a little less than half of them for more than I paid for the full position.  Now that remaining part of the position is worth more than twice my original investment.  In just a week, I'm up over 350% overall.  I like to use options for short-term directional plays like this, because I get leverage and limited risk.  I bought options worth about 4x more than I would normally initially invest in anything, and I spent about 5% of that on premium.  That 5% of the notional value is my maximum loss; leveraged out, I'm risking 20% of a unit of capital on this play.  It carries a high risk of loss, since the option really can (and often does) go to zero, but the leverage carries with it a high reward potential. 

Disclaimer:  it's tough to make money buying options.  It usually only works out well when there is a sudden violent movement - in the right direction - of my underlying stock/ETF/etc.  The problem, though, is that the probability of a sudden violent movement is captured in the term "expected volatility", and that's one component in the price of the option.  Just as you would pay more for car insurance if you had a history of vehicular homicide, you'll pay more for a put option on a stock that has a history of portfolio homicide.  So buying options usually loses money, and the art is to control that money loss and not let the option price go to zero.  But when they make money, oh boy.  I can turn a 30% drop in silver into a 350% profit.  That makes up for a lot of lost option bets.

This is usually where someone (you know who you are, Dad) tells me that I'm "profiting off the misery of others".  I see it a different way.  Do we all remember how it was the Evil Speculators that caused the 2008 crash?  Well, it's those same Evil Speculators that drove the silver price up above all reason.  Keep in mind, the catalyst for bursting this bubble was the CME increasing its margin requirements.  Do you really think that increased margin requirements are going to stop a hedger from buying silver futures because he needs a few truckloads of silver in a few months?  Of course not.  Do you think it would seriously impair the normal healthy speculation activities of the professional trading firms that provide markets to the hedgers, thus facilitating the modern financial system, as is their Patriotic Duty?  Certainly not - most trading firms have millions, if not tens of millions, in their margin accounts.  The only people severely affected by increased margin requirements are small-size speculators with underfunded accounts:  those 1-lot and 2-lot traders that are in there driving up the volume and generating water-cooler war stories.  These guys are cruising along with $10,000 to $50,000 in a futures trading account, and they're sitting at their desks trading silver all day long when they should be doing something productive.  This is why the Chinese are winning, people.

Think of it as weeding.  Sometimes you have to kill off some buckthorn so the oaks can thrive.  Think of me as a chipper/shredder.

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)

09 April 2011

April 2011 Ski Trip: Monday

John and Phil arrived a day later than planned, so Monday was their first day of skiing.  Rick was also supposed to join us on Monday, but unfortunately his mother was in the hospital; I hear she's doing much better now, for which we're all very thankful.

Having agreed to meet up with Andy at Solitude, I convinced John and Phil that it was the best choice for skiing.  Sunday night, we headed over to Lift House and Phil and I rented some powder skis - John stuck with his all-mountains.  We both got Volkl Bridge rentals, which are a little wider in the tip and tail than my AC3 Unlimiteds, but a lot wider in the body.  They also have what are known as "rocker" tips, which means that the scoop is wider and both ends of the ski are tapered.  This tends to give them more flotation in powder than a standard all-mountain ski.

This was a pretty minor change for me, and I found the skis easy to adjust to within a couple of turns.  Phil, however, was coming from Salomon X-Screams.  These are much older, straighter skis with far less side-cut.  John and I have been needling him to get new shaped skis for a long time, but Phil has claimed it doesn't matter... while being amazed at how much better a skier I became after buying my AC3 Unlimiteds.

In January, I beat Phil up pretty badly, skiing him right into the ground at Alta.  He vowed to get into shape over the winter and to get his revenge on me in April, and on Monday he succeeded.  He was hell-on-skis on these powder skis, and after a single run he looked at me and said, "you've been cheating!"  Ha!  Using technology to improve my abilities isn't cheating, Phil, it's progress.

We met up with Andy about 9:30, and he took us on two massive hikes on the left side of Honeycomb Canyon.  We were walking uphill, through powder, in skis, at 9500' elevation, for 45 minutes straight, twice.  Phil the triathlete had no trouble keeping up, but Mark the Xbox player was suffering pretty badly.  But the payoff was worth it, because when we finally pointed our skis downhill, we had nothing but pure unbroken powder in front of us.

In the video below, notice the difference between the tree run at the beginning and the powder run at the end.  The tree run is jerky and bouncy as I ski over other people's ski tracks.  The powder run, even though I'm intersecting Andy's tracks on every turn, is far smoother.  This is the difference between a good run and an awesome run.  If you've never powder-skied before, it can be a frustrating experience.  Every fall will wear you out, and every turn is a lot of work.  Until you have a run like this one... then you're hooked forever.


08 April 2011

April 2011 Ski Trip: Sunday

Last Saturday evening I headed out to Salt Lake City for my semi-annual ski trip.  This was going to be a pretty small group: just John, Phil, Rick (the owner of the house), and myself.  As it turned out, it was smaller than I expected.

As we taxied from the runway to the terminal at SLC, I turned on my phone and discovered two missed calls and a voicemail from Phil and John.  It seemed they had missed their flight, having gotten into a lively discussion about something or another, and not noticed that the gate had been changed on them.  Since that was the last flight from Detroit to Salt Lake, there was simply no way they would be coming in that night.  Rick wasn't due to arrive until the next day anyway.

I wandered over to the car rental counter, and asked for a 24-hour rental of the cheapest car they had.  Alamo gave me a fairly reasonable rate on a Chevy Malibu, and soon I was on my way to the house.  It was raining like crazy in the Salt Lake valley, which usually means snow up in the canyon.  I had heard forecasts of up to 12 inches of snow overnight, so I was excited for the next day of skiing, and sad for the other guys that they would miss out.

The house is in Sandy, which is a south-east suburb of Salt Lake, and in the foothills at the mouth of Little Cottonwood Canyon.  By the time I reached the house, the rain was mixed with snow.  I wearily unloaded my gear and climbed into bed, a long day complete.  The next morning, I found myself wishing I had thought to put the car in the garage.


After cleaning off the car and getting ready for a banner day at Alta, I jumped on the internet to see just how much snow they had really gotten.  Sure enough, 12" overnight, and another 4-6" expected throughout the day.  The canyon was closed for avalanche prevention, due to open 8:30, but requiring chains, snow tires, or 4-wheel drive.  I have no idea if my Malibu had snow tires or not, but I was certain it didn't have chains or 4WD.  The Dept of Transportation website didn't list any such restriction, though, so I figured I'd see what the signs said.

I left about 30 minutes after the website reported the road open for business, giving traffic time to die down.  The house is about 3 miles from the mouth of Little Cottonwood Canyon, and then another 7-8 miles up the canyon to Alta.  As I exited the subdivision and turned onto the main road, I immediately entered stop-and-go traffic: all skiers, all headed into Little Cottonwood, all hoping to get fresh tracks at Alta.  And they were all driving 4-wheel-drive vehicles.

When Alta's busy, Solitude is a great alternative.  I headed over to Big Cottonwood Canyon and had no traffic issues at all.  I zipped up the first couple miles of the 11-mile canyon at speed, behind a pick-up truck that I figured was also headed to Solitude.  Suddenly, on an innocuous-looking straight section of road, he fish-tailed.  We both immediately slowed way down, and sure enough there was black ice under the snow.  The remaining 8 miles were a hair-raising experience, as I felt unsafe going any faster than 20 mph.  Other cars ahead were having trouble as well, and soon we were a line of ice-skaters inching forward up the steep switchbacks.  There is one double-hairpin turn in this canyon, and I sat on it for about 5-10 minutes waiting for a small SUV several cars up to repeatedly try and fail to move forward, only to eventually get himself rotated around downhill and head for home.  If I felt I could do that without going into the ditch (and, in this canyon, the ditch is sometimes 50 feet deep), I might have done the same.  Whenever I took my foot off the brake and prepared to accelerate from 0 mph, it was a fight to make the car go forward instead of whichever way was straight downhill.  Not a great feeling.

I did eventually make it to Solitude, however, and soon I was booted up and headed to the lift.  On my first ride, I got to chatting with the other single skier on the chair with me; we both preferred to ski with others, and decided to ski together for a bit.  It was clear from his favorite-run stories that he was a better skier than me, so I made him promise to ski off if I slowed him down - for his part, he assured me I wouldn't slow him down.  Polite white lie - I slowed him down.

We skied together all morning, enjoying the fresh snow and bemoaning all the closed areas.  Ski resorts in the Rockies are a delicate balance: too little snow and they aren't as much fun; too much snow and they have to close vast acreages of mountainside while they make sure it's safe from avalanches.  One of my favorite areas in Solitude is Honeycomb Canyon, a black-diamond and double-black-diamond area accessible via Summit chair and on the other side of the ridge that forms the main Solitude groom area.  This entire area was closed on Sunday for avalanche control.

I had a lot of trouble with my shaped all-mountain skis in the heavy powder, and was pretty jealous of Andy's tongue-depressor fat-boy skis.  He was able to get up on top of the snow and stay there, as if he was surfing on a wave.  Around lunch time, Andy said he had some things to take care of in the valley and headed out.  Before he did, however, we exchanged phone numbers and determined to meet up for more skiing the next day.  I was sure Rick, Phil, and John would like him, and more is always more fun than fewer skiers.

Here's a video with a few clips from Sunday.  Unfortunately I spent a long time finding just the right soundtrack for it (Arrested for Driving While Blind, by ZZ Top), only to have stupid YouTube mute it for copyright reasons.  So at the last minute, I swapped the track out with one of their "approved" tracks.  For the record, they all suck just as bad as the one I chose.



02 April 2011

Happy 1978

In my ongoing year-a-month project, April is 1978.  Things are really starting to happen now, and this was a great year.  Sadly I haven't heard three of the five on the list yet, because Amazon is unable to ship for free at the speed of light.  Bummer.

Judas Priest: Stained Class
Rainbow: Long Live Rock 'n' Roll
Black Sabbath: Never Say Die!
Ted Nugent: Weekend Warriors
ZZ Top: Tejas - actually 1977, leftover for free shipping reasons from last month

Due to shipping issues mentioned above, I've only listened to Stained Class and LLRnR.  But both albums really rock.  I only discovered Ronnie James Dio around the time that he died, so hearing some of his great early work now is kind of bittersweet.  I can't wait until Ozzie goes off on his solo career and Sabbath-Dio are born.

The other pleasant surprise is Judas Priest.  Like most rock radio station listeners, I had only heard their top couple of hits: Breakin' the Law and Living After Midnight.  Unfortunately, judging them on these songs is kind of like thinking you know Pink Floyd after hearing Another Brick in the Wall.  Some of their early stuff in the late 70s exhibits pre-groove-metal traits, and is some of the best coding music I've come across since Disturbed.  I challenge anyone who enjoys metal to listen to Stained Class all the way through on a good set of headphones, without tapping their foot at some point.  I often find myself typing to the guitar riffs, which is fast indeed.  Maybe I should expense the album to my employer...

All the new stuff from the last few months is synchronized onto the Android, my noise-cancelling headphones are packed, and I'm headed to Utah in a few hours.  The plane is gonna rock.

EDIT: Tejas and Weekend Warriors showed up with the mail, just in time.  I haven't listened to them yet, but they are syncing to the Android right now for the trip.

01 April 2011

The Smallest Beginning

Round about the turn of the year or so, I shared a little snippet of some stuff I was doing in Flash.  I was trying to learn a new programming language prior to launching on a pretty ambitious project.  Over the next couple of weeks, I suffered some programming setbacks, including losing track of where I had done a couple days' work, and some frustrating language issues that I had trouble resolving.  Worse, my order for several Xbox games came in, and I discovered Minecraft.

This past week, I consciously tore myself out of some of my worst time-wasting behaviors and starting noodling around again.  The result is here.  Yes, it's silly and basically non-functional.  But it's a start.