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

Modernize IEX_Trading #398

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 70 additions & 149 deletions iex_trading/IEX_stocks.ipynb
Azaya89 marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

29 changes: 19 additions & 10 deletions iex_trading/IEX_to_CSV.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
"source": [
"## Converting IEX trades to CSV\n",
"\n",
"This notebook requires the\n",
"[IEXTools](https://pypi.org/project/IEXTools/) library (available on\n",
"PyPI via pip) and the TOPS pcap file for 2019-10-21 and 2019-10-25\n",
"available from the [IEX\n",
"exchange](https://iextrading.com/trading/market-data/#hist-download)."
"This notebook requires the [IEXTools](https://pypi.org/project/IEXTools/) library (available on PyPI via pip) and the TOPS pcap file for 2019-10-21 and 2019-10-25 available from the [IEX exchange](https://iextrading.com/trading/market-data/#hist-download)."
]
},
{
Expand All @@ -37,7 +33,7 @@
"outputs": [],
"source": [
"date = '2019-10-21' # Note that this notebook needs to be run once per date to process'\n",
"p = Parser(r'%s.pcap' % date, tops=True, deep=False)"
"p = Parser(rf'{date}.pcap', tops=True, deep=False)"
]
},
{
Expand Down Expand Up @@ -95,7 +91,7 @@
"metadata": {},
"outputs": [],
"source": [
"df.price_int = df.price_int / 10000.0\n",
"df['price_int'] = df['price_int'] / 10000.0\n",
"df = df.rename(columns={'price_int':'price'})\n",
"df.head()"
]
Expand All @@ -113,17 +109,30 @@
"metadata": {},
"outputs": [],
"source": [
"df.to_csv('IEX_%s.csv' % date, index=False)\n",
"df.to_csv(f'IEX_{date}.csv', index=False)\n",
"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"pygments_lexer": "ipython3"
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
196 changes: 49 additions & 147 deletions iex_trading/IEX_trading.ipynb
Azaya89 marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

Loading
Loading