hikyuu 2.6.8__py3-none-win_amd64.whl → 2.6.8.2__py3-none-win_amd64.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__.pyi +652 -649
- hikyuu/analysis/__init__.pyi +563 -563
- hikyuu/analysis/analysis.pyi +584 -582
- hikyuu/core.pyi +563 -563
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core310.pyi +11 -0
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +11 -0
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +11 -0
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +11 -0
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/core39.pyi +11 -0
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/draw/drawplot/__init__.pyi +36 -31
- hikyuu/draw/drawplot/bokeh_draw.pyi +658 -647
- hikyuu/draw/drawplot/common.pyi +4 -3
- hikyuu/draw/drawplot/echarts_draw.pyi +593 -594
- hikyuu/draw/drawplot/matplotlib_draw.pyi +900 -868
- hikyuu/draw/elder.pyi +20 -19
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/extend.pyi +597 -593
- hikyuu/hub.pyi +67 -69
- hikyuu/include/hikyuu/KData.h +8 -0
- hikyuu/include/hikyuu/python/pybind_utils.h +8 -0
- hikyuu/include/hikyuu/version.h +2 -2
- hikyuu/plugin/backtest.dll +0 -0
- hikyuu/plugin/clickhousedriver.dll +0 -0
- hikyuu/plugin/dataserver.dll +0 -0
- hikyuu/plugin/extind.dll +0 -0
- hikyuu/plugin/hkuextra.dll +0 -0
- hikyuu/plugin/import2hdf5.dll +0 -0
- hikyuu/plugin/tmreport.dll +0 -0
- hikyuu/trade_manage/__init__.pyi +579 -579
- hikyuu/trade_manage/broker.pyi +18 -19
- hikyuu/trade_manage/broker_easytrader.pyi +4 -6
- hikyuu/trade_manage/broker_mail.pyi +24 -22
- hikyuu/trade_manage/trade.pyi +579 -579
- hikyuu/util/__init__.pyi +1 -1
- hikyuu/util/check.pyi +15 -17
- hikyuu/util/mylog.pyi +7 -8
- hikyuu/util/notebook.pyi +11 -9
- hikyuu/util/singleton.pyi +6 -8
- {hikyuu-2.6.8.dist-info → hikyuu-2.6.8.2.dist-info}/METADATA +14 -4
- {hikyuu-2.6.8.dist-info → hikyuu-2.6.8.2.dist-info}/RECORD +52 -54
- {hikyuu-2.6.8.dist-info → hikyuu-2.6.8.2.dist-info}/WHEEL +1 -1
- hikyuu/setup.py +0 -104
- hikyuu-2.6.8.dist-info/LICENSE +0 -201
- {hikyuu-2.6.8.dist-info → hikyuu-2.6.8.2.dist-info}/entry_points.txt +0 -0
- {hikyuu-2.6.8.dist-info → hikyuu-2.6.8.2.dist-info}/top_level.txt +0 -0
hikyuu/hub.pyi
CHANGED
|
@@ -28,23 +28,22 @@ import sys as sys
|
|
|
28
28
|
import typing
|
|
29
29
|
__all__: list = ['add_remote_hub', 'add_local_hub', 'update_hub', 'remove_hub', 'build_hub', 'help_part', 'get_part', 'get_part_list', 'get_hub_path', 'get_part_info', 'get_part_module', 'print_part_info', 'get_hub_name_list', 'get_part_name_list', 'get_current_hub', 'search_part']
|
|
30
30
|
class ConfigModel(sqlalchemy.orm.decl_api.Base):
|
|
31
|
-
|
|
32
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x20a840fd400; ConfigModel>
|
|
33
|
-
__static_attributes__: typing.ClassVar[tuple] = tuple()
|
|
31
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x181e87cbc40; ConfigModel>
|
|
34
32
|
__table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_config', MetaData(), Column('id', Integer(), table=<hub_config>, primary_key=True, nullable=False, default=Sequence('config_id_seq', metadata=MetaData())), Column('key', String(), table=<hub_config>), Column('value', String(), table=<hub_config>), schema=None)
|
|
35
33
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('key', String(), table=<hub_config>)))
|
|
36
34
|
__tablename__: typing.ClassVar[str] = 'hub_config'
|
|
37
|
-
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.ConfigModel'> at
|
|
35
|
+
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.ConfigModel'> at 181e87df4f0>
|
|
38
36
|
def __init__(self, **kwargs):
|
|
39
37
|
"""
|
|
40
38
|
A simple constructor that allows initialization from kwargs.
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
Sets attributes on the constructed instance using the names and
|
|
41
|
+
values in ``kwargs``.
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
Only keys that are present as
|
|
44
|
+
attributes of the instance's class are allowed. These could be,
|
|
45
|
+
for example, any mapped columns or relationships.
|
|
46
|
+
|
|
48
47
|
"""
|
|
49
48
|
def __repr__(self):
|
|
50
49
|
...
|
|
@@ -54,8 +53,6 @@ class HubManager:
|
|
|
54
53
|
"""
|
|
55
54
|
策略库管理
|
|
56
55
|
"""
|
|
57
|
-
__firstlineno__: typing.ClassVar[int] = 171
|
|
58
|
-
__static_attributes__: typing.ClassVar[tuple] = ('_scoped_Session', '_session', 'logger', 'remote_cache_dir')
|
|
59
56
|
_instance: typing.ClassVar[HubManager] # value = <hikyuu.hub.HubManager object>
|
|
60
57
|
@staticmethod
|
|
61
58
|
def _get_module(*args, **kwargs):
|
|
@@ -112,82 +109,70 @@ class HubManager:
|
|
|
112
109
|
def print_part_info(self, name):
|
|
113
110
|
...
|
|
114
111
|
class HubModel(sqlalchemy.orm.decl_api.Base):
|
|
115
|
-
|
|
116
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x20a840ddd10; HubModel>
|
|
117
|
-
__static_attributes__: typing.ClassVar[tuple] = tuple()
|
|
112
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x181e880b3a0; HubModel>
|
|
118
113
|
__table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_repo', MetaData(), Column('id', Integer(), table=<hub_repo>, primary_key=True, nullable=False, default=Sequence('remote_id_seq', metadata=MetaData())), Column('name', String(), table=<hub_repo>), Column('hub_type', String(), table=<hub_repo>), Column('local_base', String(), table=<hub_repo>), Column('local', String(), table=<hub_repo>), Column('url', String(), table=<hub_repo>), Column('branch', String(), table=<hub_repo>), schema=None)
|
|
119
114
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_repo>)))
|
|
120
115
|
__tablename__: typing.ClassVar[str] = 'hub_repo'
|
|
121
|
-
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.HubModel'> at
|
|
116
|
+
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.HubModel'> at 181e880a180>
|
|
122
117
|
def __init__(self, **kwargs):
|
|
123
118
|
"""
|
|
124
119
|
A simple constructor that allows initialization from kwargs.
|
|
125
120
|
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
Sets attributes on the constructed instance using the names and
|
|
122
|
+
values in ``kwargs``.
|
|
128
123
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
Only keys that are present as
|
|
125
|
+
attributes of the instance's class are allowed. These could be,
|
|
126
|
+
for example, any mapped columns or relationships.
|
|
127
|
+
|
|
132
128
|
"""
|
|
133
129
|
def __repr__(self):
|
|
134
130
|
...
|
|
135
131
|
def __str__(self):
|
|
136
132
|
...
|
|
137
133
|
class HubNameRepeatError(Exception):
|
|
138
|
-
__firstlineno__: typing.ClassVar[int] = 99
|
|
139
|
-
__static_attributes__: typing.ClassVar[tuple] = ('name')
|
|
140
134
|
def __init__(self, name):
|
|
141
135
|
...
|
|
142
136
|
def __str__(self):
|
|
143
137
|
...
|
|
144
138
|
class HubNotFoundError(Exception):
|
|
145
|
-
__firstlineno__: typing.ClassVar[int] = 107
|
|
146
|
-
__static_attributes__: typing.ClassVar[tuple] = ('name')
|
|
147
139
|
def __init__(self, name):
|
|
148
140
|
...
|
|
149
141
|
def __str__(self):
|
|
150
142
|
...
|
|
151
143
|
class ModuleConflictError(Exception):
|
|
152
|
-
__firstlineno__: typing.ClassVar[int] = 115
|
|
153
|
-
__static_attributes__: typing.ClassVar[tuple] = ('conflict_module', 'hub_name', 'hub_path')
|
|
154
144
|
def __init__(self, hub_name, conflict_module, hub_path):
|
|
155
145
|
...
|
|
156
146
|
def __str__(self):
|
|
157
147
|
...
|
|
158
148
|
class PartModel(sqlalchemy.orm.decl_api.Base):
|
|
159
|
-
|
|
160
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x20a840de5d0; PartModel>
|
|
161
|
-
__static_attributes__: typing.ClassVar[tuple] = tuple()
|
|
149
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x181e880b8e0; PartModel>
|
|
162
150
|
__table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_part', MetaData(), Column('id', Integer(), table=<hub_part>, primary_key=True, nullable=False, default=Sequence('part_id_seq', metadata=MetaData())), Column('hub_name', String(), table=<hub_part>), Column('part', String(), table=<hub_part>), Column('name', String(), table=<hub_part>), Column('author', String(), table=<hub_part>), Column('version', String(), table=<hub_part>), Column('doc', String(), table=<hub_part>), Column('module_name', String(), table=<hub_part>), Column('label', String(), table=<hub_part>), schema=None)
|
|
163
151
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_part>)))
|
|
164
152
|
__tablename__: typing.ClassVar[str] = 'hub_part'
|
|
165
|
-
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.PartModel'> at
|
|
153
|
+
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.PartModel'> at 181e880abd0>
|
|
166
154
|
def __init__(self, **kwargs):
|
|
167
155
|
"""
|
|
168
156
|
A simple constructor that allows initialization from kwargs.
|
|
169
157
|
|
|
170
|
-
|
|
171
|
-
|
|
158
|
+
Sets attributes on the constructed instance using the names and
|
|
159
|
+
values in ``kwargs``.
|
|
172
160
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
161
|
+
Only keys that are present as
|
|
162
|
+
attributes of the instance's class are allowed. These could be,
|
|
163
|
+
for example, any mapped columns or relationships.
|
|
164
|
+
|
|
176
165
|
"""
|
|
177
166
|
def __repr__(self):
|
|
178
167
|
...
|
|
179
168
|
def __str__(self):
|
|
180
169
|
...
|
|
181
170
|
class PartNameError(Exception):
|
|
182
|
-
__firstlineno__: typing.ClassVar[int] = 136
|
|
183
|
-
__static_attributes__: typing.ClassVar[tuple] = ('name')
|
|
184
171
|
def __init__(self, name):
|
|
185
172
|
...
|
|
186
173
|
def __str__(self):
|
|
187
174
|
...
|
|
188
175
|
class PartNotFoundError(Exception):
|
|
189
|
-
__firstlineno__: typing.ClassVar[int] = 127
|
|
190
|
-
__static_attributes__: typing.ClassVar[tuple] = ('cause', 'name')
|
|
191
176
|
def __init__(self, name, cause):
|
|
192
177
|
...
|
|
193
178
|
def __str__(self):
|
|
@@ -196,30 +181,34 @@ def add_local_hub(name, path):
|
|
|
196
181
|
"""
|
|
197
182
|
增加本地数据仓库
|
|
198
183
|
|
|
199
|
-
|
|
200
|
-
|
|
184
|
+
:param str name: 仓库名称
|
|
185
|
+
:param str path: 本地全路径
|
|
186
|
+
|
|
201
187
|
"""
|
|
202
188
|
def add_remote_hub(name, url, branch = 'main'):
|
|
203
189
|
"""
|
|
204
190
|
增加远程策略仓库
|
|
205
191
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
192
|
+
:param str name: 本地仓库名称(自行起名)
|
|
193
|
+
:param str url: git 仓库地址
|
|
194
|
+
:param str branch: git 仓库分支
|
|
195
|
+
|
|
209
196
|
"""
|
|
210
197
|
def build_hub(name, cmd = 'buildall'):
|
|
211
198
|
"""
|
|
212
199
|
构建 cpp 部分 part
|
|
213
200
|
|
|
214
|
-
|
|
215
|
-
|
|
201
|
+
:param str name: 仓库名称
|
|
202
|
+
:param str cmd: 同仓库下 python setup.py 后的命令参数,如: build -t ind -n cpp_example
|
|
203
|
+
|
|
216
204
|
"""
|
|
217
205
|
def dbsession(func):
|
|
218
206
|
...
|
|
219
207
|
def get_current_hub(*args, **kwargs):
|
|
220
208
|
"""
|
|
221
209
|
用于在仓库part.py中获取当前所在的仓库名。
|
|
222
|
-
|
|
210
|
+
示例: get_current_hub(__file__)
|
|
211
|
+
|
|
223
212
|
"""
|
|
224
213
|
def get_hub_name_list():
|
|
225
214
|
"""
|
|
@@ -229,43 +218,49 @@ def get_hub_path(name):
|
|
|
229
218
|
"""
|
|
230
219
|
获取仓库所在的本地路径
|
|
231
220
|
|
|
232
|
-
|
|
221
|
+
:param str name: 仓库名
|
|
222
|
+
|
|
233
223
|
"""
|
|
234
224
|
def get_part(name, *args, **kwargs):
|
|
235
225
|
"""
|
|
236
226
|
获取指定策略部件
|
|
237
227
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
228
|
+
:param str name: 策略部件名称
|
|
229
|
+
:param args: 其他部件相关参数
|
|
230
|
+
:param kwargs: 其他部件相关参数
|
|
231
|
+
|
|
241
232
|
"""
|
|
242
233
|
def get_part_info(name):
|
|
243
234
|
"""
|
|
244
235
|
获取策略部件信息
|
|
245
236
|
|
|
246
|
-
|
|
237
|
+
:param str name: 部件名称
|
|
238
|
+
|
|
247
239
|
"""
|
|
248
240
|
def get_part_list(name_list):
|
|
249
241
|
"""
|
|
250
242
|
|
|
251
|
-
|
|
243
|
+
获取指定策略部件列表
|
|
252
244
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
245
|
+
:param list name_list: 部件名称列表
|
|
246
|
+
:return: 部件列表
|
|
247
|
+
:rtype: list
|
|
248
|
+
|
|
256
249
|
"""
|
|
257
250
|
def get_part_module(part_name: str):
|
|
258
251
|
"""
|
|
259
252
|
获取部件模块
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
253
|
+
:param str part_name: 部件名称
|
|
254
|
+
:return: 部件模块
|
|
255
|
+
:rtype: module
|
|
256
|
+
|
|
263
257
|
"""
|
|
264
258
|
def get_part_name_list(hub = None, part_type = None):
|
|
265
259
|
"""
|
|
266
260
|
获取部件名称列表
|
|
267
|
-
|
|
268
|
-
|
|
261
|
+
:param str hub: 仓库名
|
|
262
|
+
:param str part_type: 部件类型
|
|
263
|
+
|
|
269
264
|
"""
|
|
270
265
|
def handle_remove_read_only(func, path, exc):
|
|
271
266
|
...
|
|
@@ -275,23 +270,26 @@ def remove_hub(name):
|
|
|
275
270
|
"""
|
|
276
271
|
删除指定的仓库
|
|
277
272
|
|
|
278
|
-
|
|
273
|
+
:param str name: 仓库名称
|
|
274
|
+
|
|
279
275
|
"""
|
|
280
276
|
def search_part(name: str = None, hub: str = None, part_type: str = None, label: str = None):
|
|
281
277
|
"""
|
|
282
278
|
搜索部件
|
|
283
279
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
280
|
+
:param str name: 部件名称
|
|
281
|
+
:param str hub: 仓库名
|
|
282
|
+
:param str part_type: 部件类型
|
|
283
|
+
:param str label: 标签
|
|
284
|
+
:return: 部件名称列表
|
|
285
|
+
:rtype: list
|
|
286
|
+
|
|
290
287
|
"""
|
|
291
288
|
def update_hub(name):
|
|
292
289
|
"""
|
|
293
290
|
更新指定仓库
|
|
294
291
|
|
|
295
|
-
|
|
292
|
+
:param str name: 仓库名称
|
|
293
|
+
|
|
296
294
|
"""
|
|
297
295
|
help_part = print_part_info
|
hikyuu/include/hikyuu/KData.h
CHANGED
|
@@ -75,6 +75,14 @@ public:
|
|
|
75
75
|
*/
|
|
76
76
|
KData getKData(const KQuery::KType& ktype) const;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* 通过索引获取其子集 [star, end)
|
|
80
|
+
* @param start 起始索引
|
|
81
|
+
* @param end 结束索引
|
|
82
|
+
* @return KData
|
|
83
|
+
*/
|
|
84
|
+
KData getKData(int64_t start, int64_t end = Null<int64_t>()) const;
|
|
85
|
+
|
|
78
86
|
/** 按日期查询对应的索引位置,注:是 KData 中的位置,不是在 Stock 中原始K记录的位置 */
|
|
79
87
|
size_t getPos(const Datetime& datetime) const;
|
|
80
88
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
#include <pybind11/operators.h>
|
|
15
15
|
#include <pybind11/stl.h>
|
|
16
16
|
#include <pybind11/numpy.h>
|
|
17
|
+
#include <arrow/api.h>
|
|
17
18
|
#include <vector>
|
|
18
19
|
#include <string>
|
|
19
20
|
#include "convert_any.h"
|
|
@@ -123,6 +124,13 @@ inline bool check_pyfunction_arg_num(py::object& func, size_t arg_num) {
|
|
|
123
124
|
*/
|
|
124
125
|
size_t utf8_to_utf32(const std::string& utf8_str, int32_t* out, size_t out_len) noexcept;
|
|
125
126
|
|
|
127
|
+
/*
|
|
128
|
+
* 将arrow::Table转换为 pyarrow::Table
|
|
129
|
+
* @param table 待转换的arrow::Table
|
|
130
|
+
* @return 转换后的py::object
|
|
131
|
+
*/
|
|
132
|
+
py::object to_pyarrow_table(const std::shared_ptr<arrow::Table>& table);
|
|
133
|
+
|
|
126
134
|
} // namespace hku
|
|
127
135
|
|
|
128
136
|
#endif // HIKYUU_PYTHON_BIND_UTILS_H
|
hikyuu/include/hikyuu/version.h
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
#define HKU_VERSION_MAJOR 2
|
|
17
17
|
#define HKU_VERSION_MINOR 6
|
|
18
18
|
#define HKU_VERSION_ALTER 8
|
|
19
|
-
#define HKU_VERSION_BUILD
|
|
19
|
+
#define HKU_VERSION_BUILD 202509070200
|
|
20
20
|
#define HKU_VERSION_MODE "RELEASE"
|
|
21
|
-
#define HKU_VERSION_GIT "2.6.8
|
|
21
|
+
#define HKU_VERSION_GIT "2.6.8 master.4be22a77 (RELEASE)"
|
|
22
22
|
// clang-format on
|
|
23
23
|
|
|
24
24
|
#endif /* HKU_VERSION_H */
|
hikyuu/plugin/backtest.dll
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/plugin/dataserver.dll
CHANGED
|
Binary file
|
hikyuu/plugin/extind.dll
CHANGED
|
Binary file
|
hikyuu/plugin/hkuextra.dll
CHANGED
|
Binary file
|
hikyuu/plugin/import2hdf5.dll
CHANGED
|
Binary file
|
hikyuu/plugin/tmreport.dll
CHANGED
|
Binary file
|