Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running #16

Open
JayneFrack opened this issue Feb 27, 2020 · 1 comment
Open

Error when running #16

JayneFrack opened this issue Feb 27, 2020 · 1 comment

Comments

@JayneFrack
Copy link

Hi, when I try running the main.py after including all the libraries this happens:

RESTART: C:\Users\Devx86\Desktop\InteractiveBrokers-PairsTrading-Algo-master\main.py 
Connecting on host: 127.0.0.1 port: 4002
[2020-02-26 19:19:43.100615]started
Error 162, reqId 4: Historical Market Data Service error message:No market data permissions for AMEX STK, contract: Stock(symbol='SPY', exchange='SMART', currency='USD')
Error 162, reqId 5: Historical Market Data Service error message:No market data permissions for ISLAND STK, contract: Stock(symbol='QQQ', exchange='SMART', currency='USD')
Error 354, reqId 6: Requested market data is not subscribed.Delayed market data is available.Error&BEST/STK/Top&BEST/STK/Top, contract: Stock(symbol='SPY', exchange='SMART', currency='USD')
Error 354, reqId 7: Requested market data is not subscribed.Delayed market data is available.Error&BEST/STK/Top&BEST/STK/Top, contract: Stock(symbol='QQQ', exchange='SMART', currency='USD')
Traceback (most recent call last):
  File "C:\Users\Devx86\Desktop\InteractiveBrokers-PairsTrading-Algo-master\main.py", line 29, in <module>
    model.run(to_trade=to_trade, trade_qty=100)
  File "C:\Users\Devx86\Desktop\InteractiveBrokers-PairsTrading-Algo-master\models\hft_model_1.py", line 67, in run
    self.recalculate_strategy_params()
  File "C:\Users\Devx86\Desktop\InteractiveBrokers-PairsTrading-Algo-master\models\hft_model_1.py", line 182, in recalculate_strategy_params
    resampled = self.df_hist.resample('30s').ffill().dropna()
  File "C:\Users\Devx86\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\generic.py", line 8155, in resample
    base=base, key=on, level=level)
  File "C:\Users\Devx86\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\resample.py", line 1250, in resample
    return tg._get_resampler(obj, kind=kind)
  File "C:\Users\Devx86\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\resample.py", line 1380, in _get_resampler
    "but got an instance of %r" % type(ax).__name__)
TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Index'

I would really appreciate help, thank you.

@SC4RECOIN
Copy link

Looks like you do not have market data permissions on your account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants