Back to Community
How to use quantopian for Indian Stocks

I have tried but failed to fetch indian stock market data using quantopian Environment.anybody have idea please help.

from quantopian.research import prices, symbols

this command only fetches us equity prices and symbols

RD
9422211601

4 responses

Hi,

Have a look at this post and associated notebooks. Basically you need to import the 'Indian Equities domain' first. The below code should work:

from quantopian.pipeline import Pipeline  
from quantopian.pipeline.data import EquityPricing, factset  
from quantopian.pipeline.domain import IN_EQUITIES  
from quantopian.research import run_pipeline

pipe = Pipeline(  
    columns={  
        'price': EquityPricing.close.latest,  
        'volume': EquityPricing.volume.latest,  
        'mcap': factset.Fundamentals.mkt_val.latest,  
    },  
    domain=IN_EQUITIES,  
)

result = run_pipeline(pipe, '2015-01-15', '2016-01-15')  
result.head()  

Note that international markets are not yet supported in the IDE/backtester AFAIK.

@Joakim,

Is there domian for Chinese stocks?

I see you use the 'from quantopian.research import run_pipeline'. Where to find / to know how many imports under 'quantopian.research'?

Thanks!

There is. Have a look at the post I linked to above. Below is the code for Chinese equities:

China CN Shenzhen Stock Exchange, Shanghai Stock Exchange

You are right, many thanks!