Python Backtesting framework - Matlab, R project and Python | futures io social day trading
futures io futures trading


Python Backtesting framework
Updated: Views / Replies:7,944 / 28
Created: by ericbrown Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Python Backtesting framework

  #1 (permalink)
 Vendor: sentimentrader.com 
Tulsa, OK
 
Futures Experience: Advanced
Platform: Tradestation, TOS, Python
Broker/Data: IQFeed, Tradestation, TOS
Favorite Futures: ES, SPY, Options
 
ericbrown's Avatar
 
Posts: 201 since Jan 2011
Thanks: 339 given, 234 received

Python Backtesting framework

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.

The description of the project:


Quoting 
bt is a flexible backtesting framework for Python used to test quantitative trading strategies. Backtesting is the process of testing a strategy over a given data set. This framework allows you to easily create strategies that mix and match different Algos. It aims to foster the creation of easily testable, re-usable and flexible blocks of strategy logic to facilitate the rapid development of complex trading strategies.

The goal: to save quants from re-inventing the wheel and let them focus on the important part of the job - strategy development.

bt is coded in Python and joins a vibrant and rich ecosystem for data analysis. Numerous libraries exist for machine learning, signal processing and statistics and can be leveraged to avoid re-inventing the wheel - something that happens all too often when using other languages that donít have the same wealth of high-quality, open-source projects.


Reply With Quote
The following 6 users say Thank You to ericbrown for this post:
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
seoul, Korea
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: CQG, DTN IQfeed
Favorite Futures: YM 6E
 
treydog999's Avatar
 
Posts: 894 since Jul 2012
Thanks: 291 given, 1,006 received



ericbrown View Post
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.

The description of the project:

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.

Reply With Quote
The following user says Thank You to treydog999 for this post:
 
  #4 (permalink)
 Vendor: sentimentrader.com 
Tulsa, OK
 
Futures Experience: Advanced
Platform: Tradestation, TOS, Python
Broker/Data: IQFeed, Tradestation, TOS
Favorite Futures: ES, SPY, Options
 
ericbrown's Avatar
 
Posts: 201 since Jan 2011
Thanks: 339 given, 234 received


treydog999 View Post
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.

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.

Reply With Quote
The following 2 users say Thank You to ericbrown for this post:
 
  #5 (permalink)
Elite Member
seoul, Korea
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: CQG, DTN IQfeed
Favorite Futures: YM 6E
 
treydog999's Avatar
 
Posts: 894 since Jul 2012
Thanks: 291 given, 1,006 received


ericbrown View 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.

Wondering if there was any update on this? I am still curious if python is a viable alternative.

Reply With Quote
 
  #6 (permalink)
 Vendor: sentimentrader.com 
Tulsa, OK
 
Futures Experience: Advanced
Platform: Tradestation, TOS, Python
Broker/Data: IQFeed, Tradestation, TOS
Favorite Futures: ES, SPY, Options
 
ericbrown's Avatar
 
Posts: 201 since Jan 2011
Thanks: 339 given, 234 received


treydog999 View Post
Wondering if there was any update on this? I am still curious if python is a viable alternative.

Forgot to come back and report.

The "bt" framework is quite nice. It isn't perfect but it is a nice portfolio backtester. To your last sentence...python is always a viable alternative

Reply With Quote
The following 3 users say Thank You to ericbrown for this post:
 
  #7 (permalink)
 Vendor: diversifyportfolio.com 
PTA, Gauteng
 
Futures Experience: Advanced
Platform: Self built + Sierra + TWS
Favorite Futures: Stocks and Options
 
DarkPoolTrading's Avatar
 
Posts: 1,036 since May 2012
Thanks: 1,244 given, 1,304 received


ericbrown View Post
Forgot to come back and report.

The "bt" framework is quite nice. It isn't perfect but it is a nice portfolio backtester. To your last sentence...python is always a viable alternative

@ericbrown, it's been a few months. Have you got any more thoughts on zipline vs bt vs (anything else you've tried and like?). Pros / Cons?

Which do you think would be most suitable for the backtesting of a portfolio?
Which do you think would be easier to pick up for a beginner?

Diversification is the only free lunch
Reply With Quote
 
  #8 (permalink)
Trading Apprentice
western NY
 
Futures Experience: Intermediate
Platform: NinjaTrader, Python
Favorite Futures: equities, bonds, currency, commodities
 
Posts: 42 since Apr 2015
Thanks: 9 given, 25 received


DarkPoolTrading View Post
Which do you think would be easier to pick up for a beginner?

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.

Reply With Quote
The following 3 users say Thank You to Darthtrader4beta for this post:
 
  #9 (permalink)
Elite Member
seoul, Korea
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: CQG, DTN IQfeed
Favorite Futures: YM 6E
 
treydog999's Avatar
 
Posts: 894 since Jul 2012
Thanks: 291 given, 1,006 received


Darthtrader4beta View 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.

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.

Reply With Quote
The following 4 users say Thank You to treydog999 for this post:
 
  #10 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received


If everyone would collectively step up, futures.io (formerly BMT) members could code a new proper backtester better than anything currently available.

Mike

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.

Reply With Quote
The following 5 users say Thank You to Big Mike for this post:

Reply



futures io > > > > Python Backtesting framework

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python: Strategy backtesting baxline Matlab, R project and Python 4 October 18th, 2017 02:37 AM
Event driven backtesting in Python or R Big Mike Matlab, R project and Python 28 November 13th, 2014 01:26 AM
Hotkey Manager Framework gomi The Elite Circle 14 March 8th, 2014 12:19 AM
GomdRecorder framework and database Mrbaffalo The Elite Circle 6 March 11th, 2013 04:38 PM
Microtends Ninjatrader Framework kandlekid Trading Reviews and Vendors 2 September 17th, 2012 02:23 PM


All times are GMT -4. The time now is 08:39 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-16 in 0.13 seconds with 19 queries on phoenix via your IP 54.160.245.121