On trying to backtest on certain stock symbols i am getting no price data. For eg. ran the below code for 2 symbols - 'EROSMEDIA','ARSSINFRA' which are around since 2019. The backtest starts from Jan 2022 (2022-01-03) using the below code i am getting nan as price for the most recent date for EROSMEDIA and no price at all for ARSSINFRA, why would that be ?
CODE -
context.securities = [symbol('EROSMEDIA'), sumbol('ARSSINFRA')]
price_data = data.history(context.securities, 'close',201,'1d')
for security in context.securities:
px = price_data.loc[:,security].values
print(security,px[-1],px[-2],px[-100],px[-200],px[1],px[2])
Output
datetime 2022-01-03 09:45:00+05:30
inside generate_signals
Equity(EROSMEDIA [250]) nan nan 21.35 30.25 30.25 29.7
Equity(ARSSINFRA [61]) nan nan nan nan nan nan