I ran across a new (to me) Python backtesting framework called "bt". I've been playing around with it this evening and quite like it...seems much simpler and more straightforward when compared to zipline and others. Have a look at it if you're interested in python backtesting.
I hope you can give a review of this. I looked at the package page, seems interesting. I don't really use so much python so I cant tell if you can do multiple instruments and currencies or things like spread/pairs trading. But looking forward to hearing your thoughts on this package.
The following user says Thank You to treydog999 for this post:
Will report back after playing around with it a bit. So far, it looks very interesting and on the surface looks to be a very good portfolio level backtester with rebalancing, weighting and other portfolio optimization approaches available.
The following 2 users say Thank You to ericbrown for this post:
I think you should start and try to roll your own little framework with pandas to understand your needs.
BT does look really cool. Zipline to me seems like it is designed by people who never actually trade and just had a list of features to implement so they could use it on the sales pitch when trying to get bought out, non-pythonic unneeded complexity.
My little roll your own has hit a wall from my bad programming habits and lack of programming skill. I am going to check it out also and try to post some code.
The following 3 users say Thank You to Darthtrader4beta for this post:
I have to agree on the zipline comment. i have explored that package pretty in depth. For the amount of features it has it is way over coded and over engineered. But strangly is missing some really critical functionality at the same time.
I have not looked into BT as I have stuck with my original backtesting framework instead of migrating.
However there are a ton of pluses to rolling your own backtester. First of all you know exactly how everything works and can craft it to replicate the markets you trade more exactly. Also it will lend better to moving from prototype to production assuming you build modular and have an execution and data API in the language your working in.
Also writting a backtester in a new language does help you learn it. I wrote an event driven backtester in python. And no package had everything i wanted. it did help me understand python better. But it just was not worth the time and effort at that moment. To expand it to full functionality when my old framework was fine.
of course the downside is time. Is it possible sure. Are pandas great yes. Ofcourse they are based on R's dataframe. But i think overall if you have never rolled your own backtester it is worth doing it once. Just to truly understand what functionality is critical and the details required in properly replicating market and trade conditions. You will see that a lot of assumptions that people make or retail backtesters make are really not realistic. Or are boxing you in because of coding or modularity limits. I am looking at you tradestation and ninjatrader.
I still contest pythons trading and financial packages are immature and you will end up rolling your own. They just do not have the necessary features and functionality I would deem critical in a prototyping platform. But that does not mean that python as a language is incapable. Just that you should understand the ecosystem and know that you will be doing a lot of self coding if you want a result worth putting your money on. Which is why we are all here to test strategies that we will trade with our own capital.
The following 4 users say Thank You to treydog999 for this post:
If everyone would collectively step up, futures.io (formerly BMT) members could code a new proper backtester better than anything currently available.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following 5 users say Thank You to Big Mike for this post: