If You're Looking for a Backtesting Program

There’s none better --for the price and ease of use-- than StockAnalyze. The programmer is good about answering questions n providing support. But the program doesn’t have a wide following or an active forum. If that’s important to you, take a look at AmiBroker.

https://stockalyze.com https://www.amibroker.com

3 Likes

The following is some very preliminary results in which I was testing the impact of using a 2% stop loss and 5% drawdown vs 8% and 8% with three different trading systems on the 30 stocks in the DJIA.

Predictably, tighter stops increased the number of losing trades, but increased net gains. When benchmarked against using no stops at all --aka, B&H-- any of the trading systems beat B&H when the lookback period was 120 days, which has been a down period for stocks.

When the opposite is happening, i.e., the market is rising, nothing beats B&H, as a bit of reflection suggests. But the risk of suffering through bear markets with B&H is inflation ensures losses that might never be recovered no matter that nominal value might eventually be regained.

1 Like

More testing factoids.

Using the 30 stocks of the DJIA, plus DIA, a 120-day lookback, and five trading systems, I got these results, which are consistent other reports on trend-following systems. Yeah, an average, right/wrong ratio of 40% is less than could be expected from flipping coins. But payoffs are asymmetrical, so profits can be made.


**Right/Wrong Percentages**

**CCC	        41%**
**2 MA X-over	44%**
**MACD 	        32%**
**Stoch 80-20	39%**
**My Stoch	45%**

**Average	        40%**
1 Like

More testing results. This time the question I was asking is which of the five trading systems --when ranked 5 to 1 as to how they outperformed B&H-- did best? To my surprise, CCC did well.


**Average Ranking (5-1)**

**CCC	        3.6	strong**
**2 MA Xover      3.0	average**
**StochRSI	3.0	average**
**MACD 	        2.9	average**
**Stoch 80-20	2.4	weak**
1 Like

Back-tested using the stocks in the SP100.

CCC averaged 40% winning trades --as would be expected from a trend-following system-- but out-performed B&H 71% of the time. Sometimes, that just meant CCC lost less money than B&H. More interestingly, B&H outperformed CCC on an absolute basis only 13 times out of 97*, and three of those times were oil stocks (XOM, CVX, COP), which have been on a rip, again confirming my earlier assertion that stocks in a steady uptrend should be held, not traded. That is the only time B&H works better. But in chop or downtrends, B&H sucks.


*StockAnalyze wouldn’t load data for BRK.B, DD, META, or RTX.

1 Like

Compared CCC(14), which BarChart favors, to CCC(20), which StockChart favors, and saw little diff in results. Also compared both to StochRSI(14), which did worse than CCC (either parameter).

Ran the test on the SP100, again using a 150-day lookback. Across the whole basket, B&H did better than actively trading only 10% of the time. The clear exceptions --once again-- were stocks on a rip. Then B&H prevails.

We are NOT currently in a bull market, nor is one likely to return in the rest of this decade. “Investors” need to become “traders”, or they’re not going to survive, with this exception. Them who short should do well, and --ironically-- they should put on their positions and then let them ride. In other words, they should consider the viability of the opposite of B&H, which would be S&H, only covering when it becomes drop-dead obvious the bear is retreating.

1 Like

Very interesting. Alas too many people regard themselves as the new Warren Buffet.
It seems they have forgotten the same Warren Buffet saying: “cut your losses”.

Dutch,

Buffet offers these Two Rules for Investing for Investing Success.

#1, Don’t lose money.
#2, Remember Rule #1.

Actually --as always-- it’s a bit more complicated than that. So let me get though the market day, and then I’ll comment further.

Arindam

By CCC, you mean CCI right, and what is your CCI setting
(default on stockcharts is 20)
My rules for trading using CCI is:

  1. Buy/sell when CCI crosses over zero
  2. When CCI is above 100, don’t ever sell no matter what. Sell if it drops to below 100, but monitor it to buy it back
  3. Stay out when CCI is below -100 - don’t touch it
1 Like

bridgewater,

Yes, I miswrote CCI as CCC. Sorry for the confusion. Yes, StockChart’s default parameter for CCI is a lookback of 20. But that number is/was just the programmer’s guess–as are the (12,26,9) defaults for MACD-- that aren’t always useful or a good fit they they could be. To see this, set up a template with whatever indicator strikes your fancy and whatever defaults it comes with and then chart a couple hundred stocks or ETFs, looking to see how good its signals are. What you’ll find yourself wanting to do is to tweak the indicator one way or another to make the signals crisper or more accurate. But that also leads to the craziness of curve fitting for specific cases and losing ‘robustness’, a technical term that means, “good enough, close enough, most of the time”.

Right now, I’m not running a trading system. I’m still in the process of building one. Nor am I doing much trading. Yeah, a couple weeks ago, I did 30 intraday round trips (or whatever the number was) and on a yearly basis, I probably make 500 trades. But those are tiny money trades, done more to see if they can be done than “to make money”. Quill’s a ‘trader’. I’m just a ‘hobbyist trader’ who values what Technical Analysis can do to help manage ‘risk’. But my interest in TA and systems building goes back 30 years, and I’ve got a lot of hours and dollars invested in programs like MetaStock, OmniTrader, CandlePower, and --more recently-- StockAnalyze. The hassle and downside of systems trading is that it takes more discipline than I’ve got. You’re up a hour or so before market open, doing your preps. You’re on a screen all day. After close, you’re doing follow-ups. Weekends are more back-office work. It’s a more than full-time job whose purpose is to make more money than I need.

Arindam

1 Like