Revisiting my “short squeeze” trade (INSY)

The vertical line shows my exit, early in the day before it dropped for three days straight.
The vertical line shows my exit on Dec 19th 2014, early in the day. It continued to drop for three days straight.

About a month ago I was in a pickle: my swing trade of INSYS Therapeutics Inc (INSY) had met its profit target quite significantly. You can read about it here the night before, and here on the day I closed the position. Rather than just closing the trade at the open of December 19th as my rules dictated, I hesitated. The reason I hesitated is that INSY was the potential beneficiary of a “short squeeze” (see that first post for an explanation of what a short squeeze is).

In the end, I put in a tight stop-loss which was triggered almost immediately. So the end result – a gain of 15% – was not significantly different than if I’d just sold at the opening bell.

But look at that chart! Over the three days starting when I sold it, the stock dropped over 14%. Ouch! Can you imagine what I would have done if I’d decided to let it ride? Since I would have moved outside my ‘system’, I would have panicked at that first big drop and no doubt given up much of my gain during that big drop. Oh sure, I could have just waited it out and made even more money later. But I know myself well enough that that wouldn’t have happened.

My discipline has gotten better since then. 🙂 In fact I currently have a double-short oil ETF that I bought with the intention of a medium-term trade of a few months. Right now it keeps hovering above my trailing stop, and my wife keeps saying “sell! sell! You’ve made so much money!” But I’m sticking to the rules I established when I started that trade. Oil might go back up, but just as easily, oil prices could fall to $40/barrel before they’re done. I’d feel silly giving up the extra profit. But even more so, I’d feel silly having broken my own rules.

A part of me wishes it would finally drop below the stop, so a) I can write about it on this blog, b) oil will quite mucking with the overall market and c) I can move on to the next trade.

Stick to your rules. If you have an overwhelming, concrete reason to break your own rules, then do so. But if you just are getting itchy or second-guessing the market, then ignore those feelings. And stick to your rules.

 

5 Steps to Position Sizing (Your Capital ≠ Your Risk)

Don't ride that pony all the way into the ground.
Don’t ride that pony all the way into the ground.

Ok here’s something I didn’t understand when I first started getting serious about trading. Your “risk” is not the same thing as your capital, i.e. the money you throw at a stock.

If you’re a buy-and-hold investor, you’re used to thinking about risk as whatever money you have invested. That’s because you’re going to keep your money riding on that one pony until either a) you cash it out at retirement, or b) it cashes you out when the company goes bankrupt.

So when I started reading books that talked about portfolio management, I was really puzzled by how many of them used risk to determine position sizes. For example, you often hear a good rule of thumb is to have each position’s risk be no more than 2% of your account.

Well stupid me, I thought that meant no trade could be more than 2%.  I had started with about $5000 to play with, to test this new ‘active trading’ lifestyle. So I quickly did the math: 2% of $5000 is $100. I’d lose most of my money on commissions if all my trades were no larger than $100! So I just ignored this advice as something millionaires use as a rule. Because if you’re a buy-and-hope investor, everything is at risk.

But of course, this is not what your risk should be. At least when it comes to “expected risk” or “defined risk”. If you are using predefined stop-loss points – as you should! – then this risk amount is simply the amount you’re willing to lose on each transaction.

I know this is blindingly obvious to anyone who’s been trading for very long, but it was a crucial point of misunderstanding for me.

So a simplistic but practical way to calculate the size of your next trade is this:

1. Determine how much of your entire portfolio you want to risk on a trade. This should be a pretty constant percentage, not something you make up as you go along. The actual dollar amount will fluctuate with your account size. So let’s say 2% of your account is your maximum loss per trade

2. Pretend you have $10,000 when you add up all the current value of your stocks and the cash sitting in your account. 2% of that is $200. That’s the amount you are willing to lose on a trade before closing it and moving on to something else.

3. So you take a look at a stock, say for example Apple Computer (AAPL). As of this very second it’s trading around $107.62. How many shares should you trade? You need to address your stop loss before you can figure that out.

4. After looking at the chart, for whatever reason, you decide that anything below $97.93 is too low to continue with the trade. Perhaps you decided based on trend lines or Average True Range multiples, or you pick a simple percentage below your entry price. Or maybe your street address is 9793 Apple St. For the purpose of this discussion, it doesn’t matter HOW you came up with your stop loss. But you’ve picked $97.93 as a get-the-hell-out price.

5. $107.62 – $97.93 = $9.69/share you’re willing to lose. Great! So take your total amount your willing to lose, and divide it by the per-share loss you’ve come up with. 200/9.69=20.63983488132095. So let’s round down to be safe, and call it 20 shares. Now go buy ’em! *

Of course, this is expected risk. Nothing prevents the stock from gapping down 20% from one day to the next, and no amount of hopeful stop-loss planning can prevent that. But that’s “unexpected risk”. I’m sure finance majors have official jargon for these types of risk, but I can’t be bothered to look it up.

