Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Question regarding an ability to use user define tickers data source

Hi, I would like to build an algorithm on top of data from the Israeli stock market. The Israeli stock market data (as local data from other countries) is not accessible via Yahoo but via local sites.
Is there a way to use such data within Quantopian, algorithm. Maybe some mechanism for me to supply my user defined data source for tickers information? (e.g. using a CSV file? or web server with specific API?)

Thanks a lot
Joe

8 responses

Hello Joe,

You can use 'fetch' to import a CSV. Daniel has probably done more than most so have a look at https://quantopian.com/posts/fetcher-problems but most of his efforts are quite hard to find via the site's 'Search' feature.

P.

Thanks a lot Peter.
It looks promising. I will look into that.
Joe

Hi,
If I understood correctly, the fetcher does not create an SID, so I can't actually use the imported data as symbols data for back testing. Just as a supporting data for the algorithm. Is this correct? Is there a way to back test my user defined symbols?

Thanks a lot
Joe

Hello Joe,

Hopefully some know a lot more than me. I had a play with 'fetch' in the attached backtest. I thought having

data['MyData']['MyValue']  

was a step in the right direction but I can't recall.

P.

This plots the value of your 'MyData' symbol. However in order to use it in an algorithm backtest you need to be able to order('MyData') it. But the order function requires an sid number, which 'MyData' does not have. Maybe there is some workaround ??
J

Hello Joe,

I think you could simulate within the Quantopian simulation i.e. read in a CSV of closing prices then simulate a Bid/Ask spread (fixed or randomly variable within a range) and then keep track of your simulated position based on those prices. You lose many Quantopian features like order handling, the slippage model and the portfolio stats. but you retain others like the event driven model, the benchmarking and the record feature. If you import code from zipline you should be able to use a library of technical indicators on your data as well. I'm thinking aloud here, really.

P.

Unfortunately, we don't yet support buying and selling of non-US securities in the backtester. You can import any data you'd like and use it as a signal, but the only buy/sell is in the US data.

I really want to change that ;) Haven't yet.

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.

OK.
Thanks a lot for all the great work you've done so far!
Joe