Joined Nov 11, 2007
1,458 Blog Posts

Effect of the Pharma/Biotech Sector on a Dip-Buying System

The following is research I posted for subscribers to PDS.


After the ALKS debacle, we were left wondering, “Should we be excluding Pharma/Biotech stocks?”

After running several different tests, the answer is no.

We should continue to include Pharma/Biotech stocks. Since the difference in performance is slight, anyone who chooses not to trade the Pharma/Biotech signals is not likely to experience a significant under-performance.

It turns out that ALKS is the single largest losing trade of the Power Dip System over the last decade. We should be careful about over-weighting very recent history and under-weighting a much longer past.

The Baseline:

1% Risk, 10% Stop Model

For all tests, commissions of .01/share were included and the system was allowed to take as many trades in one day as cash allowed.

Now let’s exclude all the stocks in the Pharmaceutical/Biotechnology sector and run the same test:

Excluding the Pharma/Biotech sector eliminated 97 trades, and shaved about 3% from the annualized return.

What jumped out at me was the big differences in the Avg. Profit and Avg. Loss. This difference shows how volatile the Pharma/Bio stocks are. Those 97 trades were a small percentage (just 2.3%) of the total number of trades, yet they increased the Avg. Profit by 24.3% and increased the Avg. Loss by 25.4%.

Exposure dropped by about 1.4%, meaning that these Pharma/Biotech trades constitute a very small percentage of exposure to the system.

Let’s look at performance using ONLY the Pharma/Biotech sector stocks.

Surprisingly, using only the Pharma/Biotech stocks, the system maintains most of its original characteristics. The Max. trade % drawdown of -32.96% is from the ALKS trade. ALKS is the single largest losing trade experienced by the system during the test period.

Trading the Pharma/Biotech stocks, exposure was only 5.15%. Remember that normally these stocks are mixed in with others, so the system’s exposure to them is much less than 5.15%.

Now lets look at the worst and best 20 trades of the Pharma/Biotech stocks:

Note that the stop has been very effective. Only twice have Pharma/Biotech stocks gapped down past the stop. Also note that these stocks have offered significant gains.

In real-time trading there may not be any liquidity at the stop-market price, and therefore there is no guarantee that the actual stop-market price could have been obtained.

De-Listed Stocks in the Database:

While these tests include de-listed data, once a stock becomes de-listed, it loses all of its sector classification within the database. This means that there are Pharma/Biotech stocks included in the testing that are not being filtered out because they are de-listed.

To account for this, I ran a test using ONLY the de-listed data. I’m including the stats because there are not many systems out there that make money using de-listed stocks and I think the statistics are interesting.

The statistic do show some degradation of performance, but the system maintains profitability.

Now, lets see the worst and best 20 stocks from the de-listed data.

I have made red the symbols from Pharma/Biotech stocks.

On the losing side, we see many examples of stocks that gapped past the 10% stop. Be sure to examine the MAE (maximum adverse excursion). The MAE shows the maximum amount that the position moved against the trade. If the MAE is larger than the loss, it means that the stock gapped, the position was stopped out, and the stock kept moving downward. (AmiBroker records everything that happened on the day of the stop-out.) In most instances, the stop worked well to protect against steeper losses on the day of the stop-out.

Note the largest winner was a biotech and there were two other biotechs that gained near 30%.

Finally, most of the worst 20 were not Pharma/Biotech stocks.


The Pharma/Biotech stocks can be extremely volatile. However, the system’s exposure to them is very small. The system metrics maintain their general characteristics, even when trading only Pharma/Biotech stocks. Because the system uses stops, most of the damage from a volatile losing Pharma/Biotech trade is mitigated, while the upside from a volatile winning Pharma/Biotech trade is unlimited.

Therefore, the system will continue to trade the Pharma/Biotech stocks.

Comments »

The Day Woodshedder Laughed

In all honesty, I wasn’t long this PDS pick as it was ranked 20th out of 23 stocks on that particular day, but after yesterday’s debacle, I figured you all wouldn’t fault me if I celebrated a little success.