You can however mitigate against this by not having all your eggs in one basket. Don’t put too much of your capital into any one trade, and don’t put it all into one industry, sector or even market. Diversify! If you’re properly diversified in your investments, only an alien invasion will wipe you out.

alien-invasion
Too bad you invested in gold. The aliens eat gold for breakfast….

 

P.S. I’ve spent the better part of the last eight years making my day-job website pretty with beautiful photos and compelling client-oriented text. Here I can use the stupidest graphics and swear all I want, because I’m not trying to sell you something. If you don’t like it, draw me an alien and send it to me.

 

*This is not a recommendation to buy or sell, as is true for everything on this site. As a disclaimer, I recommend you never follow my advice, ever. Or anyone elses. In fact, don’t ever invest. Oh wait, should you follow that advice? Damn, now I’m confused.

Exited WWAV for a loss…

wwav failed system

This morning I exited a WhiteWave Foods (WWAV) trade for a -2.8% loss. No, it didn’t hit my stop of 2*ATR. So was this a panicky exit? You’re wondering why I didn’t stick with my system, right?

That’s easy. This particular trading system was flawed. Ironically it was the best system I’d come up with using ProRealTime. However when I finally was able to test it more thoroughly using AmiBroker, it turned out to be a dog.

I was willing to let this trade ride as long as other factors were in its favor. But given the lower highs and lower lows it was generating, I decided enough was enough. If I’d stuck with it, I might have yielded a -5.4% loss instead. Time to throw my good money at some other stock!

In case you were interested, the system used a mean-reversion idea with a detrended price oscillator. Basically, when the price is extended a good distance from a slow moving average in one direction, then heads that same distance in the other direction, it should bounce back again by a similar amount.

Which works great, except for all the times it doesn’t.

Perhaps there’s something to the idea, but I did a lot of curve-fitting on AmiBroker and still never got the system to where I’d actually want to trade it.

I guess the lesson here is: stick with a system that you believe in. But if you don’t believe in the system, you don’t get any points for staying to the bitter end.

 

A New Swing Trade System Using Bollinger Bands

bbt-band-to-band-arrows
Of course I’m going to show you the best trade! EMKR on August 7th, 2000, for a gain of 32%.

So I was talking in a previous post about how Bollinger Bands have always intrigued me, and prices seem to very often bounce back and forth between the two bands. Of course this is obvious in hindsight, but there must be some system that could capture many of these trades.

The system I initially developed using ProRealTime showed profitability in backtesting, but with at least one major flaw: the stops were arbitrary, and were way too wide for a “one size fits all” approach. The flaw was there due to the nature of backtesting using ProRealTime…it’s difficult to get a sense of the drawdown and other vital issues. So I came up with another system, which has a vastly improved CAR/MDD (Compounded Annual Return divided by Maximum Drawdown).

But before I go on, a disclaimer: you’re guaranteed to make vast riches with this system!

Not.

Disclaimer: assume I don’t know what I’m doing. Do your own backtesting. Do your own forward-testing. This is not financial advice, just a fun little amusement. If one can call little snippets of computer code an amusement.

Anyhoo, you’ll notice this system has some things in common with the first attempt. Four bars in a row that have lows piercing the lower Bollinger band, followed by one that doesn’t. You buy at the open of the following day. You sell when it hits the upper Bollinger band, and then stops piercing it with the highs. Here are the details, the parameters of which have been thoroughly tested using AmiBroker.

• Go look at the S&P 500 index (or the SPY etf equivalent). Get a chart that shows moving averages with periods of 40 and 120 days. The 40-day curve should be above the 120-day curve. If it’s not, the market is sucky and you should be finding other things to do for awhile.

• This is a five-bar sequence. Your stock should have four consecutive days with lows that are lower than the low Bollinger band. Set your “B Bands” up with a period of 15 days, and 2 standard deviations (2 is usually the default). Note these don’t have to be “down days”, where the close is lower than the open. You’re just looking at the lows and the lower band for this part. In the example above, the last two bars are actually up days…just doesn’t matter.

• The most recent “piercing low” must be lower than the earliest one, otherwise it’s a vague and hazy sort of decline that likely won’t bounce back.

• The fifth “trigger” day in the sequence is a a bar with a low that does NOT pierce its B Band. For this trigger bar, it must be an up day (Close>Open) and volume for that day must be greater than the average volume of the past 20 days. So you’re going to need a moving average for your volume as well.

I did test to see if the system worked better with the trigger bar being a big percentage, or if volume needed to be very much higher than the average, but the best results were as stated above.

• BUY at the open following the trigger day. *

Then what? Wait for your riches to roll in! Wait patiently until the price moves upward.

• When the highs start piercing the upper Bollinger Band, you need to start paying close attention. Each day it pierces…yay! You’re potentially making more money. Look for the first day of this sequence of piercings that does NOT pierce the B Band. Sort of the inverse of the entry day. That’s your neon sign saying it’s time to get out.

• Sell at the open of the following day.

• Also set a stop loss! My stop losses are usually “soft”, i.e. I don’t set them with the broker. Instead I check the close of each day, and if it’s fallen below my stop point, I sell on the following open. This avoids any close calls where the low fell temporarily below the stop, but then recovered. Also it’s just easier so I don’t sit there watching the “tape” all day. Your stop loss should be 14% (i.e. multiply your entry price by .86 and there’s your get-out-of-town price). Yes I tested a range of stops between 30% and 3%, and 14% worked best.

Some other details:

• Only choose stocks that closed higher than $15, with a average volume greater than 100k shares. Smaller than that and you might buy an erratic, frisky stock that misbehaves like a drunken groom at a bachelor party.

• If you’ve got too many stocks to choose from on a particular day, set up an Average True Range indicator with a period of 10. Divide each stock’s ATR by the Close of the trigger day (ATR/Close, which will be a tiny decimal number), and pick the one with the highest number. This will give you the stock that is the most volatile, and thus the one that has the potential to give you more profit.

• Oh and do bother to check the stock out on various sites such as seekingalpha.com, finviz.com etc. Make sure that there isn’t any dreadful recent news or financial info that is going to ruin your day. With short-term plays like this, the fundamentals aren’t as important as for long term trades. But you still don’t want to buy a real dog…or at least you want to proceed with your eyes wide open.

And that’s it! Let me know if you have luck with it. If anyone wants the AmiBroker or ProRealTime code for this, just drop me a message here.

* UPDATE 02/15/15. After reading Jay Kaeppel’s book Seasonal Stock Market Trends, I took a look at some of my swing systems to see if they could be improved by only trading during certain times of the year. Sure enough, this swing system improves if you do NOT trade during the month of May. And it improves even more if you exit any trade that happens to overlap into the month of May. Why? No idea. Doesn’t matter, just avoid May for improved results.

 

 

 

Setting Stop Losses and Falling Markets

Your investments should never end up in freefall!
Your investments should never end up in freefall!

The average investor – and I mean the kind who wouldn’t bother to read this blog – never thinks about an exit strategy. He or she buys a stock because it looks promising, with plans to hold it until retirement or some other life event requires a large chunk of money. This “buy and hold” strategy is perfectly reasonable, except for the times that stock prices go down. Which happens a lot!

In fact, the average investor is more likely to sell too early, and miss out on profit. But sell too late, hoping the stock price goes back up. This is a bad, bad, BAD idea. An example:

Let’s say you finally succumbed to all the talk about people getting rich off the stock market, and in May 2007 you bought an S&P 500 index fund (an “ETF” fund designed to mimic the movements of the S&P 500 index) at around $151. By October, the crap hits the fan and the market starts a long, painful plummet to depths never before seen. All the while, you hope and pray it’ll turn around sometime. But this plummet is a deep one. Did I mention a painful one? It’s “the Great Recession”. At the depth of the plunge in March 2009, the SPY was valued around $69 per share. That’s a loss of 54%! The market did eventually go back up of course, but it wasn’t until January 2013 that the price of the SPY fund equaled your hypothetical investment of $151.

So what, hey at least it went back up, right? NO! That’s almost six years where your money was worse than useless. Your cash just sat around, not working, drinking beer and staying out late at night, contributing nothing toward your retirement. That six years might make the difference between which golf club you join in your retirement.

The horizontal line indicates your hypothetical $151 investment.
The horizontal line indicates your hypothetical $151 investment.

Imagine if, back in that fateful May of 2007, you said to yourself “Self, here’s what we’re going to do. The market’s still going to go up. Way up! To heights never before seen or imagined. I can feel it in my soul. But…just in case…if it ever falls from its peak, we’ll sell. Maybe 10% down. What do you think? Self? Now don’t cry, it won’t ever happen, it’s just an emergency ‘stop loss’ in case the unthinkable happens…”

The market peaked soon after your investment at around $155, and then fell and fell. But you summoned up the courage, and in January when it fell to below 10% of that, you sold.

Ok so you lost about $11 per share. And then you just sat and waited.

Then, shortly after the market hit bottom, it was back up by 10%. You had a little internal conversation again, and decided to get back into the market. Your 11$/share loss was soon erased and then some! So when January 2013 rolls around, you’ve made a gain of $81/per share. Sure you lost 7% on your initial investment. But you then just about doubled your investment on the way back up. 100% profit! You would have just been breaking even if you hadn’t gotten out of the market.

And keep in mind this was a fund that spreads the risk over many stocks. You might have gotten lucky and found a stock that didn’t fall quite as much. Or you might have picked a stock that simply went out of business, turning your investment into only a good story to tell your grandkids.

EVERY investor should have an exit strategy for when things don’t go as planned. My wife once said to me “you don’t believe in company X, so that’s why you want to sell.” I replied “no I do believe in that company and I think they’ll do great in the long term! But their stock is way down from the highs and I want the opportunity to make money on them twice!”

Since these are shares she bought, we are still negotiating this little issue….

Next post: how to actually set those stops, at least from this one guy’s perspective.