Category Archives for "General"
Why don’t I make more frequent posts? The easy answer is backtesting is hard.
A test has three parts to it. First, coming up with the idea. I have more ideas than I can test. I have a notebook full of ideas. The hard part here is picking one. Second, writing the code and running it. This takes me a couple of hours to a couple of days to do. Writing code is the fun and mostly easy part, though sometimes it can be insanely hard. Third, is verifying the result are correct. It is the last step that can takes days to weeks to do. Then writing the post takes a couple of days.
About two years ago, I started using the Ulcer Index as another evaluation metric for portfolio backtests. I like how it captures both drawdown and drawdown length. It helps differentiate similar looking portfolios using the common metrics of Compounded Growth Rate, Share Ratio, and Maximum Drawdown. My plan was to write a blog post about it and then add it to the metrics I show on the blog. The blog Flirting With Models, found through the quant mashup Quantocracy, just made a great post on it which I highly suggest you go read: Looking into the Ulcer Index. They did a great job and saved me a post. I will show this metric on future portfolio tests.
Last week I was interviewed by Andrew Selby of Don’t Talk About Your Stocks. We covered lots of topics in the 45 minute interview. We covered my trading mistakes, why you need a trading buddy, matching your trading style to your personality, and many more topics.
If you have any questions from the interview, post them in the comment section of this page.
I have been shorting stocks since 2006 using a quantified strategy that has remained relatively unchanged through the years. From 2006 to 2012, the strategy was one of my most consistent and profitable of all the strategies I have traded. I love shorting stocks because it is very hard psychologically, because of that, I believe that there is a good edge there. The test results have always bothered me because of the differences between back tested assumptions that sometimes are challenging to actually reproduce in real-world trading. Then in 2013 my fears became realized and all four fears below really hit me.
When I buy a stock, I know the edge is for the stock to go up. I know that does not mean every stock is a guaranteed winner. Or that my losses will be small. But every now and then you get what I call a broken arrow. I was in Expedia (EXPE) as it triggered in my SP500 rotation system. It was in a nice up trend, everything looking great.
And then …earnings happened.
I have been interested in the stock market since 1990. I was fortunate enough to be trading in the late 90’s and got to enjoy those incredible years. Then came the 2000 bear. I tried my hand at day trading but soon discovered it did not fit my personality. It took a long time to realize that trading style must match personality. I turned to building strategies using quantitative methods. What I discovered was, the testing results from most trading methods didn’t hold up as expected. Soon after discovering this I was hired by Connors Research, and from there, my trading knowledge greatly expanded. Larry Connors taught me how to properly look at short term market behavior and how to find edges. I spent nine years looking deeper into indices, stocks, ETFs, futures and options.
I have used AmiBroker, since 2001, as my backtesting platform, into which I feed CSI Data’s stocks database, which includes delisted stocks. The data is adjusted for dividends and capital gains. The data contains the as traded price such that one can use price filters without having to worry about stock-splits. AmiBroker is a powerful platform at a reasonable price. I highly recommend it to anyone looking to get into backtesting. Microsoft Excel and MySQL are tools I use to analyze the output from AmiBroker.
Over the years I have traded stocks and ETFs, and options, both on the long side and short sides. My primary methods are reversion-to-the-mean and rotational. These strategies fit my personality and allow me to stick to the strategies even when things are not going well.
Every researcher has a Holy Grail strategy they pursue. Mine is the breakout strategy. I would love to complement the reversion-to-the-mean strategies I trade.
The unexpected result is my favorite thing about research. I have added filters to a strategy that I just knew that it would make it better, and then it makes it worse. Or the reverse, when I thought it was crazy to try an idea because it would lose money and it makes money.
My ideas for what to research often come from my trading. I will see some pattern or the market will do something that makes me curious. Another great source is my trading buddy (which all traders should have), Steven Gabriel. He is a wealth of ideas and always has more than I can test. Last but not least are other traders. Often they will say “did you trying testing XYZ?” And my response is “No, but that is a great idea. Let me test it and get the results to you.”
Most of my posts will be from research I am doing for my own personal trading. Trading ideas from my great friend and trading expert Steven Gabriel are often a wonderful source. Sometimes I will see something on another blog and want to take those results a step further, or apply them to a specific stock universe. Every now and then I will post results that did not work out. Maybe it will trigger new ideas to test and improve the results. Sometimes a simple tweak transforms a poor idea to a winning one. Understanding what does not work is every bit as important as knowing what does. And if my readers have good ideas, I can verify and validate them.