Download latest Option Price(nk255) from JPX
Project description
#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
"""
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nk225op-0.1.9-py3-none-any.whl.
File metadata
- Download URL: nk225op-0.1.9-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1d34826b398bcc347ce4ce18779f372a1eff91ae0ae121e5d245b410d77dddc
|
|
| MD5 |
52911052de04a7b97060bfa8d0b8e30c
|
|
| BLAKE2b-256 |
e77829f18e460be75824e2e383c38cdf56fba4223a2a349a0293a305c7c744dd
|