hikyuu 2.6.8.4__py3-none-manylinux2014_x86_64.whl → 2.7.0__py3-none-manylinux2014_x86_64.whl
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.
- hikyuu/__init__.py +31 -17
- hikyuu/__init__.pyi +610 -590
- hikyuu/analysis/__init__.pyi +584 -563
- hikyuu/analysis/analysis.pyi +585 -564
- hikyuu/core.py +2 -0
- hikyuu/core.pyi +586 -565
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/core310.pyi +501 -108
- hikyuu/cpp/core310.so +0 -0
- hikyuu/cpp/core311.pyi +495 -108
- hikyuu/cpp/core311.so +0 -0
- hikyuu/cpp/core312.pyi +495 -108
- hikyuu/cpp/core312.so +0 -0
- hikyuu/cpp/core313.pyi +501 -108
- hikyuu/cpp/core313.so +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
- hikyuu/cpp/libboost_charconv-mt.so +0 -0
- hikyuu/cpp/libboost_charconv-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_chrono-mt.so +0 -0
- hikyuu/cpp/libboost_chrono-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_date_time-mt.so +0 -0
- hikyuu/cpp/libboost_date_time-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_serialization-mt.so +0 -0
- hikyuu/cpp/libboost_serialization-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_system-mt.so +0 -0
- hikyuu/cpp/libboost_system-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_thread-mt.so +0 -0
- hikyuu/cpp/libboost_thread-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_wserialization-mt.so +0 -0
- hikyuu/cpp/libboost_wserialization-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libhikyuu.so +0 -0
- hikyuu/cpp/libsqlite3.so +0 -0
- hikyuu/data/clickhouse_upgrade/createdb.sql +105 -105
- hikyuu/data/common.py +3 -3
- hikyuu/data/common_clickhouse.py +1 -1
- hikyuu/data/download_block.py +351 -0
- hikyuu/data/em_block_to_clickhouse.py +26 -74
- hikyuu/data/em_block_to_mysql.py +25 -75
- hikyuu/data/em_block_to_sqlite.py +26 -78
- hikyuu/data/hku_config_template.py +3 -3
- hikyuu/data/pytdx_to_clickhouse.py +15 -11
- hikyuu/data/pytdx_to_h5.py +6 -2
- hikyuu/data/pytdx_to_mysql.py +5 -1
- hikyuu/data/pytdx_weight_to_clickhouse.py +1 -1
- hikyuu/data/pytdx_weight_to_mysql.py +1 -1
- hikyuu/data/pytdx_weight_to_sqlite.py +1 -1
- hikyuu/data/zh_bond10_to_clickhouse.py +1 -1
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/__init__.pyi +9 -9
- hikyuu/draw/drawplot/bokeh_draw.pyi +600 -580
- hikyuu/draw/drawplot/common.pyi +1 -1
- hikyuu/draw/drawplot/echarts_draw.pyi +602 -582
- hikyuu/draw/drawplot/matplotlib_draw.py +4 -74
- hikyuu/draw/drawplot/matplotlib_draw.pyi +612 -592
- hikyuu/draw/elder.pyi +11 -11
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/examples/notebook/Demo/Demo1.ipynb +48 -33
- hikyuu/extend.py +0 -7
- hikyuu/extend.pyi +594 -573
- hikyuu/fetcher/stock/zh_block_em.py +12 -40
- hikyuu/gui/HikyuuTDX.py +99 -31
- hikyuu/gui/data/CollectSpotThread.py +1 -1
- hikyuu/gui/data/EscapetimeThread.py +8 -14
- hikyuu/gui/data/ImportBlockInfoTask.py +3 -10
- hikyuu/gui/data/MainWindow.py +1196 -717
- hikyuu/gui/data/SchedImportThread.py +2 -2
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/UseQmtImportToH5Thread.py +2 -2
- hikyuu/gui/data/UseTdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/tool.py +32 -25
- hikyuu/gui/dataserver.py +5 -3
- hikyuu/gui/images/liandongxiaopu.png +0 -0
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/DataType.h +4 -16
- hikyuu/include/hikyuu/KData.h +6 -3
- hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KDataSharedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KQuery.h +2 -2
- hikyuu/include/hikyuu/Stock.h +4 -1
- hikyuu/include/hikyuu/StockManager.h +13 -3
- hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +8 -0
- hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
- hikyuu/include/hikyuu/data_driver/KDataDriver.h +26 -1
- hikyuu/include/hikyuu/data_driver/base_info/mysql/MySQLBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/base_info/sqlite/SQLiteBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/block_info/mysql/MySQLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/qianlong/QLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/sqlite/SQLiteBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/kdata/DoNothingKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/cvs/KDataTempCsvDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/hdf5/H5KDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/tdx/TdxKDataDriver.h +1 -1
- hikyuu/include/hikyuu/hikyuu.h +1 -1
- hikyuu/include/hikyuu/indicator/build_in.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/CYCLE.h +4 -4
- hikyuu/include/hikyuu/indicator/crt/HSL.h +2 -2
- hikyuu/include/hikyuu/indicator/crt/QUANTILE_TRUNC.h +30 -0
- hikyuu/include/hikyuu/indicator/crt/TURNOVER.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/ZSCORE.h +2 -2
- hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +25 -0
- hikyuu/include/hikyuu/misc.h +38 -0
- hikyuu/include/hikyuu/plugin/dataserver.h +2 -1
- hikyuu/include/hikyuu/plugin/device.h +10 -0
- hikyuu/include/hikyuu/plugin/extind.h +37 -0
- hikyuu/include/hikyuu/plugin/hkuextra.h +0 -18
- hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -2
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +2 -0
- hikyuu/include/hikyuu/plugin/interface/ExtendIndicatorsPluginInterface.h +12 -0
- hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +0 -14
- hikyuu/include/hikyuu/plugin/interface/plugins.h +3 -1
- hikyuu/include/hikyuu/python/pybind_utils.h +1 -8
- hikyuu/include/hikyuu/strategy/RunSystemInStrategy.h +3 -0
- hikyuu/include/hikyuu/trade_manage/Performance.h +4 -4
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -1
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +0 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +36 -3
- hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +125 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +125 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/build_in.h +3 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_norm.h +36 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_scfilter.h +51 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/GroupSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreLessOrEqualValueSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreNanSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/MinAmountPercentSCFilter.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/PriceSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/TopNSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/EqualWeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICIRMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormMinMax.h +23 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantile.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantileUniform.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormZScore.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/__init__.py +1 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/quantile_trunc.h +16 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +49 -0
- hikyuu/include/hikyuu/trade_sys/selector/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +40 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +0 -3
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +49 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorValueSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/BandSignal2.h +0 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +4 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/slippage/build_in.h +5 -1
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_LogNormal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Normal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_TruncNormal.h +25 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Uniform.h +23 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/LogNormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/NormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/TruncNormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/UniformSlippage.h +24 -0
- hikyuu/include/hikyuu/trade_sys/system/System.h +14 -1
- hikyuu/include/hikyuu/utilities/SpendTimer.h +17 -7
- hikyuu/include/hikyuu/utilities/arithmetic.h +55 -0
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +4 -1
- hikyuu/include/hikyuu/version.h +5 -5
- hikyuu/plugin/libbacktest.so +0 -0
- hikyuu/plugin/libclickhousedriver.so +0 -0
- hikyuu/plugin/libdataserver.so +0 -0
- hikyuu/{cpp/core39.so → plugin/libdataserver_parquet.so} +0 -0
- hikyuu/plugin/libdevice.so +0 -0
- hikyuu/plugin/libextind.so +0 -0
- hikyuu/plugin/libhkuextra.so +0 -0
- hikyuu/plugin/libimport2hdf5.so +0 -0
- hikyuu/plugin/libtmreport.so +0 -0
- hikyuu/trade_manage/__init__.pyi +599 -579
- hikyuu/trade_manage/broker.pyi +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +1 -1
- hikyuu/trade_manage/trade.py +0 -2
- hikyuu/trade_manage/trade.pyi +599 -579
- hikyuu/util/__init__.pyi +1 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/METADATA +36 -32
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/RECORD +197 -164
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/top_level.txt +2 -2
- hikyuu/cpp/core39.pyi +0 -14385
- hikyuu/data_driver/__init__.py +0 -49
- hikyuu/data_driver/jqdata_data_driver.py +0 -277
- hikyuu/data_driver/pytdx_data_driver.py +0 -292
- hikyuu/fetcher/stock/zh_stock_a_huatai.py +0 -51
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +0 -129
- hikyuu/gui/data/CollectToMemThread.py +0 -123
- hikyuu/gui/data/CollectToMySQLThread.py +0 -178
- hikyuu/gui/start_huatai_insight.py +0 -510
- hikyuu/include/hikyuu/views/arrow_common.h +0 -38
- hikyuu/include/hikyuu/views/arrow_views.h +0 -117
- hikyuu/tools/update_block_info.py +0 -168
- /hikyuu/include/hikyuu/{views → trade_sys/multifactor/filter}/__init__.py +0 -0
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python
|
|
2
|
-
# -*- coding: utf8 -*-
|
|
3
|
-
#
|
|
4
|
-
# Create on: 2023-12-18
|
|
5
|
-
# Author: fasiondog
|
|
6
|
-
|
|
7
|
-
import requests
|
|
8
|
-
import akshare as ak
|
|
9
|
-
from hikyuu.interactive import *
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def get_code_market_dict():
|
|
13
|
-
ret = {}
|
|
14
|
-
for s in sm:
|
|
15
|
-
if s.type in (constant.STOCKTYPE_A, constant.STOCKTYPE_A_BJ, constant.STOCKTYPE_B, constant.STOCKTYPE_GEM, constant.STOCKTYPE_START):
|
|
16
|
-
ret[s.code] = "0" if s.market == 'SH' else "1"
|
|
17
|
-
return ret
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def get_all_hybk_info():
|
|
21
|
-
code_market = get_code_market_dict()
|
|
22
|
-
blk_names = ak.stock_board_industry_name_em()['板块名称']
|
|
23
|
-
ret = {}
|
|
24
|
-
for blk_name in blk_names:
|
|
25
|
-
print(blk_name)
|
|
26
|
-
ret[blk_name] = []
|
|
27
|
-
stk_codes = ak.stock_board_industry_cons_em(blk_name)
|
|
28
|
-
stk_codes = stk_codes['代码'].to_list()
|
|
29
|
-
for stk_code in stk_codes:
|
|
30
|
-
try:
|
|
31
|
-
ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
|
|
32
|
-
except:
|
|
33
|
-
print(stk_code)
|
|
34
|
-
return ret
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def get_all_gnbk_info():
|
|
38
|
-
code_market = get_code_market_dict()
|
|
39
|
-
blk_names = ak.stock_board_concept_name_em()['板块名称']
|
|
40
|
-
ret = {}
|
|
41
|
-
for blk_name in blk_names:
|
|
42
|
-
print(blk_name)
|
|
43
|
-
ret[blk_name] = []
|
|
44
|
-
stk_codes = ak.stock_board_concept_cons_em(blk_name)
|
|
45
|
-
stk_codes = stk_codes['代码'].to_list()
|
|
46
|
-
for stk_code in stk_codes:
|
|
47
|
-
try:
|
|
48
|
-
ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
|
|
49
|
-
except:
|
|
50
|
-
print(stk_code)
|
|
51
|
-
return ret
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def get_all_dybk_info():
|
|
55
|
-
url = "http://13.push2.eastmoney.com/api/qt/clist/get"
|
|
56
|
-
params = {
|
|
57
|
-
"pn": "1",
|
|
58
|
-
"pz": "50000",
|
|
59
|
-
"po": "1",
|
|
60
|
-
"np": "1",
|
|
61
|
-
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
|
62
|
-
"fltt": "2",
|
|
63
|
-
"invt": "2",
|
|
64
|
-
"fid": "f3",
|
|
65
|
-
"fs": "m:90+t:1+f:!50",
|
|
66
|
-
"fields": "f12,f14",
|
|
67
|
-
# "fields": "f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f22,f11,f62,f128,"
|
|
68
|
-
# "f136,f115,f152",
|
|
69
|
-
"_": "1623833739532",
|
|
70
|
-
}
|
|
71
|
-
r = requests.get(url, params=params)
|
|
72
|
-
data_json = r.json()
|
|
73
|
-
data_json = data_json["data"]["diff"]
|
|
74
|
-
|
|
75
|
-
params = {
|
|
76
|
-
"pn": "1",
|
|
77
|
-
"pz": "2000",
|
|
78
|
-
"po": "1",
|
|
79
|
-
"np": "1",
|
|
80
|
-
"ut": "bd1d9ddb04089700cf9c27f6f7426281",
|
|
81
|
-
"fltt": "2",
|
|
82
|
-
"invt": "2",
|
|
83
|
-
"fid": "f3",
|
|
84
|
-
# "fs": f"b:{stock_board_code} f:!50",
|
|
85
|
-
"fields": "f12",
|
|
86
|
-
"_": "1626081702127",
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
ret = {}
|
|
90
|
-
code_market = get_code_market_dict()
|
|
91
|
-
for v in data_json:
|
|
92
|
-
# print(v)
|
|
93
|
-
blk_code = v["f12"]
|
|
94
|
-
blk_name = v["f14"]
|
|
95
|
-
print(blk_name)
|
|
96
|
-
ret[blk_name] = []
|
|
97
|
-
params["fs"] = f"b:{blk_code} f:!50"
|
|
98
|
-
r = requests.get(url, params=params)
|
|
99
|
-
stk_json = r.json()
|
|
100
|
-
stk_json = stk_json["data"]["diff"]
|
|
101
|
-
|
|
102
|
-
for item in stk_json:
|
|
103
|
-
stk_code = item["f12"]
|
|
104
|
-
try:
|
|
105
|
-
ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
|
|
106
|
-
except:
|
|
107
|
-
print(stk_code)
|
|
108
|
-
return ret
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def get_all_zsbk_info():
|
|
112
|
-
code_market = get_code_market_dict()
|
|
113
|
-
blk_info = ak.index_stock_info()
|
|
114
|
-
blk_codes = blk_info["index_code"]
|
|
115
|
-
blk_names = blk_info["display_name"]
|
|
116
|
-
ret = {}
|
|
117
|
-
total = len(blk_codes)
|
|
118
|
-
# for blk_name in blk_names:
|
|
119
|
-
for i in range(total):
|
|
120
|
-
blk_name = blk_names[i]
|
|
121
|
-
blk_code = blk_codes[i]
|
|
122
|
-
print(i, blk_name)
|
|
123
|
-
# 沪深指数有重复,避免深指覆盖
|
|
124
|
-
if blk_name in ret:
|
|
125
|
-
continue
|
|
126
|
-
try:
|
|
127
|
-
ret[blk_name] = []
|
|
128
|
-
stk_codes = ak.index_stock_cons_csindex(symbol=blk_code)
|
|
129
|
-
stk_codes = stk_codes['成分券代码'].to_list()
|
|
130
|
-
for stk_code in stk_codes:
|
|
131
|
-
try:
|
|
132
|
-
ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
|
|
133
|
-
except:
|
|
134
|
-
print(stk_code)
|
|
135
|
-
except KeyboardInterrupt:
|
|
136
|
-
exit(-1)
|
|
137
|
-
except:
|
|
138
|
-
print("Failed!", blk_code, blk_name)
|
|
139
|
-
return ret
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
def write_blk_file(blk_info, filename):
|
|
143
|
-
with open(filename, 'w', encoding='utf-8') as f:
|
|
144
|
-
for k in blk_info:
|
|
145
|
-
print(k)
|
|
146
|
-
if blk_info[k]:
|
|
147
|
-
f.write(f"[{k}]\n")
|
|
148
|
-
for code in blk_info[k]:
|
|
149
|
-
f.write(f'{code}\n')
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if __name__ == "__main__":
|
|
153
|
-
# # 更新行业板块
|
|
154
|
-
# x = get_all_hybk_info()
|
|
155
|
-
# write_blk_file(x, 'hikyuu/config/block/hybk.ini')
|
|
156
|
-
|
|
157
|
-
# # 更新概念板块
|
|
158
|
-
# x = get_all_gnbk_info()
|
|
159
|
-
# write_blk_file(x, 'hikyuu/config/block/gnbk.ini')
|
|
160
|
-
|
|
161
|
-
# # 更新地域板块
|
|
162
|
-
# x = get_all_dybk_info()
|
|
163
|
-
# write_blk_file(x, 'hikyuu/config/block/dybk.ini')
|
|
164
|
-
|
|
165
|
-
# 更新指数成分
|
|
166
|
-
x = get_all_zsbk_info()
|
|
167
|
-
write_blk_file(x, 'hikyuu/config/block/zsbk.ini')
|
|
168
|
-
# print(x)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|