Back-testing for improved technical analysis

Comments Off

Back-testing is one of the most important tools for a technical analyst but it’s also important for serious investors. It is immensely useful to be able to understand how a strategy will perform over time. It lets us instantly test an idea like “what if, just before closing each day, I bought the stock that had the highest percentage gain today but didn’t have abnormally high volume?” You can run this strategy over years of data and get an immediate feel for whether it’s a completely bad idea, or something workable.

If you think the idea is workable you can tweak the triggers and see if it can improve. For example, does performance improve if restricted to trading just within small, mid or large caps?

Back-testing isn’t meant as a definitive record of how well a strategy performs, though. No trading simulation is perfect and each has their own biases. However, back-test performance statistics are very informative when comparing strategies. If strategy A performs twice as well as strategy B, strategy A mostly likely will perform much better in reality since all biases were applied uniformly in all tests.

On Market Filters we’ve always let users back-test their customized buy-signals, then scan our intra-day data for stocks meeting that criteria right now. We realized it’s inefficient for users to each have to all run the same, or similar, back-tests (but we didn’t remove the ability to do so). Also, when new to technical analysis it’s not easy to figure out where to start when looking for buy-signal ideas.

To fix both of those problems we just added a new feature that periodically back-tests a large number of popular strategies. Users can then view all the results and sort based on criteria such as Total Gains, Win Rate and Average Gain per Win. This is a great way to find a good strategy or find a starting point for one to adjust for yourself. The new page is: Back-test Results.

This data also has some powerful side-effects. The site used to show ratings for individual stocks based on an arbitrary selection of indicators. Now the site finds the top-performing strategies from the latest back-test run and averages the scores from the best ones. What could be better than ratings from strategies with the best proven performance?

Gore and the Environment


This article is a good read: The Last Temptation of Al Gore. It’s mostly about the rumors surrounding a presidential run and concludes it’s very unlikely. Also has some interesting bits about him, for example that he’s an adviser to Google and on the Board of Apple.

While I think he’d be a fantastic President, I’m not sure if we’d be better off with him there. He might be most effective as the environmental adviser to a Democrat President (plus his current role).

Two other random environmental thoughts:

  • It struck me the other day how much composting has reduced the garbage we put out at my house. Between it and recycling we end up not having enough garbage to put out about every second week.
  • People who litter in “wildlife” areas REALLY bother me, I found out yesterday. There’s a pond behind my house with ducks and geese which people feed with bread sometimes. Last night I happened to see some mother (with her small daughter watching) empty a plastic bag of breadcrumbs in front of the geese then toss the bag right beside it. Had I been out back at the time I probably would have yelled over and asked her to pick it up, but we sufficed to pick up the bag when we walked by later.

Sometimes the truth hurts

Comments Off

Some surprising words of wisdom from Pat Buchanan: But Who Was Right – Rudy or Ron?

Rudy Gullianis response to Ron Pauls statements, during their debate, about why Bin Laden is fighting the US was seen in the media as a “strong point” for Rudy. He was seen to take command and stand strong for his country.

Unfortunately, the truth is his actions show a very harmful weakness. For the past century it seems to be assumed that the American public is not able to understand reasoning longer than a few words, especially when it comes to war. You don’t hear anything in the media about WHY Bin Laden wants to fight the US. You didn’t hear about WHY Japan attacked Pearl Harbor. The answer is always “they are evil and dislike our freedoms.”

I think this behaviour has it’s roots in propaganda: the more you understand your enemy the more chance you might have some kind of empathy for them. I don’t think that’s true. Most people don’t know that the real underlying reason for the Japanese attacking Pearl Harbor at that moment was because they were effectively under a naval blockade by the US and would soon lose most access to resources. Knowing that fact doesn’t lessen the effect of, or response to, the attack. Facts are facts.

Similarly, it doesn’t lessen the need to stop Bin Laden to know his motivation. It also doesn’t change things to admit he has some valid points. The US, and West in general, treat the Middle East very poorly, take advantage of them, and kills a lot of their people. Admitting that doesn’t excuse the murder of 3,000 Americans or remove the need to bring Bin Laden to “justice”.

But, that revelation allows you to be introspective and perhaps make some adjustments, so that even more Bin Ladens don’t appear. By stubbornly holding the position of “we’re infallible, they are evil and want to kill us because we’re so good” the US is doing more things that will produce more Bin Ladens.

I just hope the American public stops falling for this tired, and very dangerous, line of logic fed from the Republicans.

The Gulf of peace and friendship


I noticed a strange comment in this article below:
Al-Qaida says it has captured three US soldiers

“We all wish that foreign troops would leave the region and give a chance to countries in the region to establish security themselves,” Mr Ahmadinejad said during a meeting with Sheikh Khalifa bin Zayed, the UAE president. “With each other’s help, we can turn the Persian Gulf to the gulf of peace and friendship.”

