Why isn't there a back-testing program that is easy to use?

If I just want to test bollinger bands for the bast 20 years with some simple criteria like most 2% gains after a break.

This doesn't seem to hard to program and I feel like everyone always codes their own platform.

Posted Feb 8, 2019, 6:25 AM UTC

4740
chumboy•

The audience here (in r/algotrading) has two distinct backgrounds, traders learning to program, and programmers learning to trade.

To most traders, the fun side is trying to beat the market, and any programming skills picked up along the way is a bonus.

To most programmers, the fun part is just writing the software as a side project, and any monetary gain is a bonus.

Due to Reddit's reputation, I'd imagine the programmers here to be more populous, which means that tools with low technical barrier to entry tend to get deprioritised, in favour of home grown solutions, optimised for every possible technicality.

35
TheHolyLampshade•

To add, I think the third subset (perhaps smaller) of folks here work in the industry, where home grown solutions is the norm (because you are back testing your own specific trades, not designing a software solution to be used by the general public).

12
realnoobymcnoob•

I'm someone with his foot in both camps where I've worked in finance as well as pure software. I'm making my own solution, not designed to be publicly consumed. With it, I will trade forex and options. In one week, I got to the point where I can back and forward test forex.

3
algotradinglab•

If you have 20 years of data you can validate your trading idea without programming skills. Quickly and free. You can create and backtest a trading bot in TSLab. They have a powerful visual editor with a drag-and-drop interface. Plenty of built-in indicators, including BB. The program is FREE to build, backtest and optimize your strategy & trade simulation. More via this link.

I have been using TSLab for the last few years and run a portfolio of robots for US stocks.

Pros: you can quickly create and backtest a trading bot.

Cons: you need to know how to use the program. Although in your case it's pretty simple, it should not take more than an hour after installing the program.

Links to video tutorials.

A quick overview of the main features and masterclass how to create a trading bot in less than 20 min. Use convenient time stamps on video for navigation.

Hope it helps.

​

​

​

26
Mirinfromupclose•

what kind of things can you back test?

Can I test value areas, other indicators, etc without coding them in oor do they need to be developed?

1
algotradinglab•

You can backtest pretty much any market: stocks, futures, FX, cryptocurrencies, indices. It is free in the lab mode and does not require a live account with a broker. What you need to have for backtesting in TSLab: 1. A text data file with historical /offline data. 2.Set up a data provider for your security. You can watch this short video. 3. Apply your strategy to a chart.

Yes, you can test other indicators. This is the list of built-in indicators in TSLab.

In addition, you can download many others from reputable sources. That’s what I have in my TSLab

Regarding value areas. If you can define the boundaries of the value area in terms of criteria, parameters and use them to describe it in a formula, then you can backtest it. For example, if you use volume-weighted value areas then you can use standard deviations and then play around with its boundaries, finding the best parameters for your strategy. This is an example of how it may look in the optimization window. If you define your value areas as “ I know it when I see it”, then you can’t backtest it.

5
Mirinfromupclose•

thanks for the info.

i' will be starting to test things soon in python. Why use this over python?

1
nagvalru•

It is easier to build a script in the visual editor than in any programming language, no matter how simple it is. The TSLab editor is simple, easy to learn and customize. https://www.screencast.com/t/nsqWPuEsJAcn

Also TSLab interacts directly with broker servers and exchanges. There are no third parties involved in data transmission and order placement.

3
algotradinglab•

Thanks for the reply.

There is no such thing as ideal software, but there is software that suits your needs.

I tried learning python, quit after a few months ))) because of a steep learning curve. I also realized that it would be a big challenge for me to implement the whole thing for live trading with Interactive Brokers after reading their instructions on IBPy and watching tutorials IB+Python.

What is critical for me that works well in TSLab.

  • You can quickly validate your trading idea to identify an edge. Quickly, I mean in a matter of minutes, sometimes hours depending on the complexity of the conditions. Then you either discard the idea or take it further to develop. I have many “what if” scenarios from my intraday observations, which resulted in building dozens of trading bots over the last several years. However, only a few of them passed my criteria and have been deployed.

For instance, it took me less than 5 min to build a bot for the breakout of the BB lower line. See screenshots with script editor, chart view, results, and equity curve.

  • You can visually check each condition for entry on a chart before you built the whole algorithm. After adding a condition, I use a histogram to verify it on a separate panel of the chart, and then I plot the combined signal on the main panel, Attached is the screenshot. It is very convenient and saves time if you make a mistake and not sure where to find it.
2
mementix•

There are. But the 1st thing is: clear requirements.

If I just want to test bollinger bands for the bast 20 years with some simple criteria like most 2% gains after a break.

Sorry, but ...

  • break of the upper Bollinger Band?
  • break of the lower Bollinger Band?
  • Which period do you consider for the Bollinger Bands?
  • Are your trading or simply willing to see that it goes up? Because backtesters are there to trade.
  • If you trade what's the exit criterion in case it doesn't reach the 2%? (if we imagine that the 2% is your exit criterion for profit)
  • What's the actual meaning of most 2% gains?

That's why all the posters so far say it's easy with Platform A, Platform B or C, but no-one has dared posting some simple lines of code.

7
mementix•

As easy as this

import backtrader as bt


class BBandStrategy(bt.Strategy):
    params = dict(period=20, takeprofit=0.02, stoploss=0.02)

    def __init__(self):
        bband = bt.ind.BollingerBands(self.data, period=self.p.period)
         # break lower band to the downside
        self.bbreak = bt.ind.CrossDown(self.data, bband.bot)

    def notify_order(self, order):
        if order.status != bt.Order.Completed:
            return  # ignore all but completion 

        if self.position:  # just entered the market, bracket the position
            lim_price = order.executed.price * (1.0 + self.p.takeprofit)
            oco = self.sell(exectype=bt.Order.Limit, price=lim_price)
            stop_price = order.executed.price * (1.0 - self.p.stoploss)

            # issue stop order chained as oco to limit take profit order
            self.sell(exectype=bt.Order.Stop, price=stop_price, oco=oco)

    def next(self):
        if not self.position and self.bbreak:
            self.buy()

I can even tell you that the backtested profit for MSFT for 1 share over 20 years (1999-2018) is $31 ... before considering commissions.

2
cloudspikeOP•

Thank you for the example. I've started learning python but your code seems out of reach for me as of yet. Of course I would define all requirements clearly, I will try to use one of the platforms some other have recommended (or learn to code better). Thanks again

1
mementix•

See the quickstart guide: https://www.backtrader.com/docu/quickstart/quickstart.html

I guess your original post is then completely wrong.

Your title: Why isn't there a back-testing program that is easy to use?

Reality: you are new to programming and that's why things aren't easy to use.

1
cloudspikeOP•

I don't have to be a coder to use a program. Programs can be made for laymen to use, like most programs the world uses on a daily basis. You're kind of an asshole because you refuse to understand basic human communication and instead choose to talk down to someone who is looking for a solution to his problem.

I do appreciate the help, but you need to work on your social skills. You're acting like one of those autistic coder types.

-3
benjaminiscariot•

QuantConnect is pretty convenient for this, you can just back-test by entering the time period as two separate parameters when you run any given algorithm.

6
hyperflatbalance•

a free and less free collection here - https://quantpedia.com/links/backtesters

5
cute_and_funny•

Have you tried NinjaTrader? I think Quantopian can do that too. Disclaimer: I have used neither. Of course, you have to assume that they are stealing your strategies.

2
jules190•

This would be incredibly easy to program in Multicharts or Tradestation.

I have used both, both are good. Tradestation developed EasyLanguage which can be used in both platforms. Multicharts has the advantage that you can use C# or VB if you are already familiar with them.

2
tighter_wires•

Zipline is a great python module for backtesting and you can import your own data also.

2
[deleted]•

[deleted]

1
idsan•

CTrader, if your broker offers it. Uses C# only but I taught myself on it and it works well.

1
alexwang247•

Try investorsedge.net - it's the easiest I've used to date.

1
ostapchester•

That would be few lines of code on https://tradingview.com/ in PineScript. It’s pretty straightforward, give it a try

1
Brian_Cryzen•

Cryzen has a great platform for this.

1
daybyter2•

Starting the Metatrader tester is just a few mouse clicks.

1
boxxaAlgorithmic Trader•

There are plenty if you have a simple strategy and can backtest your rules on the same platforms as you run the logic. Pretty sure MT4 can do this and also crypto bots like zenbot and gekko.

Since a lot of algo traders have code that is much more complex, it’s easier to code the testing logic in the bot itself and test versus having to port it to a central platform and then back to their bots.

1
holla_snackbar•

sierra chart is the easiest way to back test the kind of shit you are talking about.

make your formula, load the chart and hit the replay button. if you run it too fast it will miss a bunch of trades

1
mementix•

if you run it too fast it will miss a bunch of trades

Good to know reliability is speed-dependent.

1
holla_snackbar•

well, if you put on 120X speed it will skip over micro structures so how fast you run it is model dependent.

we use it for rough modelling purposes only and it's a great tool for that but built out our own infrastructure for testing and execution. but for what you get for like 30 bucks it's hard to beat

1
mementix•

And if you run at 1200x speed ... it will skip over the entire structure I guess. We of course need to define what 1x speed is ... snail speed?

Sorry, speed has nothing to do with repeatability of the results.

Having something with varying results may be good for your though.

2
nagvalru•

tslab.pro

1
[deleted]•

[removed]

1
GP_LabAlgorithmic Trader•

This doesn't seem to hard to program and I feel like everyone always codes their own platform.

​

So why haven't you coded it?

I'm using my own backtester exclusively to keep full flexibility and full control over my algorithms.

1