Still, ALL of the PDS picks have positive expectancy, even the lowest ranked stocks.

We know this because every night’s picks are ranked using the same ranking mechanism, and every stock is bought and sold using the same rules. Thus, we can generate statistics, such as the 71% win rate after 862 trades, and more importantly, it is possible for anyone to trade the system and expect similar results (assuming the rules are followed).

Comments »

Market Dissector A/D Breadth Indicator

Every product needs a good name. Branding, you know. Hence, the Market Dissector™.

I wrote a good bit about these breadth indicators a while ago, and then stopped. Nothing like some real-time performance to bolster the confidence derived from some promising backtests. I will be dusting them off over the next few weeks, making some refinements, and again making them a regular feature on the blog.

Below is one of the indicators- a very simple short-term breadth measure of advancers and decliners. It buys when the decliners surpass the upper Bollinger Band and sells when the decliners fall beneath the lower Bollinger Band.

With a 70% win rate, it works great for timing the SPY. Used to trade the QQQQ, win rate is 65% and is 67.5% for IWM.

Since I coded it and started tracking the signals in March 2o10, it has netted 9.25% (with commissions) and maintained a win rate of 68.75%, with buys and sells at the close. Results improve if we delay our buys until the next open. Not bad for in-sample testing.

Here is what it looks like in action:

Green arrows are the buys; red arrows are the sells.

One element of these indicators that I want to emphasize is that they are generated with de-listed stock data. An advance/decline index that does not incorporate de-listed data may suffer from survivorship bias.

Look for the buy alerts from this indicator in the future.

If you want to incorporate delisted data into your backtests, I have found  Norgate PremiumData to have the best price and an outstanding service.

Comments »

The Day Woodshedder Cried

Thank goodness it was a busy day at work so I didn’t have time to stew on this unfortunate knee-capping when the FDA blindsided ALKS.

As this was a top PDS pick, the system performance will be significantly impacted. The 2% Risk, 10% Stop model was up about 17% year-to-date as of yesterday.

I have warned that even diligent usage of stops will never prevent the loss from a significant gap-down. I hate to have been holding long the stock that provides the example.

***Update*** Here is the research that resulted from this trade: Effect of the Pharma/Biotech Sector on a Dip-Buying System.

Comments »

Which Is the Best Day to Buy the QQQQ?

Well, we are making progress towards determining whether there is any seasonality in regards to the best day of the month to buy a portfolio from the component stocks of the Nasdaq 100.

Perhaps the most important development was being given access to a survivor free database to use for testing.

Now it is time to establish a baseline. To establish the baseline, we buy the QQQQ on every close of the month and sell the positions 5 closes later. To be clear, we could hold the position for as many days as we want. I am using a six day hold as that was the original question presented to me.

To determine the baseline, all buys and sells were at the close and no commissions were included. The test started on 1/1/2001 and ended on 10/6/2010.

The Results:

There does appear to be some seasonality present, but it is not where I thought it would be. The graph shows the best day to buy the Qs is on the close of the 7th trading day of the month (assuming you hold the trade for 5 more closes).

In the test over the survivor-free database, the Avg. % Profit/Loss was 0.55% when buying 5 days before the month-end. If we examine day -5 (5 days before the month-end) on the chart above, we can see the Avg. % Profit/Loss is 0.28%. This suggests that there may be a slight edge, beyond what we would expect from just buying the index itself.

Of course this just leads to more questions, which I will attempt to answer in the future. Now that we have a baseline, we can move forward.

My prediction for a better result? Buy the worst performing stocks of the past ~20 days on the 6th trading day of the month and hold them for 5 more closes.

Comments »

Worse Than Lehman: This May Really Collapse the System

I don’t often concern myself with the fundamentals. However, much like during 2007, I find myself fascinated by the continuing debacle that is subprime mortgage and MBS.

