Help with backtesting!!

jammixmaster

Member
Messages
79
Likes
0
I have a stock trading strategy that I want to backtest but I cannot find any free resources out there that can backtest my strategy. And the one's that I can find, like Seer, are for PROGRAMMING strategies and then backtesting them. I don't need to program anything, the rules are purely mechanical, not automated. Basically I'm looking for a website or piece of software that can do this:

Take an unlimited number of symbols and based on their historical prices, test my strategy against the entry and exit signals my strategy generates. So, for example, say XYZ company was trading at $15 last year (2008) on this same date (Nov 25). If I bought it at $15 and held it to whenever my strategy said to sell (or buy if I was short selling) what would have been my return if I had actually made the trade? This needs to be done over a handful of stocks my strategy has generated. Does anyone know of any good backtesting websites/software that is free?

*NOTE: I'm not looking for backtesting software provided by a broker, such as Strategy Runner from TD Ameritrade. I want a stand-alone backtester.*
 
Thanks for the link but it's not what I'm looking for. I don't know how to explain it without being too confusing. Um....most backtesting softwares want you to program the strategy first. I don't need to program the strategy. I just want to input the rules into the software, input the historical prices and click on "backtest". It's a very simple process but every backtesting software out there makes everything complicated.
 
I have a stock trading strategy that I want to backtest but I cannot find any free resources out there that can backtest my strategy. And the one's that I can find, like Seer, are for PROGRAMMING strategies and then backtesting them. I don't need to program anything, the rules are purely mechanical, not automated. Basically I'm looking for a website or piece of software that can do this:

Take an unlimited number of symbols and based on their historical prices, test my strategy against the entry and exit signals my strategy generates. So, for example, say XYZ company was trading at $15 last year (2008) on this same date (Nov 25). If I bought it at $15 and held it to whenever my strategy said to sell (or buy if I was short selling) what would have been my return if I had actually made the trade? This needs to be done over a handful of stocks my strategy has generated. Does anyone know of any good backtesting websites/software that is free?

*NOTE: I'm not looking for backtesting software provided by a broker, such as Strategy Runner from TD Ameritrade. I want a stand-alone backtester.*

jammixmaster, I have used many back-testing programs and always return to AMIBroker. I have found it to be the best (in my opinion) to write and back test any kind of strategy. The best thing too is the price and you can download stock data for free. Many other software packages that claim to do what AMIBroker can do would cost thousands of dollars. AMIBroker only costs $199 for EOD analysis. This a stand alone product and if you do not want to Write Code it has a WIZARD that will take your rules and build the strategy. I have used to product for many years, if you have any questions let me know.

Here are some screen shots of a MACD crossover test including the simple code to do it.
image.axd


image.axd


image.axd


MACD_Forumula.jpg


I used AMIBroker to build the timing model on MTR Investors Group. Here is a screen shot on the MTR site.
283634-mtrig-albums-mtr-picture1166-timing-model.jpg
 
Thanks for the link but it's not what I'm looking for. I don't know how to explain it without being too confusing. Um....most backtesting softwares want you to program the strategy first. I don't need to program the strategy. I just want to input the rules into the software, input the historical prices and click on "backtest". It's a very simple process but every backtesting software out there makes everything complicated.

Err, in which format do you want to input the rules? You are aware there's no real difference between inputting rules and programming?
 
Err, in which format do you want to input the rules? You are aware there's no real difference between inputting rules and programming?

The semtantics "input vs. coding" well that depends. A end user or non-programmer may use a WIZARD to that accepts "input" to build the rules, where the Programmer goes right to the code and Codes the rules since the programmer does not need a Wizard to do the work to "create the code" for the system.
 
Last edited:
Thanks to everyone for your input but none of those sites really helped. You either had to write the code or program something in order to backtest. I'm looking for something MUCH simpler. It probably doesn't exist so maybe I'm asking for too much.
 
jammixmaster, you may want to consider that if the tool is as simple as your are thinking, that everyone would be using it an making a fortune. You may have to buckle down and work at it a bit by typing some of the rules, or using a wizard tool.

AMIBroker has a "Wizard" feature that steps you though the rules, or you can go right to the "code" and key it there. If a "Wizard" is not simple enough, the next thing would be some form of Magic. :cheesy:
 
Last edited:
If you want to talk semantics, get the words right eh? Programming, not coding.

In any case, I think IG charts may have some sort of wizard for putting together basic strategies, but the point is that as soon as you have something slightly more complex than very basic, you're practically programming anyway. Some of the major testing tools allow programming in a pretty layman friendly language. I reckon a layman could download Ninja, for example, and put together a basic strategy and test it in an hour or two. I mean is this so difficult to understand:

