Jump to content

Backtesting software using my past trades

Recommended Posts

So, I'm trying to test different strategies, and I'm wondering if there are backtesting softwares that can do this. 

I want to upload my past trades, and then move my general exit points up or down 20% to different spots to see if I could have gotten a higher return with one or the other. 

For example, maybe taking profit at 2:1 risk/reward would have less big gains, but a better winrate. Or maybe holding longer would have had a lower winrate, but would make more money overall. 

Are the programs that can do this? 

Share this post

Link to post
Share on other sites

Generally, for backtesting you have a few options.

-Quantopian : Cloud based, aimed at algorithm development.

-Zipline: Local version of Quantopian, tad complex to get setup and running right.

-Backtrader: Open Source Python backtester with ability to trade live via the IB API. Learning curve, but probably the best of the free bunch.

-Amibroker: Powerful backtest software but expensive ($400 for the complete package).

They all will do what you want if you know how to program for them, that's where it gets tricky, as you have to set them up to load in your executions and how to handle the In-trade procedure.

The tool I'm developing (and will eventually release to the community) loads your exported trades, caches the minute data for the stock, and then runs a bunch of simulations against that data before producing a report of comparisons to the baseline. For example if you wanted to compare what your PnL looked like if you never moved to breakeven and sold at R.5, R1, R1.5, and R2 levels, it'd do it. The report crunches the benchmark numbers and adds some meta data about each trade (e.g. calculated stop too close, risk reward ratio not adequate, scaled too early, didn't let run) - the goal is to give a broad brush idea to people about areas they may be able to hone their edge (a few trades flagged as scaled-too-early is just noise, a large percentage might be something to look at).

The difficult part about this is making it user friendly. 🙂

Not sure when I'll have it in a state to release, lots of projects at the moment so the passion development has to go on the back burner.


Edited by KyleK29
  • Like 2

Share this post

Link to post
Share on other sites

That's exactly what I need. To see what my P&L would have been using different exit strategies. I'm sure alot of people would pay good money for such a thing. It would actually change the trading landscape, if alot of traders realized that getting out at R3 was the best option for example. 

The only option I have right now is to try different exit points for two months and compare, but I'm not going to do that if what I am doing right now already works. 

Edited by nmarnson

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

By using this site, you agree to our Terms of Use, Privacy Policy and use of We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..