And so as I was reading John Mauldin’s October 15th E-Letter, I was struck once more by the realization that the MBS problem may yet lead to another Armageddon.

While you should really read the whole letter (a link will follow the post which will take you to the whole letter), I am cutting and pasting a particularly illuminating portion, below. Any emphasis is mine.


The Foreclosure Mess

OK, in a serendipitous moment, Maine fishing buddy David Kotok sent me this email on the mortgage foreclosure crisis just as I was getting ready to write much the same thing. It is about the best thing I have read on the topic. Saves me some time and you get a better explanation. From Kotok:

“Dear Readers, this text came to me in an email from sources that are in the financial services business and with whom I have a personal relationship. The original text was laced with expletives and I would not use it in the form I received it. Therefore the text below has had some substantial editing in order to remove that language. The intentions of the writer are undisturbed. The writer shall remain anonymous. This text echoes some of the news items we have seen and heard today; however, it can serve as a plain language description of the present foreclosure-suspension mess. There is a lot here. It takes about ten minutes to read it. – David Kotok (www.cumber.com)

“Homeowners can only be foreclosed and evicted from their homes by the person or institution who actually has the loan paper…only the note-holder has legal standing to ask a court to foreclose and evict. Not the mortgage, the note, which is the actual IOU that people sign, promising to pay back the mortgage loan

“Before mortgage-backed securities, most mortgage loans were issued by the local savings & loan. So the note usually didn’t go anywhere: it stayed in the offices of the S&L down the street.

“But once mortgage loan securitization happened, things got sloppy…they got sloppy by the very nature of mortgage-backed securities.

“The whole purpose of MBSs was for different investors to have their different risk appetites satiated with different bonds. Some bond customers wanted super-safe bonds with low returns, some others wanted riskier bonds with correspondingly higher rates of return.

“Therefore, as everyone knows, the loans were ‘bundled’ into REMICs (Real-Estate Mortgage Investment Conduits, a special vehicle designed to hold the loans for tax purposes), and then “sliced & diced”…split up and put into tranches, according to their likelihood of default, their interest rates, and other characteristics.

“This slicing and dicing created ‘senior tranches,’ where the loans would likely be paid in full, if the past history of mortgage loan statistics was to be believed. And it also created ‘junior tranches,’ where the loans might well default, again according to past history and statistics. (A whole range of tranches was created, of course, but for the purposes of this discussion we can ignore all those countless other variations.)

“These various tranches were sold to different investors, according to their risk appetite. That’s why some of the MBS bonds were rated as safe as Treasury bonds, and others were rated by the ratings agencies as risky as junk bonds.

“But here’s the key issue: When an MBS was first created, all the mortgages were pristine…none had defaulted yet, because they were all brand-new loans. Statistically, some would default and some others would be paid back in full…but which ones specifically would default? No one knew, of course. If I toss a coin 1,000 times, statistically, 500 tosses the coin will land heads…but what will the result be of, say, the 723rd toss? No one knows.

“Same with mortgages.

“So in fact, it wasn’t that the riskier loans were in junior tranches and the safer ones were in senior tranches: rather, all the loans were in the REMIC, and if and when a mortgage in a given bundle of mortgages defaulted, the junior tranche holders would take the losses first, and the senior tranche holder last.

“But who were the owners of the junior-tranche bond and the senior-tranche bonds? Two different people. Therefore, the mortgage note was not actually signed over to the bond holder. In fact, it couldn’t be signed over. Because, again, since no one knew which mortgage would default first, it was impossible to assign a specific mortgage to a specific bond.

“Therefore, how to make sure the safe mortgage loan stayed with the safe MBS tranche, and the risky and/or defaulting mortgage went to the riskier tranche?

“Enter stage right the famed MERS…the Mortgage Electronic Registration System.

“MERS was the repository of these digitized mortgage notes that the banks originated from the actual mortgage loans signed by homebuyers. MERS was jointly owned by Fannie Mae and Freddie Mac (yes, those two again …I know, I know: like the chlamydia and the gonorrhea of the financial world…you cure ’em, but they just keep coming back).