if (CrossAbove(EMA(10),EMA(20)) { EnterLong();}
 
Lol, thanks for the info but I'm not looking to make a fortune, just to backtest my set of rules. But I don't want to have a Bachelors in programming to do it. I just want input when to buy/sell, how much to buy sell and when to exit the position based on a certain methodology.
 
Lol, thanks for the info but I'm not looking to make a fortune, just to backtest my set of rules. But I don't want to have a Bachelors in programming to do it. I just want input when to buy/sell, how much to buy sell and when to exit the position based on a certain methodology.

If you think the level of programming I'm suggesting is 'bachelors', then I really advise you not to bother trading - it won't work for you. Save yourself some time and effort. I guarantee your strategy won't make money. If it does, I'll give you money.

In any case, why not check out some of the suggestions. How easy do you want it? I even think Ninja Trader which I suggested has a strategy wizard, so you don't have to 'program' at all. Or do you *really* want it all to drop in your lap...
 
If you think the level of programming I'm suggesting is 'bachelors', then I really advise you not to bother trading - it won't work for you. Save yourself some time and effort. I guarantee your strategy won't make money. If it does, I'll give you money.

In any case, why not check out some of the suggestions. How easy do you want it? I even think Ninja Trader which I suggested has a strategy wizard, so you don't have to 'program' at all. Or do you *really* want it all to drop in your lap...


Trading won't work for me? I've been trading for years thank you. And not EVERY trader knows how to program, that's what freelancers are for. So forgive me for not wanting to learn how to program. And with the way technology is today, it's surprising that there isn't a piece of software that you can just input when to buy, what to buy, when to sell and how many shares/currencies/lots, etc based on pre-defined rules and BAM!!, backtesting done. I haven't looked at Ninja Trader yet, but I'm sure it won't do what I want it to do. To put it simply, think of a stock screener. All you do is click on they industry you want, what the EPS rank are and P/E ratio, share price and a few other rules (depending on the screener you use, there could be dozens of pre-set rules) and hit "scan" and done.....a host of stocks and ETFs come up. Why isn't there a backtesting software out there that is that easy. That's all I want. At this rate, I might as well hire a programmer to make one for me.
 
Trading won't work for me? I've been trading for years thank you.

My apologies then - the impression I got was of a beginner, and someone unprepared to put any leg work in - which usually implies lacking trader potential.

forgive me for not wanting to learn how to program. And with the way technology is today, it's surprising that there isn't a piece of software that you can just input when to buy, what to buy, when to sell and how many shares/currencies/lots, etc based on pre-defined rules and BAM!!, backtesting done.

How would you specify when to buy and sell? The simplest way is to use a wizard to generate the rules. I've told you about a free piece of software, broker independent, like you specified, that has a wizard that does exactly what you want, and your attitude is:

I haven't looked at Ninja Trader yet, but I'm sure it won't do what I want it to do.

which just adds to my initial impression. To download Ninja, generate a strategy, and backtest using free historic data, would take a morning, with NO programming. If you're unprepared to even give that a go, then yes, I suggest you hire a programmer. My point, however, is if you're starting out with mechanical rules and backtesting, and you seem unprepared to get to grips with the intracacies of mechanical systems, then it's unlikely you will have a winning strategy within many months. The reasons are numerous, but if you don't believe me, search the web...
 
Why isn't there a backtesting software out there that is that easy. That's all I want. At this rate, I might as well hire a programmer to make one for me.

Why do you think banks and hedge funds hire smart guys with numerate PhD's as quants IF they could achieve the same results by spending a couple of months writing a backtesting application simple enough for the office cleaner to use ?

The reason they dont, is because its a waste of time to do so

The market is overflowing with software aimed primarily at forex traders who want to do this sort of stuff. Some of this software is actually quite good, and provides considerable flexability, but the more flexible the software becomes, and the more options they provide, the more difficult it becomes to use and the more difficult it becomes to understand if the strategy its actually running is the one you really intended. In fact, the problem becomes SO complex to understand, that the only way you can determine what these bits of software are actually doing is to look at the underlying source code that they produce !

If you look at the feedback provided by users to the vendors of these products its always the same, they want 95% of the options removed, becasue they make the product to complex to understand and use, but they ALL also desperately want some feature adding that they believe is vital to their strategy !

You will not get what you are looking for, a) there is NO market for such a thing, b) Its commercial suicide for vendors of charting applications to provide such a thing as it would provide proof to users of these products that simple systems DONT WORK !, and they'd stop trading and consuming the product c) its not possible to make something that is both EASY that covers and INFINATE range of choices required by its users.

You have 3 options:

1) learn simple programming
2) pay someone else
3) keep asking for something you wont get

I'd recommend option 1 or 2
 
Alright, alright. I'll check out Ninja Trader then. And apology accepted Xeno, I may be young but I am not new to trading. Worst comes to worst, I'll just have to suck it up and learn how to program.
 
Back testing can be a tedious process if CAGR (or MACD) is to beat buy and hold.

It could be done "grossly" using EOD data, or properly, using intraday.

Floors have to be dynamic

It begins with the cash to seed the investment and the lowest start points for a moving average sample range, trailing floors, temp floor and floor liquidation rates and step values for each dynamic property.

The cost of the shares held (their liquidation costs) must computed using FIFO (first in first out) costing methods (IOW shares are liquidated at their acquisition costs example 30 shares liquidated at 15.50$ + 20 shares liquidated at 16.10$).

The buy points are a function of a dynamic high water process, close B and close W.

Then it cycles through the history and collects the settings that produce the most prosperous CAGR within an investment window. There can be thousands of iterations.

The result is the moving average, floor settings and liquidation rates, investment window and whether or not temp floors are used. These results are then plugged into the trading system.

I have a prototype for EOD. Do you have access to intra-day data?
 
Try Prorealtime.com might be helpful nice bit of EOD software with backtesting options. "Free"
 
Ninjatrader is free and has a wizard to backtest/optimize strategies. Unfortunately I'm facing the same problems, I can't program the strategies I want to use in NT using the wizard. Once I started backting simple strategies I was also disappointed with the results, compared to a simple buy and hold strategy :|
 
the rules are purely mechanical, not automated.

You are making zero sense here. You want to backtest a strategy, without telling the computer what the strategy is. And you're looking for a piece of psychic software that will take what is in your brain, apply it to some charts, and give you some sort of result.

It isn't hard to learn to program a basic strategy into a computer. If you are unable to do that, then I'd imagine you don't have the smarts to even have developed a decent strategy in the first place. Just my opinion of course.
 
Top