#nk225op
nk225op is module for fetching latest NK225(Nikkei225) Options Data from JPX Server.
nk225op はJPX(日本証券取引所)のサーバーから、最新の日経225オプション清算値を取得するモジュールです。
ブラウザでお気軽に試す場合 ⇒ Jupyter Notebook example on Google Colab
Demo: (2月限と3月限 権利価格 20500~20750 の清算値とIVデータ表示)
from nk225op import nk225op as nk
nk([201902,201903] , [20500,20750])
Output:
| lb | PRICE | IV |
|---|---|---|
| 02/C20500 | 340 | 18.3289 |
| 02/C20625 | 260 | 17.5826 |
| 02/C20750 | 195 | 17.2045 |
| .......... | ... | (以下省略) |
Install: (Google Colaboratory 上での利用方法 )
!pip install nk225op
ブラウザでお気軽に試す場合 ⇒ Jupyter Notebook example on Google Colab
※ローカル環境にInstallする場合 pip install nk225op
Requirement
- Pandas
- bs4
利用できる関数:
def nk225op(maturities=None, strike_range=None):
"""Download latest Options DATA(NK255) from JPX
:param maturities: List
#eg1(monthly type): [201902]
#eg2(weekly type): [20190125]
#eg3: [201902 , 201903 , 20190125]
:param strike_range: List
#eg: [19000,20000]
:return: DataFrame
OptionsPriceList :
Examples
--------
>>> nk225op([201902],[20500, 21000])
"""
def latest_csv_path():
"""JPXサーバ内にある最新の清算値CSVファイルへのPATHを返す"""
def csv_to_df(csv_path, max_maturity_day=90):
"""
清算値CSVファイルをDataFrameに変換
Parameters
----------
csv_path : str
max_maturity_day : int , default 90
最大、SQ期日が何日後までのデータを取得するか(規定値90日後)
Returns
-------
DataFrame
"""
Release files for nk225op 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nk225op-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Release files / nk225op-0.1.9-py3-none-any.whl
| Download URL | nk225op-0.1.9-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1d34826b398bcc347ce4ce18779f372a1eff91ae0ae121e5d245b410d77dddc
|
|
BLAKE2b-256 checksum How to use checksums |
e77829f18e460be75824e2e383c38cdf56fba4223a2a349a0293a305c7c744dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.7.2 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.6.2
|