“The purpose of MERS was to help in the securitization process. Basically, MERS directed defaulting mortgages to the appropriate tranches of mortgage bonds. MERS was essentially where the digitized mortgage notes were sliced and diced and rearranged so as to create the mortgage-backed securities. Think of MERS as Dr. Frankenstein’s operating table, where the beast got put together.

“However, legally…and this is the important part…MERS didn’t hold any mortgage notes: the true owner of the mortgage notes should have been the REMICs.

“But the REMICs didn’t own the notes either, because of a fluke of the ratings agencies: the REMICs had to be “bankruptcy remote,” in order to get the precious ratings needed to peddle mortgage-backed Securities to institutional investors.

“So somewhere between the REMICs and MERS, the chain of title was broken.

“Now, what does ‘broken chain of title’ mean? Simple: when a homebuyer signs a mortgage, the key document is the note. As I said before, it’s the actual IOU. In order for the mortgage note to be sold or transferred to someone else (and therefore turned into a mortgage-backed security), this document has to be physically endorsed to the next person. All of these signatures on the note are called the ‘chain of title.’

“You can endorse the note as many times as you please…but you have to have a clear chain of title right on the actual note: I sold the note to Moe, who sold it to Larry, who sold it to Curly, and all our notarized signatures are actually, physically, on the note, one after the other.

“If for whatever reason any of these signatures is skipped, then the chain of title is said to be broken. Therefore, legally, the mortgage note is no longer valid. That is, the person who took out the mortgage loan to pay for the house no longer owes the loan, because he no longer knows whom to pay.

“To repeat: if the chain of title of the note is broken, then the borrower no longer owes any money on the loan.

“Read that last sentence again, please. Don’t worry, I’ll wait.

“You read it again? Good: Now you see the can of worms that’s opening up.

“The broken chain of title might not have been an issue if there hadn’t been an unusual number of foreclosures. Before the housing bubble collapse, the people who defaulted on their mortgages wouldn’t have bothered to check to see that the paperwork was in order.

“But as everyone knows, following the housing collapse of 2007-’10-and-counting, there has been a boatload of foreclosures…and foreclosures on a lot of people who weren’t sloppy bums who skipped out on their mortgage payments, but smart and cautious people who got squeezed by circumstances.

“These people started contesting their foreclosures and evictions, and so started looking into the chain-of-title issue, and that’s when the paperwork became important. So the chain of title became crucial and the botched paperwork became a nontrivial issue.

“Now, the banks had hired ‘foreclosure mills’…law firms that specialized in foreclosures…in order to handle the massive volume of foreclosures and evictions that occurred because of the housing crisis. The foreclosure mills, as one would expect, were the first to spot the broken chain of titles.

“Well, what do you know, it turns out that these foreclosure mills might have faked and falsified documentation, so as to fraudulently repair the chain-of-title issue, thereby ‘proving’ that the banks had judicial standing to foreclose on delinquent mortgages. These foreclosure mills might have even forged the loan note itself…

“Wait, why am I hedging? The foreclosure mills did actually, deliberately, and categorically fake and falsify documents, in order to expedite these foreclosures and evictions. Yves Smith at Naked Capitalism, who has been all over this story, put up a price list for this ‘service’ from a company called DocX…yes, a price list for forged documents. Talk about your one-stop shopping!

“So in other words, a massive fraud was carried out, with the inevitable innocent bystanders getting caught up in the fraud: the guy who got foreclosed and evicted from his home in Florida, even though he didn’t actually have a mortgage, and in fact owned his house free -and clear. The family that was foreclosed and evicted, even though they had a perfect mortgage payment record. Et cetera, depressing et cetera.

“Now, the reason this all came to light is not because too many people were getting screwed by the banks or the government or someone with some power saw what was going on and decided to put a stop to it…that would have been nice, to see a shining knight in armor, riding on a white horse.

“But that’s not how America works nowadays.

“No, alarm bells started going off when the title insurance companies started to refuse to insure the titles.

“In every sale, a title insurance company insures that the title is free -and clear …that the prospective buyer is in fact buying a properly vetted house, with its title issues all in order. Title insurance companies stopped providing their service because…of course…they didn’t want to expose themselves to the risk that the chain of title had been broken, and that the bank had illegally foreclosed on the previous owner.

“That’s when things started getting interesting: that’s when the attorneys general of various states started snooping around and making noises (elections are coming up, after all).

“The fact that Ally Financial (formerly GMAC), JP Morgan Chase, and now Bank of America have suspended foreclosures signals that this is a serious problem…obviously. Banks that size, with that much exposure to foreclosed properties, don’t suspend foreclosures just because they’re good corporate citizens who want to do the right thing, and who have all their paperwork in strict order…they’re halting their foreclosures for a reason.

“The move by the United States Congress last week, to sneak by the Interstate Recognition of Notarizations Act? That was all the banking lobby. They wanted to shove down that law, so that their foreclosure mills’ forged and fraudulent documents would not be scrutinized by out-of-state judges. (The spineless cowards in the Senate carried out their master’s will by a voice vote…so that there would be no registry of who had voted for it, and therefore no accountability.)

“And President Obama’s pocket veto of the measure? He had to veto it…if he’d signed it, there would have been political hell to pay, plus it would have been challenged almost immediately, and likely overturned as unconstitutional in short order. (But he didn’t have the gumption to come right out and veto it…he pocket vetoed it.)

“As soon as the White House announced the pocket veto…the very next day!…Bank of America halted all foreclosures, nationwide.

“Why do you think that happened? Because the banks are in trouble…again. Over the same thing as last time…the damned mortgage-backed securities!

“The reason the banks are in the tank again is, if they’ve been foreclosing on people they didn’t have the legal right to foreclose on, then those people have the right to get their houses back. And the people who bought those foreclosed houses from the bank might not actually own the houses they paid for.

“And it won’t matter if a particular case…or even most cases…were on the up -and up: It won’t matter if most of the foreclosures and evictions were truly due to the homeowner failing to pay his mortgage. The fraud committed by the foreclosure mills casts enough doubt that, now, all foreclosures come into question. Not only that, all mortgages come into question.

“People still haven’t figured out what all this means. But I’ll tell you: if enough mortgage-paying homeowners realize that they may be able to get out of their mortgage loans and keep their houses, scott-free? That’s basically a license to halt payments right now, thank you. That’s basically a license to tell the banks to take a hike.

“What are the banks going to do…try to foreclose and then evict you? Show me the paper, Mr. Banker, will be all you need to say.

“This is a major, major crisis. The Lehman bankruptcy could be a spring rain compared to this hurricane. And if this isn’t handled right…and handled right quick, in the next couple of weeks at the outside…this crisis could also spell the end of the mortgage business altogether. Of banking altogether. Hell, of civil society. What do you think happens in a country when the citizens realize they don’t need to pay their debts?”

John Mauldin, Best-Selling author and recognized financial expert, is also editor of the free Thoughts From the Frontline that goes to over 1 million readers each week. For more information on John or his FREE weekly economic letter go to: http://www.frontlinethoughts.com/learnmore

Comments »

Mandelbrot, Father of Fractals, Dies

The Father of Fractal geometry has passed away, due to cancer. Mandelbrot has had a significant influence on my thinking in ways that have influenced both my trading system design and my life in general. I do not believe that he was ever given the respect that he deserved, and I’m very sorry to see him pass on without receiving it.

If you have not read his book, The (Mis)behavior of Markets, then you owe it to yourself to buy and read it right away. He also recently published a new book.

A couple of years ago I started a series on fractals, which I never finished. Nonetheless, you may find the posts I did complete to be of some interest.

On Fractals and Market Crashes: Part 1

On Fractals and Crashes: Part 2

Comments »