akshare 1.16.8__tar.gz → 1.16.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {akshare-1.16.8 → akshare-1.16.10}/PKG-INFO +1 -1
- {akshare-1.16.8 → akshare-1.16.10}/akshare/__init__.py +3 -1
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_em.py +1 -1
- akshare-1.16.10/akshare/option/option_premium_analysis_em.py +83 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_risk_analysis_em.py +5 -4
- akshare-1.16.10/akshare/option/option_value_analysis_em.py +89 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_intraday_sina.py +2 -2
- akshare-1.16.10/akshare/stock/stock_summary.py +327 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare.egg-info/PKG-INFO +1 -1
- akshare-1.16.8/akshare/option/option_premium_analysis_em.py +0 -80
- akshare-1.16.8/akshare/option/option_value_analysis_em.py +0 -82
- akshare-1.16.8/akshare/stock/stock_summary.py +0 -657
- {akshare-1.16.8 → akshare-1.16.10}/LICENSE +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/README.md +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/air/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/air/air_hebei.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/air/air_zhenqi.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/air/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/air/crypto.js +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/air/outcrypto.js +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/air/sunrise_tad.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/article/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/article/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/article/epu_index.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/article/ff_factor.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/article/fred_md.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/article/risk_rv.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bank/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bank/bank_cbirc_2020.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bank/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_cb_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_cb_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_cbond.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_china.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_china_money.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_convert.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_info_cm.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_issue_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_nafmii.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_summary.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_zh_cov.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/bond_zh_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/bond/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/cal/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/cal/rv.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/cost/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/cost/cost_living.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/crypto/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/crypto/crypto_bitcoin_cme.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/crypto/crypto_hold.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/currency/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/currency/currency.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/currency/currency_china_bank_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/currency/currency_safe.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/data/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/data/cninfo.js +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/data/crypto_info.zip +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/data/ths.js +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/datasets.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_australia.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_bank.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_canada.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_china.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_china_hk.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_china_nbs.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_constitute.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_euro.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_finance_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_germany.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_info_ws.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_japan.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_other.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_swiss.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_uk.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/macro_usa.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/economic/marco_cnbs.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/energy/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/energy/energy_carbon.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/energy/energy_oil_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/event/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/event/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/event/migration.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/exceptions.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/file_fold/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/file_fold/calendar.json +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fortune/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fortune/fortune_500.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fortune/fortune_bloomberg.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fortune/fortune_forbes_500.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fortune/fortune_hurun.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fortune/fortune_xincaifu_500.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_amac.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_announcement.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_aum_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_etf_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_etf_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_etf_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_fee_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_fhsp_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_init_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_lof_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_manager.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_portfolio_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_position_lg.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_rank_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_rating.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_report_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_scale_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_scale_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fund/fund_xq.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/cot.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_basis.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_comex_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_comm_ctp.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_comm_qihuo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_contract_detail.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_daily_bar.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_foreign.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_hf_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_hist_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_hq_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_index_ccidx.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_inventory_99.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_inventory_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_news_shmet.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_roll_yield.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_rule.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_rule_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_settlement_price_sgx.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_spot_stock_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_stock_js.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_to_spot.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_warehouse_receipt.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/futures_zh_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/receipt.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/requests_fun.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures/symbol_var.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_contract_info_cffex.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_contract_info_czce.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_contract_info_dce.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_contract_info_gfex.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_contract_info_ine.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_contract_info_shfe.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_cot_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_hog.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_index_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/futures_derivative/futures_spot_sys.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fx/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fx/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fx/currency_investing.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fx/fx_quote.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/fx/fx_quote_baidu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/hf/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/hf/hf_sp500.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_cflp.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_cni.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_cx.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_drewry.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_eri.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_hog.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_kq_fz.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_kq_ss.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_option_qvix.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_research_fund_sw.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_research_sw.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_spot.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_stock_hk.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_stock_us_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_stock_zh.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_stock_zh_csindex.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_sugar.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_sw.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_yw.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_zh_a_scope.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/index/index_zh_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/interest_rate/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/interest_rate/interbank_rate_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/movie/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/movie/artist_yien.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/movie/jm.js +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/movie/movie_yien.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/movie/video_yien.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/news/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/news/news_baidu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/news/news_cctv.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/news/news_stock.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/nlp/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/nlp/nlp_interface.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_comm_qihuo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_commodity.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_commodity_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_czce.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_daily_stats_sse_szse.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_finance.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_finance_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_lhb_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/option/option_risk_indicator_sse.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/other/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/other/other_car_cpca.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/other/other_car_gasgoo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/pro/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/pro/client.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/pro/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/pro/data_pro.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qdii/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qdii/qdii_jsl.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qhkc/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qhkc/qhkc_api.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qhkc_web/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qhkc_web/qhkc_fund.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qhkc_web/qhkc_index.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/qhkc_web/qhkc_tool.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/rate/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/rate/repo_rate.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/reits/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/reits/reits_basic.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/request.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/sport/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/sport/sport_olympic.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/spot/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/spot/spot_hog_soozhu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/spot/spot_price_qh.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/spot/spot_sge.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_allotment_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_ask_bid_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_board_concept_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_board_industry_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_cg_equity_mortgage.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_cg_guarantee.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_cg_lawsuit.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_dividend_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_dzjy_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_fund_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_fund_hold.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_gsrl_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hk_famous.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hk_fhpx_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hk_hot_rank_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hk_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hold_control_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hold_control_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hold_num_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hot_rank_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hot_search_baidu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_hot_up_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_industry.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_industry_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_industry_pe_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_industry_sw.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_info.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_info_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_intraday_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_ipo_summary_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_new_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_news_cx.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_profile_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_rank_forecast.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_repurchase_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_share_changes_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_share_hold.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_stop.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_us_famous.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_us_js.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_us_pink.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_us_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_weibo_nlp.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_xq.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_zh_a_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_zh_a_special.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_zh_a_tick_tx.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_zh_ah_tx.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_zh_b_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_zh_kcb_report.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock/stock_zh_kcb_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_a_below_net_asset_statistics.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_a_high_low.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_a_indicator.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_a_pe_and_pb.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_account_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_all_pb.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_analyst_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_board_industry_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_buffett_index_lg.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_classify_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_comment_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_concept_futu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_congestion_lg.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_cyq_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_disclosure_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_dxsyl_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_ebs_lg.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_esg_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_fhps_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_fhps_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_fund_flow.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_gddh_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_gdfx_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_gdhs.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_gdzjc_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_gpzy_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_gxl_lg.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_hist_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_hist_tx.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_hk_valuation_baidu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_hot_xq.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_hsgt_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_hsgt_exchange_rate.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_hsgt_min_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_info.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_inner_trade_xq.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_irm_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_jgdy_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_lh_yybpm.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_lhb_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_lhb_sina.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_margin_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_margin_sse.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_margin_szse.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_market_legu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_pankou_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_qsjy_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_report_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_research_report_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_sns_sseinfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_sy_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_technology_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_tfp_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_three_report_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_ttm_lyr.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_value_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_wencai.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_yjbb_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_yjyg_cninfo.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_yjyg_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_yzxdr_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_zdhtmx_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_zf_pg.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_zh_valuation_baidu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_zh_vote_baidu.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/stock_ztb_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_feature/ths.js +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_finance.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_finance_hk.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_finance_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_hold.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_ipo_declare.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_kcb_detail_sse.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_kcb_sse.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_mda_ym.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_notice.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_profit_forecast_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_profit_forecast_hk_etnet.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_profit_forecast_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_recommend.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_register_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_restricted_em.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_zygc.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/stock_fundamental/stock_zyjs_ths.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/tool/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/tool/trade_date_hist.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/utils/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/utils/cons.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/utils/context.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/utils/demjson.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/utils/func.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/utils/token_process.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare/utils/tqdm.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare.egg-info/SOURCES.txt +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare.egg-info/dependency_links.txt +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare.egg-info/requires.txt +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/akshare.egg-info/top_level.txt +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/pyproject.toml +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/setup.cfg +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/setup.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/tests/__init__.py +0 -0
- {akshare-1.16.8 → akshare-1.16.10}/tests/test_func.py +0 -0
@@ -3017,9 +3017,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
3017
3017
|
1.16.6 fix: fix stock_sgt_reference_exchange_rate_sse interface
|
3018
3018
|
1.16.7 fix: fix fund_lof_hist_em interface
|
3019
3019
|
1.16.8 fix: fix option_czce_daily interface
|
3020
|
+
1.16.9 fix: fix stock_sse_deal_daily interface
|
3021
|
+
1.16.10 fix: fix option_risk_analysis_em interface
|
3020
3022
|
"""
|
3021
3023
|
|
3022
|
-
__version__ = "1.16.
|
3024
|
+
__version__ = "1.16.10"
|
3023
3025
|
__author__ = "AKFamily"
|
3024
3026
|
|
3025
3027
|
import sys
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# -*- coding:utf-8 -*-
|
2
|
+
# !/usr/bin/env python
|
3
|
+
"""
|
4
|
+
Date: 2025/2/22 21:00
|
5
|
+
Desc: 东方财富网-数据中心-特色数据-期权折溢价
|
6
|
+
https://data.eastmoney.com/other/premium.html
|
7
|
+
"""
|
8
|
+
|
9
|
+
import requests
|
10
|
+
import pandas as pd
|
11
|
+
|
12
|
+
|
13
|
+
def option_premium_analysis_em() -> pd.DataFrame:
|
14
|
+
"""
|
15
|
+
东方财富网-数据中心-特色数据-期权折溢价
|
16
|
+
https://data.eastmoney.com/other/premium.html
|
17
|
+
:return: 期权折溢价
|
18
|
+
:rtype: pandas.DataFrame
|
19
|
+
"""
|
20
|
+
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
21
|
+
params = {
|
22
|
+
"fid": "f250",
|
23
|
+
"po": "1",
|
24
|
+
"pz": "50000",
|
25
|
+
"pn": "1",
|
26
|
+
"np": "2",
|
27
|
+
"fltt": "2",
|
28
|
+
"invt": "2",
|
29
|
+
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
30
|
+
"fields": "f1,f2,f3,f12,f13,f14,f161,f250,f330,f331,f332,f333,f334,f335,f337,f301,f152",
|
31
|
+
"fs": "m:10",
|
32
|
+
}
|
33
|
+
r = requests.get(url, params=params)
|
34
|
+
data_json = r.json()
|
35
|
+
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
36
|
+
temp_df.columns = [
|
37
|
+
"-",
|
38
|
+
"最新价",
|
39
|
+
"涨跌幅",
|
40
|
+
"期权代码",
|
41
|
+
"-",
|
42
|
+
"期权名称",
|
43
|
+
"-",
|
44
|
+
"行权价",
|
45
|
+
"折溢价率",
|
46
|
+
"到期日",
|
47
|
+
"-",
|
48
|
+
"-",
|
49
|
+
"-",
|
50
|
+
"标的名称",
|
51
|
+
"标的最新价",
|
52
|
+
"标的涨跌幅",
|
53
|
+
"盈亏平衡价",
|
54
|
+
]
|
55
|
+
temp_df = temp_df[
|
56
|
+
[
|
57
|
+
"期权代码",
|
58
|
+
"期权名称",
|
59
|
+
"最新价",
|
60
|
+
"涨跌幅",
|
61
|
+
"行权价",
|
62
|
+
"折溢价率",
|
63
|
+
"标的名称",
|
64
|
+
"标的最新价",
|
65
|
+
"标的涨跌幅",
|
66
|
+
"盈亏平衡价",
|
67
|
+
"到期日",
|
68
|
+
]
|
69
|
+
]
|
70
|
+
temp_df["最新价"] = pd.to_numeric(temp_df["最新价"], errors="coerce")
|
71
|
+
temp_df["涨跌幅"] = pd.to_numeric(temp_df["涨跌幅"], errors="coerce")
|
72
|
+
temp_df["行权价"] = pd.to_numeric(temp_df["行权价"], errors="coerce")
|
73
|
+
temp_df["折溢价率"] = pd.to_numeric(temp_df["折溢价率"], errors="coerce")
|
74
|
+
temp_df["标的最新价"] = pd.to_numeric(temp_df["标的最新价"], errors="coerce")
|
75
|
+
temp_df["标的涨跌幅"] = pd.to_numeric(temp_df["标的涨跌幅"], errors="coerce")
|
76
|
+
temp_df["盈亏平衡价"] = pd.to_numeric(temp_df["盈亏平衡价"], errors="coerce")
|
77
|
+
temp_df["到期日"] = pd.to_datetime(temp_df["到期日"].astype(str)).dt.date
|
78
|
+
return temp_df
|
79
|
+
|
80
|
+
|
81
|
+
if __name__ == "__main__":
|
82
|
+
option_premium_analysis_em_df = option_premium_analysis_em()
|
83
|
+
print(option_premium_analysis_em_df)
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# -*- coding:utf-8 -*-
|
2
2
|
# !/usr/bin/env python
|
3
3
|
"""
|
4
|
-
Date:
|
4
|
+
Date: 2025/2/22 21:00
|
5
5
|
Desc: 东方财富网-数据中心-特色数据-期权风险分析
|
6
6
|
https://data.eastmoney.com/other/riskanal.html
|
7
7
|
"""
|
8
|
+
|
8
9
|
import requests
|
9
10
|
import pandas as pd
|
10
11
|
|
@@ -20,9 +21,9 @@ def option_risk_analysis_em() -> pd.DataFrame:
|
|
20
21
|
params = {
|
21
22
|
"fid": "f3",
|
22
23
|
"po": "1",
|
23
|
-
"pz": "
|
24
|
+
"pz": "50000",
|
24
25
|
"pn": "1",
|
25
|
-
"np": "
|
26
|
+
"np": "2",
|
26
27
|
"fltt": "2",
|
27
28
|
"invt": "2",
|
28
29
|
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
@@ -31,7 +32,7 @@ def option_risk_analysis_em() -> pd.DataFrame:
|
|
31
32
|
}
|
32
33
|
r = requests.get(url, params=params)
|
33
34
|
data_json = r.json()
|
34
|
-
temp_df = pd.DataFrame(data_json["data"]["diff"])
|
35
|
+
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
35
36
|
temp_df.columns = [
|
36
37
|
"-",
|
37
38
|
"最新价",
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# -*- coding:utf-8 -*-
|
2
|
+
# !/usr/bin/env python
|
3
|
+
"""
|
4
|
+
Date: 2025/2/22 21:00
|
5
|
+
Desc: 东方财富网-数据中心-特色数据-期权价值分析
|
6
|
+
https://data.eastmoney.com/other/valueAnal.html
|
7
|
+
"""
|
8
|
+
|
9
|
+
import requests
|
10
|
+
import pandas as pd
|
11
|
+
|
12
|
+
|
13
|
+
def option_value_analysis_em() -> pd.DataFrame:
|
14
|
+
"""
|
15
|
+
东方财富网-数据中心-特色数据-期权价值分析
|
16
|
+
https://data.eastmoney.com/other/valueAnal.html
|
17
|
+
:return: 期权价值分析
|
18
|
+
:rtype: pandas.DataFrame
|
19
|
+
"""
|
20
|
+
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
21
|
+
params = {
|
22
|
+
"fid": "f301",
|
23
|
+
"po": "1",
|
24
|
+
"pz": "50000",
|
25
|
+
"pn": "1",
|
26
|
+
"np": "2",
|
27
|
+
"fltt": "2",
|
28
|
+
"invt": "2",
|
29
|
+
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
30
|
+
"fields": "f1,f2,f3,f12,f13,f14,f298,f299,f249,f300,f330,f331,f332,f333,f334,f335,f336,f301,f152",
|
31
|
+
"fs": "m:10",
|
32
|
+
}
|
33
|
+
r = requests.get(url, params=params)
|
34
|
+
data_json = r.json()
|
35
|
+
temp_df = pd.DataFrame(data_json["data"]["diff"]).T
|
36
|
+
temp_df.columns = [
|
37
|
+
"-",
|
38
|
+
"最新价",
|
39
|
+
"-",
|
40
|
+
"期权代码",
|
41
|
+
"-",
|
42
|
+
"期权名称",
|
43
|
+
"-",
|
44
|
+
"隐含波动率",
|
45
|
+
"时间价值",
|
46
|
+
"内在价值",
|
47
|
+
"理论价格",
|
48
|
+
"到期日",
|
49
|
+
"-",
|
50
|
+
"-",
|
51
|
+
"-",
|
52
|
+
"标的名称",
|
53
|
+
"标的最新价",
|
54
|
+
"-",
|
55
|
+
"标的近一年波动率",
|
56
|
+
]
|
57
|
+
temp_df = temp_df[
|
58
|
+
[
|
59
|
+
"期权代码",
|
60
|
+
"期权名称",
|
61
|
+
"最新价",
|
62
|
+
"时间价值",
|
63
|
+
"内在价值",
|
64
|
+
"隐含波动率",
|
65
|
+
"理论价格",
|
66
|
+
"标的名称",
|
67
|
+
"标的最新价",
|
68
|
+
"标的近一年波动率",
|
69
|
+
"到期日",
|
70
|
+
]
|
71
|
+
]
|
72
|
+
temp_df["最新价"] = pd.to_numeric(temp_df["最新价"], errors="coerce")
|
73
|
+
temp_df["时间价值"] = pd.to_numeric(temp_df["时间价值"], errors="coerce")
|
74
|
+
temp_df["内在价值"] = pd.to_numeric(temp_df["内在价值"], errors="coerce")
|
75
|
+
temp_df["隐含波动率"] = pd.to_numeric(temp_df["隐含波动率"], errors="coerce")
|
76
|
+
temp_df["理论价格"] = pd.to_numeric(temp_df["理论价格"], errors="coerce")
|
77
|
+
temp_df["标的最新价"] = pd.to_numeric(temp_df["标的最新价"], errors="coerce")
|
78
|
+
temp_df["标的近一年波动率"] = pd.to_numeric(
|
79
|
+
temp_df["标的近一年波动率"], errors="coerce"
|
80
|
+
)
|
81
|
+
temp_df["到期日"] = pd.to_datetime(
|
82
|
+
temp_df["到期日"].astype(str), errors="coerce"
|
83
|
+
).dt.date
|
84
|
+
return temp_df
|
85
|
+
|
86
|
+
|
87
|
+
if __name__ == "__main__":
|
88
|
+
option_value_analysis_em_df = option_value_analysis_em()
|
89
|
+
print(option_value_analysis_em_df)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
# -*- coding:utf-8 -*-
|
3
3
|
"""
|
4
|
-
Date:
|
4
|
+
Date: 2025/2/21 18:00
|
5
5
|
Desc: 新浪财经-日内分时数据
|
6
6
|
https://quote.eastmoney.com/f1.html?newcode=0.000001
|
7
7
|
"""
|
@@ -64,5 +64,5 @@ def stock_intraday_sina(
|
|
64
64
|
|
65
65
|
|
66
66
|
if __name__ == "__main__":
|
67
|
-
stock_intraday_sina_df = stock_intraday_sina(symbol="sz000001", date="
|
67
|
+
stock_intraday_sina_df = stock_intraday_sina(symbol="sz000001", date="20250221")
|
68
68
|
print(stock_intraday_sina_df)
|
@@ -0,0 +1,327 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding:utf-8 -*-
|
3
|
+
"""
|
4
|
+
Date: 2024/9/1 16:00
|
5
|
+
Desc: 股票数据-总貌-市场总貌
|
6
|
+
股票数据-总貌-成交概括
|
7
|
+
https://www.szse.cn/market/overview/index.html
|
8
|
+
https://www.sse.com.cn/market/stockdata/statistic/
|
9
|
+
"""
|
10
|
+
|
11
|
+
import warnings
|
12
|
+
from io import BytesIO, StringIO
|
13
|
+
|
14
|
+
import pandas as pd
|
15
|
+
import requests
|
16
|
+
from bs4 import BeautifulSoup
|
17
|
+
|
18
|
+
|
19
|
+
def stock_szse_summary(date: str = "20240830") -> pd.DataFrame:
|
20
|
+
"""
|
21
|
+
深证证券交易所-总貌-证券类别统计
|
22
|
+
https://www.szse.cn/market/overview/index.html
|
23
|
+
:param date: 最近结束交易日
|
24
|
+
:type date: str
|
25
|
+
:return: 证券类别统计
|
26
|
+
:rtype: pandas.DataFrame
|
27
|
+
"""
|
28
|
+
url = "http://www.szse.cn/api/report/ShowReport"
|
29
|
+
params = {
|
30
|
+
"SHOWTYPE": "xlsx",
|
31
|
+
"CATALOGID": "1803_sczm",
|
32
|
+
"TABKEY": "tab1",
|
33
|
+
"txtQueryDate": "-".join([date[:4], date[4:6], date[6:]]),
|
34
|
+
"random": "0.39339437497296137",
|
35
|
+
}
|
36
|
+
r = requests.get(url, params=params)
|
37
|
+
with warnings.catch_warnings(record=True):
|
38
|
+
warnings.simplefilter("always")
|
39
|
+
temp_df = pd.read_excel(BytesIO(r.content), engine="openpyxl")
|
40
|
+
temp_df["证券类别"] = temp_df["证券类别"].str.strip()
|
41
|
+
temp_df.iloc[:, 2:] = temp_df.iloc[:, 2:].map(lambda x: x.replace(",", ""))
|
42
|
+
temp_df.columns = ["证券类别", "数量", "成交金额", "总市值", "流通市值"]
|
43
|
+
temp_df["数量"] = pd.to_numeric(temp_df["数量"], errors="coerce")
|
44
|
+
temp_df["成交金额"] = pd.to_numeric(temp_df["成交金额"], errors="coerce")
|
45
|
+
temp_df["总市值"] = pd.to_numeric(temp_df["总市值"], errors="coerce")
|
46
|
+
temp_df["流通市值"] = pd.to_numeric(temp_df["流通市值"], errors="coerce")
|
47
|
+
return temp_df
|
48
|
+
|
49
|
+
|
50
|
+
def stock_szse_area_summary(date: str = "202203") -> pd.DataFrame:
|
51
|
+
"""
|
52
|
+
深证证券交易所-总貌-地区交易排序
|
53
|
+
https://www.szse.cn/market/overview/index.html
|
54
|
+
:param date: 最近结束交易日
|
55
|
+
:type date: str
|
56
|
+
:return: 地区交易排序
|
57
|
+
:rtype: pandas.DataFrame
|
58
|
+
"""
|
59
|
+
url = "https://www.szse.cn/api/report/ShowReport"
|
60
|
+
params = {
|
61
|
+
"SHOWTYPE": "xlsx",
|
62
|
+
"CATALOGID": "1803_sczm",
|
63
|
+
"TABKEY": "tab2",
|
64
|
+
"DATETIME": "-".join([date[:4], date[4:6]]),
|
65
|
+
"random": "0.39339437497296137",
|
66
|
+
}
|
67
|
+
r = requests.get(url, params=params)
|
68
|
+
with warnings.catch_warnings(record=True):
|
69
|
+
warnings.simplefilter("always")
|
70
|
+
temp_df = pd.read_excel(BytesIO(r.content), engine="openpyxl")
|
71
|
+
temp_df.columns = [
|
72
|
+
"序号",
|
73
|
+
"地区",
|
74
|
+
"总交易额",
|
75
|
+
"占市场",
|
76
|
+
"股票交易额",
|
77
|
+
"基金交易额",
|
78
|
+
"债券交易额",
|
79
|
+
]
|
80
|
+
temp_df["总交易额"] = temp_df["总交易额"].str.replace(",", "")
|
81
|
+
temp_df["总交易额"] = pd.to_numeric(temp_df["总交易额"], errors="coerce")
|
82
|
+
temp_df["占市场"] = pd.to_numeric(temp_df["占市场"], errors="coerce")
|
83
|
+
temp_df["股票交易额"] = temp_df["股票交易额"].str.replace(",", "")
|
84
|
+
temp_df["股票交易额"] = pd.to_numeric(temp_df["股票交易额"], errors="coerce")
|
85
|
+
temp_df["基金交易额"] = temp_df["基金交易额"].str.replace(",", "")
|
86
|
+
temp_df["基金交易额"] = pd.to_numeric(temp_df["基金交易额"], errors="coerce")
|
87
|
+
temp_df["债券交易额"] = temp_df["债券交易额"].str.replace(",", "")
|
88
|
+
temp_df["债券交易额"] = pd.to_numeric(temp_df["债券交易额"], errors="coerce")
|
89
|
+
return temp_df
|
90
|
+
|
91
|
+
|
92
|
+
def stock_szse_sector_summary(
|
93
|
+
symbol: str = "当月", date: str = "202501"
|
94
|
+
) -> pd.DataFrame:
|
95
|
+
"""
|
96
|
+
深圳证券交易所-统计资料-股票行业成交数据
|
97
|
+
https://docs.static.szse.cn/www/market/periodical/month/W020220511355248518608.html
|
98
|
+
:param symbol: choice of {"当月", "当年"}
|
99
|
+
:type symbol: str
|
100
|
+
:param date: 交易年月
|
101
|
+
:type date: str
|
102
|
+
:return: 股票行业成交数据
|
103
|
+
:rtype: pandas.DataFrame
|
104
|
+
"""
|
105
|
+
url = "https://www.szse.cn/market/periodical/month/index.html"
|
106
|
+
r = requests.get(url)
|
107
|
+
r.encoding = "utf8"
|
108
|
+
soup = BeautifulSoup(r.text, features="lxml")
|
109
|
+
tags_list = soup.find_all(name="div", attrs={"class": "g-container"})[1].find_all(
|
110
|
+
"script"
|
111
|
+
)
|
112
|
+
tags_dict = [
|
113
|
+
eval(
|
114
|
+
item.string[item.string.find("{") : item.string.find("}") + 1]
|
115
|
+
.replace("\n", "")
|
116
|
+
.replace(" ", "")
|
117
|
+
.replace("value", "'value'")
|
118
|
+
.replace("text", "'text'")
|
119
|
+
)
|
120
|
+
for item in tags_list
|
121
|
+
]
|
122
|
+
date_url_dict = dict(
|
123
|
+
zip(
|
124
|
+
[item["text"] for item in tags_dict],
|
125
|
+
[item["value"][2:] for item in tags_dict],
|
126
|
+
)
|
127
|
+
)
|
128
|
+
date_format = "-".join([date[:4], date[4:]])
|
129
|
+
url = f"https://www.szse.cn/market/periodical/month/{date_url_dict[date_format]}"
|
130
|
+
r = requests.get(url)
|
131
|
+
r.encoding = "utf8"
|
132
|
+
soup = BeautifulSoup(r.text, features="lxml")
|
133
|
+
url = [
|
134
|
+
item for item in soup.find_all("a") if item.get_text() == "股票行业成交数据"
|
135
|
+
][0]["href"]
|
136
|
+
|
137
|
+
if symbol == "当月":
|
138
|
+
r = requests.get(url)
|
139
|
+
temp_df = pd.read_html(StringIO(r.text), encoding="gbk")[0]
|
140
|
+
temp_df.columns = [
|
141
|
+
"项目名称",
|
142
|
+
"项目名称-英文",
|
143
|
+
"交易天数",
|
144
|
+
"成交金额-人民币元",
|
145
|
+
"成交金额-占总计",
|
146
|
+
"成交股数-股数",
|
147
|
+
"成交股数-占总计",
|
148
|
+
"成交笔数-笔",
|
149
|
+
"成交笔数-占总计",
|
150
|
+
]
|
151
|
+
else:
|
152
|
+
temp_df = pd.read_html(url, encoding="gbk")[1]
|
153
|
+
temp_df.columns = [
|
154
|
+
"项目名称",
|
155
|
+
"项目名称-英文",
|
156
|
+
"交易天数",
|
157
|
+
"成交金额-人民币元",
|
158
|
+
"成交金额-占总计",
|
159
|
+
"成交股数-股数",
|
160
|
+
"成交股数-占总计",
|
161
|
+
"成交笔数-笔",
|
162
|
+
"成交笔数-占总计",
|
163
|
+
]
|
164
|
+
|
165
|
+
temp_df["交易天数"] = pd.to_numeric(temp_df["交易天数"], errors="coerce")
|
166
|
+
temp_df["成交金额-人民币元"] = pd.to_numeric(
|
167
|
+
temp_df["成交金额-人民币元"], errors="coerce"
|
168
|
+
)
|
169
|
+
temp_df["成交金额-占总计"] = pd.to_numeric(
|
170
|
+
temp_df["成交金额-占总计"], errors="coerce"
|
171
|
+
)
|
172
|
+
temp_df["成交股数-股数"] = pd.to_numeric(temp_df["成交股数-股数"], errors="coerce")
|
173
|
+
temp_df["成交股数-占总计"] = pd.to_numeric(
|
174
|
+
temp_df["成交股数-占总计"], errors="coerce"
|
175
|
+
)
|
176
|
+
temp_df["成交笔数-笔"] = pd.to_numeric(temp_df["成交笔数-笔"], errors="coerce")
|
177
|
+
temp_df["成交笔数-占总计"] = pd.to_numeric(
|
178
|
+
temp_df["成交笔数-占总计"], errors="coerce"
|
179
|
+
)
|
180
|
+
return temp_df
|
181
|
+
|
182
|
+
|
183
|
+
def stock_sse_summary() -> pd.DataFrame:
|
184
|
+
"""
|
185
|
+
上海证券交易所-总貌
|
186
|
+
https://www.sse.com.cn/market/stockdata/statistic/
|
187
|
+
:return: 上海证券交易所-总貌
|
188
|
+
:rtype: pandas.DataFrame
|
189
|
+
"""
|
190
|
+
url = "http://query.sse.com.cn/commonQuery.do"
|
191
|
+
params = {
|
192
|
+
"sqlId": "COMMON_SSE_SJ_GPSJ_GPSJZM_TJSJ_L",
|
193
|
+
"PRODUCT_NAME": "股票,主板,科创板",
|
194
|
+
"type": "inParams",
|
195
|
+
"_": "1640855495128",
|
196
|
+
}
|
197
|
+
headers = {
|
198
|
+
"Referer": "http://www.sse.com.cn/",
|
199
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
200
|
+
"Chrome/89.0.4389.90 Safari/537.36",
|
201
|
+
}
|
202
|
+
r = requests.get(url, params=params, headers=headers)
|
203
|
+
data_json = r.json()
|
204
|
+
temp_df = pd.DataFrame(data_json["result"]).T
|
205
|
+
temp_df.reset_index(inplace=True)
|
206
|
+
temp_df["index"] = [
|
207
|
+
"流通股本",
|
208
|
+
"总市值",
|
209
|
+
"平均市盈率",
|
210
|
+
"上市公司",
|
211
|
+
"上市股票",
|
212
|
+
"流通市值",
|
213
|
+
"报告时间",
|
214
|
+
"-",
|
215
|
+
"总股本",
|
216
|
+
"项目",
|
217
|
+
]
|
218
|
+
temp_df = temp_df[temp_df["index"] != "-"].iloc[:-1, :]
|
219
|
+
temp_df.columns = [
|
220
|
+
"项目",
|
221
|
+
"股票",
|
222
|
+
"主板",
|
223
|
+
"科创板",
|
224
|
+
]
|
225
|
+
return temp_df
|
226
|
+
|
227
|
+
|
228
|
+
def stock_sse_deal_daily(date: str = "20241216") -> pd.DataFrame:
|
229
|
+
"""
|
230
|
+
上海证券交易所-数据-股票数据-成交概况-股票成交概况-每日股票情况
|
231
|
+
https://www.sse.com.cn/market/stockdata/overview/day/
|
232
|
+
:return: 每日股票情况
|
233
|
+
:rtype: pandas.DataFrame
|
234
|
+
"""
|
235
|
+
url = "https://query.sse.com.cn/commonQuery.do"
|
236
|
+
params = {
|
237
|
+
"sqlId": "COMMON_SSE_SJ_GPSJ_CJGK_MRGK_C",
|
238
|
+
"PRODUCT_CODE": "01,02,03,11,17",
|
239
|
+
"type": "inParams",
|
240
|
+
"SEARCH_DATE": "-".join([date[:4], date[4:6], date[6:]]),
|
241
|
+
"_": "1640836561673",
|
242
|
+
}
|
243
|
+
headers = {
|
244
|
+
"Referer": "https://www.sse.com.cn/",
|
245
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
246
|
+
"Chrome/89.0.4389.90 Safari/537.36",
|
247
|
+
}
|
248
|
+
r = requests.get(url, params=params, headers=headers)
|
249
|
+
data_json = r.json()
|
250
|
+
temp_df = pd.DataFrame(data_json["result"])
|
251
|
+
temp_df = temp_df.T
|
252
|
+
temp_df.reset_index(inplace=True)
|
253
|
+
temp_df.columns = [
|
254
|
+
"单日情况",
|
255
|
+
"主板A",
|
256
|
+
"主板B",
|
257
|
+
"科创板",
|
258
|
+
"股票回购",
|
259
|
+
"股票",
|
260
|
+
]
|
261
|
+
temp_df = temp_df[
|
262
|
+
[
|
263
|
+
"单日情况",
|
264
|
+
"股票",
|
265
|
+
"主板A",
|
266
|
+
"主板B",
|
267
|
+
"科创板",
|
268
|
+
"股票回购",
|
269
|
+
]
|
270
|
+
]
|
271
|
+
temp_df["单日情况"] = [
|
272
|
+
"市价总值",
|
273
|
+
"成交量",
|
274
|
+
"平均市盈率",
|
275
|
+
"换手率",
|
276
|
+
"成交金额",
|
277
|
+
"-",
|
278
|
+
"流通市值",
|
279
|
+
"流通换手率",
|
280
|
+
"报告日期",
|
281
|
+
"挂牌数",
|
282
|
+
"-",
|
283
|
+
]
|
284
|
+
temp_df = temp_df[temp_df["单日情况"] != "-"]
|
285
|
+
temp_df = temp_df[temp_df["单日情况"] != "报告日期"]
|
286
|
+
# 定义期望的指标顺序
|
287
|
+
desired_order = [
|
288
|
+
"挂牌数",
|
289
|
+
"市价总值",
|
290
|
+
"流通市值",
|
291
|
+
"成交金额",
|
292
|
+
"成交量",
|
293
|
+
"平均市盈率",
|
294
|
+
"换手率",
|
295
|
+
"流通换手率",
|
296
|
+
]
|
297
|
+
# 使用 categorical 类型重新排序
|
298
|
+
temp_df["单日情况"] = pd.Categorical(
|
299
|
+
temp_df["单日情况"], categories=desired_order, ordered=True
|
300
|
+
)
|
301
|
+
# 按照指标排序
|
302
|
+
temp_df.sort_values("单日情况", ignore_index=True, inplace=True)
|
303
|
+
temp_df["股票"] = pd.to_numeric(temp_df["股票"], errors="coerce")
|
304
|
+
temp_df["主板A"] = pd.to_numeric(temp_df["主板A"], errors="coerce")
|
305
|
+
temp_df["主板B"] = pd.to_numeric(temp_df["主板B"], errors="coerce")
|
306
|
+
temp_df["科创板"] = pd.to_numeric(temp_df["科创板"], errors="coerce")
|
307
|
+
temp_df["股票回购"] = pd.to_numeric(temp_df["股票回购"], errors="coerce")
|
308
|
+
return temp_df
|
309
|
+
|
310
|
+
|
311
|
+
if __name__ == "__main__":
|
312
|
+
stock_szse_summary_df = stock_szse_summary(date="20240901")
|
313
|
+
print(stock_szse_summary_df)
|
314
|
+
|
315
|
+
stock_szse_area_summary_df = stock_szse_area_summary(date="202412")
|
316
|
+
print(stock_szse_area_summary_df)
|
317
|
+
|
318
|
+
stock_szse_sector_summary_df = stock_szse_sector_summary(
|
319
|
+
symbol="当月", date="202501"
|
320
|
+
)
|
321
|
+
print(stock_szse_sector_summary_df)
|
322
|
+
|
323
|
+
stock_sse_summary_df = stock_sse_summary()
|
324
|
+
print(stock_sse_summary_df)
|
325
|
+
|
326
|
+
stock_sse_deal_daily_df = stock_sse_deal_daily(date="20250221")
|
327
|
+
print(stock_sse_deal_daily_df)
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# -*- coding:utf-8 -*-
|
2
|
-
# !/usr/bin/env python
|
3
|
-
"""
|
4
|
-
Date: 2022/1/25 10:20
|
5
|
-
Desc: 东方财富网-数据中心-特色数据-期权折溢价
|
6
|
-
https://data.eastmoney.com/other/premium.html
|
7
|
-
"""
|
8
|
-
import requests
|
9
|
-
import pandas as pd
|
10
|
-
|
11
|
-
|
12
|
-
def option_premium_analysis_em() -> pd.DataFrame:
|
13
|
-
"""
|
14
|
-
东方财富网-数据中心-特色数据-期权折溢价
|
15
|
-
https://data.eastmoney.com/other/premium.html
|
16
|
-
:return: 期权折溢价
|
17
|
-
:rtype: pandas.DataFrame
|
18
|
-
"""
|
19
|
-
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
20
|
-
params = {
|
21
|
-
'fid': 'f250',
|
22
|
-
'po': '1',
|
23
|
-
'pz': '5000',
|
24
|
-
'pn': '1',
|
25
|
-
'np': '1',
|
26
|
-
'fltt': '2',
|
27
|
-
'invt': '2',
|
28
|
-
'ut': 'b2884a393a59ad64002292a3e90d46a5',
|
29
|
-
'fields': 'f1,f2,f3,f12,f13,f14,f161,f250,f330,f331,f332,f333,f334,f335,f337,f301,f152',
|
30
|
-
'fs': 'm:10'
|
31
|
-
}
|
32
|
-
r = requests.get(url, params=params)
|
33
|
-
data_json = r.json()
|
34
|
-
temp_df = pd.DataFrame(data_json["data"]["diff"])
|
35
|
-
temp_df.columns = [
|
36
|
-
'-',
|
37
|
-
'最新价',
|
38
|
-
'涨跌幅',
|
39
|
-
'期权代码',
|
40
|
-
'-',
|
41
|
-
'期权名称',
|
42
|
-
'-',
|
43
|
-
'行权价',
|
44
|
-
'折溢价率',
|
45
|
-
'到期日',
|
46
|
-
'-',
|
47
|
-
'-',
|
48
|
-
'-',
|
49
|
-
'标的名称',
|
50
|
-
'标的最新价',
|
51
|
-
'标的涨跌幅',
|
52
|
-
'盈亏平衡价',
|
53
|
-
]
|
54
|
-
temp_df = temp_df[[
|
55
|
-
'期权代码',
|
56
|
-
'期权名称',
|
57
|
-
'最新价',
|
58
|
-
'涨跌幅',
|
59
|
-
'行权价',
|
60
|
-
'折溢价率',
|
61
|
-
'标的名称',
|
62
|
-
'标的最新价',
|
63
|
-
'标的涨跌幅',
|
64
|
-
'盈亏平衡价',
|
65
|
-
'到期日',
|
66
|
-
]]
|
67
|
-
temp_df['最新价'] = pd.to_numeric(temp_df['最新价'], errors="coerce")
|
68
|
-
temp_df['涨跌幅'] = pd.to_numeric(temp_df['涨跌幅'], errors="coerce")
|
69
|
-
temp_df['行权价'] = pd.to_numeric(temp_df['行权价'], errors="coerce")
|
70
|
-
temp_df['折溢价率'] = pd.to_numeric(temp_df['折溢价率'], errors="coerce")
|
71
|
-
temp_df['标的最新价'] = pd.to_numeric(temp_df['标的最新价'], errors="coerce")
|
72
|
-
temp_df['标的涨跌幅'] = pd.to_numeric(temp_df['标的涨跌幅'], errors="coerce")
|
73
|
-
temp_df['盈亏平衡价'] = pd.to_numeric(temp_df['盈亏平衡价'], errors="coerce")
|
74
|
-
temp_df['到期日'] = pd.to_datetime(temp_df['到期日'].astype(str)).dt.date
|
75
|
-
return temp_df
|
76
|
-
|
77
|
-
|
78
|
-
if __name__ == "__main__":
|
79
|
-
option_premium_analysis_em_df = option_premium_analysis_em()
|
80
|
-
print(option_premium_analysis_em_df)
|