chriskyfung / pandas_stock_notebook

使用Pandas和Pandas Datareader的查詢香港股票的Jupyter Notebook範例

Home Page:https://medium.com/p/6264c42959d3

Repository from Github https://github.comchriskyfung/pandas_stock_notebookRepository from Github https://github.comchriskyfung/pandas_stock_notebook

pandas stock notebook

MADE WITH JYPYTER MADE WITH JYPYTER CC BY-NC-SA 4.0

使用 Pandas 和 Pandas Datareader 的查詢香港股票的 Jupyter Notebook 範例

👇 親自試試看 👨‍💻

Open In Colab Binder


安裝 Python Packages

pip install -r requirements.txt

環境變數

請將您的 Quandl API 密鑰填寫至開發專案根目錄中的 .env 文件。

QUANDL_API_KEY=<your-quandl-api-key>

用法

從 stocks.py 載入 stock_profile 類別

from stocks import stock_profile

stocks = stock_profile()

從 JSON 文件讀入股票組合清單及股票名稱索引

stocks.loadJsonProfile('./stocks.json')

從 Quandl 下載某一天的股票組合數據

from datetime import date

tickers = ['0001.hk', '0941.hk','1810.hk']
d = date(2021, 9, 15)

stocks.cacheFromQuandl(tickers, d)

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

About

使用Pandas和Pandas Datareader的查詢香港股票的Jupyter Notebook範例

https://medium.com/p/6264c42959d3

License:Other


Languages

Language:Jupyter Notebook 97.3%Language:Python 2.7%