Now, as anyone who reads this site regularly would know, I’m not a fan of the US invasion of Iraq. But, the above comment is absurdly naive. The bulk of the violence going on in Iraq right now is it’s own people against each other (or, perhaps some amount of other regional actors as well). The ironic part of this situation is that the foreign occupation has given the Iraqis the freedom to kill each other. They did not have this under Saddam because he would have massacred anyone even loosely involved.

This is a big part of why I’m not personally in favour of a full US withdrawal. They broke it and they still need to find a way to help fix it, although fixing it does not mean clamping down on the population more. It likely means stepping back a bit, finding small ways to prove to the Iraqis that they are there to help rather than keep slaughtering them, and dumping in tons of cash to rebuild the country they destroyed.

The West has caused a lot of problems in the Middle East over the last few centuries and made existing problems a lot worse. But, whether or not the US had invaded Iraq it was not a “Gulf of peace and friendship,” nor close to one.

Is Canadian beer going away?

1 Comment

The Canadian beer industry is disappearing, according to this statement by the President of Moosehead breweries. He does sound a bit like he’s whining at losing an advertising war, though:

“He says Canadian consumers have bought into the U.S. campaigns, which often use Canadian images and themes.”

Either way, it’s sad. I didn’t know Sleemans had been sold to a Japanese brewery, and apparently the Brick Brewery is up for sale. Moosehead is the largest remaining Canadian-owned brewery.

On the bright side, I had a beer from this Guelph micro-brewery recently and it was fantastic: F and M Brewery. I’m trying to find out if their beers are sold in K/W anywhere.

World obesity in diagram form

Comments Off

Starting from this link: World Obesity I followed a link in a comment talking about the link between high fructose and obesity.

It’s pretty interesting, although not definitive. Their argument is:

  • Since the 1970′s High Fructose Corn Syrup has replaced sugar as a main sweetener in the US
  • HFCS has slightly different physiological effects than sugar which leads to higher caloric intake

The Wikipedia article points out that none of the studies have been definitive. Even if HFCS does have some bad effects I’d still think it’s only a small part of the larger puzzle. The fact is that Westerners, and especially Americans apparently, consume more calories per day, and are less physically active, than the rest of the world. That’s it. Why do we need to look for other excuses when the real answer is so painfully obvious?

How did you spend Loyalty Day?


In an apparent effort to distract people from the fact that he vetoed an Iraq war funding bill on the fourth anniversary of the day he declared the Iraq war to be over, Bush declared May 1st to be Loyalty Day! Just how does one celebrate Loyalty Day?

“All citizens can express their loyalty to the United States by flying the flag, participating in our democracy, and learning more about our country’s grand story of courage and simple dream of dignity.”

In the spirit of the day, I ate freedom fries while learning about all the constitutional rights that have been abridged in various Patriot Acts. Please note: Loyalty Day is only open to citizens. Immigrants should renounce all loyalty to their homeland and then get right back to work.

Real conversations about reality

Comments Off

I wasn’t planning to post a link to this, but I’ve watched it twice now and is so good it deserves more attention.

Jon Stewart was on the new Bill Moyers show on PBS. Here is the full 30-minute interview.

Some choice quotes:

JON STEWART: … And I used to think, “They’re doing this based on a certain arrogance.” And now, I realize that it’s because they believe there is one accountability moment for a President, and that is the four year election. And once you get that election, you’re done.

BILL MOYERS: They’re right, are they not?

JON STEWART: They’re completely not right. The election moment is merely the American public saying, “We’d rather you be President than that guy.” That’s it. The next four years, though, you still have to abide by the oversight process that is there to prevent this kind of bizarre sort of cult-like atmosphere that falls along. I mean, I accept that kind of veil of secrecy around Tom Cruise and Katie Holmes, but I don’t accept that around our government.

JON STEWART: That’s right. There is a there is an enormous contradiction, and it is readily apparent, if you just walk through simple sort of logic, and simple rational points. But the thing that they don’t realize is that everyone wants them to come from beyond that contradiction so that we can all fix it. Nobody is saying, “We don’t have a problem.” Nobody is saying that, “9/11 didn’t happen.” What they’re saying is, “We’re not a fragile country, trust us to have this conversation, so that we can do this in the right way, in a more effective way.”

BILL MOYERS: How do you explain that the Washington press corps, by and large, particularly the Sunday shows join the game with them? I mean, you watch those shows

JON STEWART: They don’t all, I mean…

BILL MOYERS: No, not all of them do, but there’s a kind of wink-wink questioning going on there. You know, I’ll ask the devil’s advocate…

JON STEWART: Well, it’s because it’s the Harlem Globetrotters playing the Washington Generals. It’s they’re the only teams playing, and they know they’ve got to play each other every week, and they all have sort of assumed their role. And, I mean, at this point, the government is just you know, blowing the doors off the media. And not everywhere, and I think, this is where you know, a lot of those blog reporters and all of those things are bringing a lot of urgency and a lot of momentum to stories that wouldn’t normally carry any momentum.

Also, here’s a transcript from a 2003 interview by Moyers with Stewart back when Moyers was on the PBS show Now.