Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Writing a thesis on pair trading strategies. Should I use Quantopian for research?

Hi,

My name is Rob and I'm an absolute beginner to algo trading and python, but it seems that Quantopian simplifies the entire process of implementing an algo trading strategy. However, I'm a bit unsure about conducting thesis research through Quantopian because I'm very unfamiliar with the site.

Would you guys recommend using Quantopian to conduct academic research?
Are there other alternatives I should consider?
Is Quantopian reliable enough to endure criticism during my thesis defense?

Regardless of how I do my algo research, I'm still going to use Quantopian because the community is super helpful and seems to be the right place for a beginner. Take care and all comments will be appreciated.

9 responses

In a thesis you have to present a replicable research [edit]*to a broad academic audience*[/edit]. I do not think, a lot of academics use quantopian. You should use R or Python. By now R offers more more interfaces to financial data and more statistical packages.

[edit] You have to show valid statistical tests in your thesis. Backtesting a positive performance is not enough in a thesis. Make sure that the programming language satisfies all statistical needs. Python does not support Generalized Linear Models with Gamma distribution for instance, which is the gold standard for most predictive analytics on interval scaled data (e.g. prices, returns).
[/edit]

Further R support complex data types (vectors, matrices and data.frames) as basic feature, meaning that you can path complex data types to every R packages, while only numpy family packages support complex data types in Python. If I were you, I would choose R.

Anyway the main "programming" language of a quantitative thesis is math equations...

Consuli

I'm going to disagree with the previous poster - I think Quantopian can be a great choice.

There is a significant academic population using Quantopian today.

  • Quantopian is backed by Zipline, and open-source project. It's been reviewed by dozens of authors.
  • Quantopian is fantastic for presenting replicable research. You can share your code, and anyone can clone (copy) your code and verify your results - perfectly. There are a number of examples of other work being replicated and verified on Quantopian, too.
  • Quantopian has been cited in a handful of papers already.
  • Quantopian is Python, which Consuli notes is a good choice.
  • Pairs trading, like most algorithmic strategies, requires careful vigilance to protect against look-ahead bias. Python permits us to use an event-based simulation that reduces (removes?) the risk of look-ahead bias.
  • Quantopian is being used in several universities as a teaching tool.

Plus, of course, there are the natural benefits of using a hosted platform where all of the data cleaning, configuration, setup, storage, and distribution is taken care of for you.

Good luck in your research!

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Hey Rob,

I run Quantopian's academic outreach program. I work with a lot of academics, and help them use Quantopian for teaching and research. We are currently working with professors at many schools, including MIT Sloan and Stanford, and how platform is an excellent tool for rapid prototyping any ideas you might have. Professors get their data from many different places and analyze it using tons of different tools, the important thing is that you provide enough details to reproduce your results. My recommendation is this:

  1. Use Quantopian to research and test ideas.
  2. Save yourself time by obtaining sample analysis techniques from www.quantopian.com/lectures.
  3. Your actual results will probably be statistical tests/regressions run in the research environment and backtests run in the IDE. Once you have settled upon results, finalize the python code used to obtain them, and make pseudo-code implementations of your strategy.
  4. Publish information that you obtained your data on Quantopian, and backtested using this code.
  5. If you want to be super thorough, reimplement the strategy in another language like R and run it against data from another source. You'd have to get this data anyway if you did research off of Quantopian, so Quantopian is just making your test cycle faster. You can always reproduce later. If you can't reproduce, that's probably an indication that your results may not be consistent.
  6. Through all of these steps, show your advisor what you are doing and verify that there will not be any problems defending your work.

Please don't hesitate to reach out with Questions. Part of my job is ensuring that Quantopian fits the academic use case and I would be happy to take criticism about where the product currently fails.

Thanks,
Delaney

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Thank you Delaney. I will probably reach out to you sooner rather than later. Take care and thank you for your response.

Hey Robert, just checking in to see how's it going. Any updates?

I'm between about four projects right now and having to find time to search out pairs with a confidence interval greater than .95. However, I am making progress. I have 5 pairs and I'm working on the coding as we speak. Thank you looking into this Delaney. I'll make sure to publish any findings once everything is complete. Take care.

Sounds good, in case you didn't see them, you should be able to get a lot of analysis code from these two posts:

https://www.quantopian.com/posts/how-to-build-a-pairs-trading-strategy-on-quantopian
https://www.quantopian.com/posts/update-pairs-trading-notebook-now-with-cloning

Good luck!

Great. Thank you.

@Robert
have you already taken a look at MKTSTK (https://mktstk.wordpress.com/2015/10/06/pairs-trading-strategies/) and at the SliceMatrix (http://www.slicematrix.com/)?