Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Newbie Question-Backtesting Imported Data

Hi!

I am new to Quantopian and was wondering if it is possible to import data (using Fetcher) from Quandl and "store" it temporarily as an SID. This would allow me to use a conventional algorithm that I have already developed on a data set not included in Quantopian. If this is possible, or there is any other way to do this, I would love to know!

Thanks!

2 responses

Hey Tristan,
Do you mean executing an order, etc. on imported data? It's not currently possible, unfortunately. I was thinking about this the other day — one thing you can do is import a set of data and then use some custom functions to emulate a backtest. Quantopian is well suited for this since it frames through bars and runs code each time.

It should be possible and not too difficult to make a pseudo-portfolio and a set of functions to handle orders dealing with this portfolio. You can just use record() to plot benchmark returns and portfolio returns each bar. Is that something you can work off of? If you're not familiar with importing data and using record() my post here should help: https://www.quantopian.com/posts/how-can-i-use-commodity-futures-data-like-cme-copper-or-lme-copper-for-backtest#51eea355723ee8ca9a00003a

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.

Thanks Gus!
I had been experimenting with Fetcher, mostly cobbling bits and pieces of other's work together, and it came out very similar to your example (although not nearly as clean :D). My only other questions are:
How would you suggest going about making the psuedo-portfolio?
Do you have any idea when a feature similar to what I described in the original question will become possible?
Thank you so much for your help!
Tristan