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

01_parse_itch_order_flow_messages #306

Closed
BasselCapm opened this issue Sep 19, 2023 · 3 comments
Closed

01_parse_itch_order_flow_messages #306

BasselCapm opened this issue Sep 19, 2023 · 3 comments

Comments

@BasselCapm
Copy link

BasselCapm commented Sep 19, 2023

No description provided.

@Eating-Sulfur
Copy link

Eating-Sulfur commented Sep 19, 2023 via email

@Yunbo-max
Copy link


KeyError Traceback (most recent call last)
/Users/yunbo-max/Desktop/CUATS/machine-learning-for-trading/02_market_and_fundamental_data/01_NASDAQ_TotalView-ITCH_Order_Book/01_parse_itch_order_flow_messages.ipynb Cell 81 line 3
1 with pd.HDFStore(itch_store) as store:
2 stocks = store['R'].loc[:, ['stock_locate', 'stock']]
----> 3 trades = store['P'].append(store['Q'].rename(columns={'cross_price': 'price'}), sort=False).merge(stocks)
5 trades['value'] = trades.shares.mul(trades.price)
6 trades['value_share'] = trades.value.div(trades.value.sum())

File ~/anaconda3/envs/Cambridge/lib/python3.10/site-packages/pandas/io/pytables.py:596, in HDFStore.getitem(self, key)
595 def getitem(self, key: str):
--> 596 return self.get(key)

File ~/anaconda3/envs/Cambridge/lib/python3.10/site-packages/pandas/io/pytables.py:790, in HDFStore.get(self, key)
788 group = self.get_node(key)
789 if group is None:
--> 790 raise KeyError(f"No object named {key} in the file")
791 return self._read_group(group)

KeyError: 'No object named P in the file'.

Why this error shows all the time

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

5 participants