hikyuu 2.6.9__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 +26 -5
- hikyuu/__init__.pyi +14 -19
- hikyuu/analysis/__init__.pyi +6 -11
- hikyuu/analysis/analysis.pyi +7 -12
- hikyuu/core.pyi +8 -13
- hikyuu/cpp/core310.pyi +60 -100
- hikyuu/cpp/core310.so +0 -0
- hikyuu/cpp/core311.pyi +60 -100
- hikyuu/cpp/core311.so +0 -0
- hikyuu/cpp/core312.pyi +60 -100
- hikyuu/cpp/core312.so +0 -0
- hikyuu/cpp/core313.pyi +60 -100
- hikyuu/cpp/core313.so +0 -0
- hikyuu/cpp/libhikyuu.so +0 -0
- hikyuu/cpp/libsqlite3.so +0 -0
- hikyuu/data/download_block.py +61 -28
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/__init__.pyi +1 -1
- hikyuu/draw/drawplot/bokeh_draw.pyi +11 -16
- hikyuu/draw/drawplot/echarts_draw.pyi +11 -16
- hikyuu/draw/drawplot/matplotlib_draw.pyi +11 -16
- hikyuu/extend.py +0 -7
- hikyuu/extend.pyi +8 -13
- hikyuu/fetcher/stock/zh_block_em.py +0 -60
- hikyuu/gui/HikyuuTDX.py +18 -1
- hikyuu/gui/data/MainWindow.py +36 -10
- hikyuu/gui/images/liandongxiaopu.png +0 -0
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/Stock.h +2 -2
- hikyuu/include/hikyuu/config.h +0 -3
- hikyuu/include/hikyuu/plugin/device.h +10 -0
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +2 -0
- hikyuu/include/hikyuu/plugin/interface/plugins.h +0 -5
- hikyuu/include/hikyuu/python/pybind_utils.h +0 -12
- 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/version.h +5 -5
- hikyuu/plugin/libbacktest.so +0 -0
- hikyuu/plugin/libclickhousedriver.so +0 -0
- hikyuu/plugin/libdataserver.so +0 -0
- hikyuu/plugin/{libhkuviews.so → 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 +10 -15
- hikyuu/trade_manage/trade.py +0 -2
- hikyuu/trade_manage/trade.pyi +10 -15
- hikyuu/util/__init__.pyi +1 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/METADATA +24 -20
- {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/RECORD +63 -59
- {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/top_level.txt +0 -1
- hikyuu/include/hikyuu/plugin/hkuviews.h +0 -36
- hikyuu/include/hikyuu/plugin/interface/HkuViewsPluginInterface.h +0 -34
- hikyuu/include/hikyuu/views/__init__.py +0 -1
- hikyuu/include/hikyuu/views/arrow_common.h +0 -38
- hikyuu/include/hikyuu/views/arrow_views.h +0 -117
- {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/entry_points.txt +0 -0
hikyuu/gui/data/MainWindow.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
################################################################################
|
|
4
4
|
## Form generated from reading UI file 'MainWindow.ui'
|
|
5
5
|
##
|
|
6
|
-
## Created by: Qt User Interface Compiler version 6.
|
|
6
|
+
## Created by: Qt User Interface Compiler version 6.10.0
|
|
7
7
|
##
|
|
8
8
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
|
9
9
|
################################################################################
|
|
@@ -17,16 +17,17 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
|
|
17
17
|
QPalette, QPixmap, QRadialGradient, QTransform)
|
|
18
18
|
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDateEdit,
|
|
19
19
|
QDateTimeEdit, QFrame, QGridLayout, QGroupBox,
|
|
20
|
-
QHBoxLayout, QLabel,
|
|
21
|
-
QProgressBar, QPushButton, QRadioButton,
|
|
22
|
-
QSpacerItem, QSpinBox, QTabWidget,
|
|
23
|
-
QTextEdit, QTimeEdit, QVBoxLayout,
|
|
20
|
+
QHBoxLayout, QLabel, QLayout, QLineEdit,
|
|
21
|
+
QMainWindow, QProgressBar, QPushButton, QRadioButton,
|
|
22
|
+
QSizePolicy, QSpacerItem, QSpinBox, QTabWidget,
|
|
23
|
+
QTextBrowser, QTextEdit, QTimeEdit, QVBoxLayout,
|
|
24
|
+
QWidget)
|
|
24
25
|
|
|
25
26
|
class Ui_MainWindow(object):
|
|
26
27
|
def setupUi(self, MainWindow):
|
|
27
28
|
if not MainWindow.objectName():
|
|
28
29
|
MainWindow.setObjectName(u"MainWindow")
|
|
29
|
-
MainWindow.resize(
|
|
30
|
+
MainWindow.resize(1139, 713)
|
|
30
31
|
self.centralwidget = QWidget(MainWindow)
|
|
31
32
|
self.centralwidget.setObjectName(u"centralwidget")
|
|
32
33
|
self.horizontalLayout_12 = QHBoxLayout(self.centralwidget)
|
|
@@ -250,7 +251,7 @@ class Ui_MainWindow(object):
|
|
|
250
251
|
|
|
251
252
|
self.min5_start_dateEdit = QDateEdit(self.groupBox_7)
|
|
252
253
|
self.min5_start_dateEdit.setObjectName(u"min5_start_dateEdit")
|
|
253
|
-
self.min5_start_dateEdit.setMinimumDateTime(QDateTime(QDate(1989, 12, 21), QTime(
|
|
254
|
+
self.min5_start_dateEdit.setMinimumDateTime(QDateTime(QDate(1989, 12, 21), QTime(0, 0, 0)))
|
|
254
255
|
self.min5_start_dateEdit.setCalendarPopup(True)
|
|
255
256
|
|
|
256
257
|
self.gridLayout_4.addWidget(self.min5_start_dateEdit, 1, 1, 1, 1)
|
|
@@ -284,7 +285,7 @@ class Ui_MainWindow(object):
|
|
|
284
285
|
|
|
285
286
|
self.day_start_dateEdit = QDateEdit(self.groupBox_7)
|
|
286
287
|
self.day_start_dateEdit.setObjectName(u"day_start_dateEdit")
|
|
287
|
-
self.day_start_dateEdit.setMinimumDateTime(QDateTime(QDate(1989, 12, 21), QTime(
|
|
288
|
+
self.day_start_dateEdit.setMinimumDateTime(QDateTime(QDate(1989, 12, 21), QTime(0, 0, 0)))
|
|
288
289
|
self.day_start_dateEdit.setCalendarPopup(True)
|
|
289
290
|
|
|
290
291
|
self.gridLayout_4.addWidget(self.day_start_dateEdit, 0, 1, 1, 1)
|
|
@@ -1211,6 +1212,14 @@ class Ui_MainWindow(object):
|
|
|
1211
1212
|
|
|
1212
1213
|
self.verticalLayout_16.addWidget(self.label_48)
|
|
1213
1214
|
|
|
1215
|
+
self.horizontalLayout_22 = QHBoxLayout()
|
|
1216
|
+
self.horizontalLayout_22.setObjectName(u"horizontalLayout_22")
|
|
1217
|
+
|
|
1218
|
+
self.verticalLayout_16.addLayout(self.horizontalLayout_22)
|
|
1219
|
+
|
|
1220
|
+
self.horizontalLayout_26 = QHBoxLayout()
|
|
1221
|
+
self.horizontalLayout_26.setObjectName(u"horizontalLayout_26")
|
|
1222
|
+
self.horizontalLayout_26.setSizeConstraint(QLayout.SetFixedSize)
|
|
1214
1223
|
self.label_44 = QLabel(self.tab_star)
|
|
1215
1224
|
self.label_44.setObjectName(u"label_44")
|
|
1216
1225
|
sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
|
|
@@ -1222,7 +1231,23 @@ class Ui_MainWindow(object):
|
|
|
1222
1231
|
self.label_44.setPixmap(QPixmap(u"../images/star.png"))
|
|
1223
1232
|
self.label_44.setScaledContents(True)
|
|
1224
1233
|
|
|
1225
|
-
self.
|
|
1234
|
+
self.horizontalLayout_26.addWidget(self.label_44, 0, Qt.AlignLeft)
|
|
1235
|
+
|
|
1236
|
+
self.label_56 = QLabel(self.tab_star)
|
|
1237
|
+
self.label_56.setObjectName(u"label_56")
|
|
1238
|
+
self.label_56.setMaximumSize(QSize(160, 160))
|
|
1239
|
+
self.label_56.setFrameShape(QFrame.NoFrame)
|
|
1240
|
+
self.label_56.setPixmap(QPixmap(u"../images/liandongxiaopu.png"))
|
|
1241
|
+
self.label_56.setScaledContents(True)
|
|
1242
|
+
|
|
1243
|
+
self.horizontalLayout_26.addWidget(self.label_56, 0, Qt.AlignLeft)
|
|
1244
|
+
|
|
1245
|
+
self.horizontalSpacer_15 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
|
1246
|
+
|
|
1247
|
+
self.horizontalLayout_26.addItem(self.horizontalSpacer_15)
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
self.verticalLayout_16.addLayout(self.horizontalLayout_26)
|
|
1226
1251
|
|
|
1227
1252
|
|
|
1228
1253
|
self.verticalLayout_18.addLayout(self.verticalLayout_16)
|
|
@@ -1446,8 +1471,9 @@ class Ui_MainWindow(object):
|
|
|
1446
1471
|
self.label_47.setText(QCoreApplication.translate("MainWindow", u"\u7533\u8bf7\u6350\u8d60\u529f\u80fd\u8bd5\u7528\uff0830\u5929\u8bd5\u7528\uff09", None))
|
|
1447
1472
|
self.label_45.setText(QCoreApplication.translate("MainWindow", u"\u7535\u5b50\u90ae\u4ef6\u5730\u5740:", None))
|
|
1448
1473
|
self.fetch_trial_pushButton.setText(QCoreApplication.translate("MainWindow", u"\u7533\u8bf7\u8bd5\u7528\u8bb8\u53ef", None))
|
|
1449
|
-
self.label_48.setText(QCoreApplication.translate("MainWindow", u"\u52a0\u5165\u77e5\u8bc6\u661f\u7403\u8fdb\u884c\u6350\u8d60\uff08\u53ef\u540c\u65f6\u57283\u53f0\u8bbe\u5907\u4e0a\u4f7f\u7528\u6350\u8d60\u529f\u80fd\uff09", None))
|
|
1474
|
+
self.label_48.setText(QCoreApplication.translate("MainWindow", u"\u52a0\u5165\u77e5\u8bc6\u661f\u7403\u8fdb\u884c\u6350\u8d60\uff08\u53ef\u540c\u65f6\u57283\u53f0\u8bbe\u5907\u4e0a\u4f7f\u7528\u6350\u8d60\u529f\u80fd\uff09,\u6216\u8005\u8bf7\u4f5c\u8005\u559d\u676f\u2615\ufe0f\uff0c\u8c22\u8c22", None))
|
|
1450
1475
|
self.label_44.setText("")
|
|
1476
|
+
self.label_56.setText("")
|
|
1451
1477
|
self.label_49.setText(QCoreApplication.translate("MainWindow", u"\u5f53\u524d\u6350\u8d60\u6388\u6743\u4fe1\u606f", None))
|
|
1452
1478
|
self.label_license.setText(QCoreApplication.translate("MainWindow", u"TextLabel", None))
|
|
1453
1479
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_star), QCoreApplication.translate("MainWindow", u"\u9879\u76ee\u6350\u8d60", None))
|
|
Binary file
|
hikyuu/hub.pyi
CHANGED
|
@@ -28,11 +28,11 @@ 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
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at
|
|
31
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x7314456bfa00; ConfigModel>
|
|
32
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)
|
|
33
33
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('key', String(), table=<hub_config>)))
|
|
34
34
|
__tablename__: typing.ClassVar[str] = 'hub_config'
|
|
35
|
-
_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 7314456da3e0>
|
|
36
36
|
def __init__(self, **kwargs):
|
|
37
37
|
"""
|
|
38
38
|
A simple constructor that allows initialization from kwargs.
|
|
@@ -109,11 +109,11 @@ class HubManager:
|
|
|
109
109
|
def print_part_info(self, name):
|
|
110
110
|
...
|
|
111
111
|
class HubModel(sqlalchemy.orm.decl_api.Base):
|
|
112
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at
|
|
112
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x731445704310; HubModel>
|
|
113
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)
|
|
114
114
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_repo>)))
|
|
115
115
|
__tablename__: typing.ClassVar[str] = 'hub_repo'
|
|
116
|
-
_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 7314456fef20>
|
|
117
117
|
def __init__(self, **kwargs):
|
|
118
118
|
"""
|
|
119
119
|
A simple constructor that allows initialization from kwargs.
|
|
@@ -146,11 +146,11 @@ class ModuleConflictError(Exception):
|
|
|
146
146
|
def __str__(self):
|
|
147
147
|
...
|
|
148
148
|
class PartModel(sqlalchemy.orm.decl_api.Base):
|
|
149
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at
|
|
149
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x731445704eb0; PartModel>
|
|
150
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)
|
|
151
151
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_part>)))
|
|
152
152
|
__tablename__: typing.ClassVar[str] = 'hub_part'
|
|
153
|
-
_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 7314456ffec0>
|
|
154
154
|
def __init__(self, **kwargs):
|
|
155
155
|
"""
|
|
156
156
|
A simple constructor that allows initialization from kwargs.
|
hikyuu/include/hikyuu/Stock.h
CHANGED
|
@@ -240,6 +240,8 @@ public:
|
|
|
240
240
|
/** 指定类型的K线数据是否被缓存 */
|
|
241
241
|
bool isBuffer(KQuery::KType) const;
|
|
242
242
|
|
|
243
|
+
bool isPreload(KQuery::KType ktype) const;
|
|
244
|
+
|
|
243
245
|
/** 是否为Null */
|
|
244
246
|
bool isNull() const;
|
|
245
247
|
|
|
@@ -274,8 +276,6 @@ private:
|
|
|
274
276
|
// 仅供 StockManager 初始化时调用
|
|
275
277
|
void setPreload(const vector<KQuery::KType>& preload_ktypes);
|
|
276
278
|
|
|
277
|
-
bool isPreload(KQuery::KType ktype) const;
|
|
278
|
-
|
|
279
279
|
void loadKDataToBufferFromKRecordList(const KQuery::KType& ktype, KRecordList&& ks) const;
|
|
280
280
|
void setHistoryFinance(vector<HistoryFinanceInfo>&&);
|
|
281
281
|
|
hikyuu/include/hikyuu/config.h
CHANGED
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
namespace hku {
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* @brief 绑定授权码
|
|
16
|
+
* @param email 邮箱
|
|
17
|
+
* @param active_code 授权码
|
|
18
|
+
*/
|
|
19
|
+
void HKU_API bindEmail(const std::string& email, const std::string& active_code);
|
|
20
|
+
|
|
14
21
|
/**
|
|
15
22
|
* @brief 激活设备
|
|
16
23
|
* @param active_code 授权码
|
|
@@ -30,4 +37,7 @@ std::string HKU_API fetchTrialLicense(const std::string& email);
|
|
|
30
37
|
/** 检查授权是否有效 */
|
|
31
38
|
bool HKU_API isValidLicense();
|
|
32
39
|
|
|
40
|
+
/** 获取授权到期时间 */
|
|
41
|
+
Datetime HKU_API getExpireDate();
|
|
42
|
+
|
|
33
43
|
} // namespace hku
|
|
@@ -16,11 +16,13 @@ public:
|
|
|
16
16
|
DevicePluginInterface() = default;
|
|
17
17
|
virtual ~DevicePluginInterface() = default;
|
|
18
18
|
|
|
19
|
+
virtual void bind(const std::string& email, const std::string& active_code) noexcept = 0;
|
|
19
20
|
virtual void activate(const std::string& active_code, bool replace) noexcept = 0;
|
|
20
21
|
virtual std::string viewLicense() noexcept = 0;
|
|
21
22
|
virtual void removeLicense() noexcept = 0;
|
|
22
23
|
virtual std::string fetchTrialLicense(const std::string& email) noexcept = 0;
|
|
23
24
|
virtual bool isValidLicsense() noexcept = 0;
|
|
25
|
+
virtual Datetime getExpireDate() const noexcept = 0;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
} // namespace hku
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
#include "DataDriverPluginInterface.h"
|
|
19
19
|
#include "HkuExtraPluginInterface.h"
|
|
20
20
|
|
|
21
|
-
#if HKU_ENABLE_ARROW
|
|
22
|
-
#include "HkuViewsPluginInterface.h"
|
|
23
|
-
#endif
|
|
24
|
-
|
|
25
21
|
namespace hku {
|
|
26
22
|
|
|
27
23
|
#define HKU_PLUGIN_BACKTEST "backtest"
|
|
@@ -32,6 +28,5 @@ namespace hku {
|
|
|
32
28
|
#define HKU_PLUGIN_TMREPORT "tmreport"
|
|
33
29
|
#define HKU_PLUGIN_CLICKHOUSE_DRIVER "clickhousedriver"
|
|
34
30
|
#define HKU_PLUGIN_HKU_EXTRA "hkuextra"
|
|
35
|
-
#define HKU_PLUGIN_HKU_VIEWS "hkuviews"
|
|
36
31
|
|
|
37
32
|
} // namespace hku
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
#define HIKYUU_PYTHON_BIND_UTILS_H
|
|
11
11
|
|
|
12
12
|
#include <hikyuu/config.h>
|
|
13
|
-
#if HKU_ENABLE_ARROW
|
|
14
|
-
#include <arrow/api.h>
|
|
15
|
-
#endif
|
|
16
13
|
#include <pybind11/pybind11.h>
|
|
17
14
|
|
|
18
15
|
#include <pybind11/operators.h>
|
|
@@ -127,15 +124,6 @@ inline bool check_pyfunction_arg_num(const py::object& func, size_t arg_num) {
|
|
|
127
124
|
*/
|
|
128
125
|
size_t utf8_to_utf32(const std::string& utf8_str, int32_t* out, size_t out_len) noexcept;
|
|
129
126
|
|
|
130
|
-
#if HKU_ENABLE_ARROW
|
|
131
|
-
/*
|
|
132
|
-
* 将arrow::Table转换为 pyarrow::Table
|
|
133
|
-
* @param table 待转换的arrow::Table
|
|
134
|
-
* @return 转换后的py::object
|
|
135
|
-
*/
|
|
136
|
-
py::object to_pyarrow_table(const std::shared_ptr<arrow::Table>& table);
|
|
137
|
-
#endif
|
|
138
|
-
|
|
139
127
|
} // namespace hku
|
|
140
128
|
|
|
141
129
|
#endif // HIKYUU_PYTHON_BIND_UTILS_H
|
|
@@ -11,5 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
#include "crt/SP_FixedPercent.h"
|
|
13
13
|
#include "crt/SP_FixedValue.h"
|
|
14
|
+
#include "crt/SP_Uniform.h"
|
|
15
|
+
#include "crt/SP_Normal.h"
|
|
16
|
+
#include "crt/SP_LogNormal.h"
|
|
17
|
+
#include "crt/SP_TruncNormal.h"
|
|
14
18
|
|
|
15
|
-
#endif /* SLIPPAGE_BUILD_IN_H_ */
|
|
19
|
+
#endif /* SLIPPAGE_BUILD_IN_H_ */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SP_LogNormal.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025年10月25日
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 对数正态分布随机价格移滑价差算法, 买入和卖出操作是基于对数正态分布的随机价格偏移
|
|
16
|
+
* @param mean 对数正态分布的均值参数
|
|
17
|
+
* @param stddev 对数正态分布的标准差参数
|
|
18
|
+
* @return 滑点对象指针
|
|
19
|
+
*/
|
|
20
|
+
SlippagePtr HKU_API SP_LogNormal(double mean = 0.0, double stddev = 0.05);
|
|
21
|
+
|
|
22
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SP_Normal.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025年10月25日
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 正态分布随机价格移滑价差算法, 买入和卖出操作是基于正态分布的随机价格偏移
|
|
16
|
+
* @param mean 正态分布均值
|
|
17
|
+
* @param stddev 正态分布标准差
|
|
18
|
+
* @return 滑点对象指针
|
|
19
|
+
*/
|
|
20
|
+
SlippagePtr HKU_API SP_Normal(double mean = 0.0, double stddev = 0.05);
|
|
21
|
+
|
|
22
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SP_TruncNormal.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025年10月25日
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 截断正态分布随机价格移滑价差算法, 买入和卖出操作是基于截断正态分布的随机价格偏移
|
|
16
|
+
* @param mean 正态分布均值
|
|
17
|
+
* @param stddev 正态分布标准差
|
|
18
|
+
* @param min_value 截断最小值
|
|
19
|
+
* @param max_value 截断最大值
|
|
20
|
+
* @return 滑点对象指针
|
|
21
|
+
*/
|
|
22
|
+
SlippagePtr HKU_API SP_TruncNormal(double mean = 0.0, double stddev = 0.05, double min_value = -0.1,
|
|
23
|
+
double max_value = 0.1);
|
|
24
|
+
|
|
25
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SL_FixedValue.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2016年5月7日
|
|
5
|
+
* Author: Administrator
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 均匀分布随机价格移滑价差算法, 买入和卖出操作是价格在[min_value,
|
|
16
|
+
* max_value]范围内的均匀分布随机偏移
|
|
17
|
+
* @param min_value 偏移价格下限
|
|
18
|
+
* @param max_value 偏移价格上限
|
|
19
|
+
* @return
|
|
20
|
+
*/
|
|
21
|
+
SlippagePtr HKU_API SP_Uniform(double min_value = -0.05, double max_value = 0.05);
|
|
22
|
+
|
|
23
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-10-25
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
class LogNormalSlippage : public SlippageBase {
|
|
15
|
+
SLIPPAGE_IMP(LogNormalSlippage)
|
|
16
|
+
SLIPPAGE_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
18
|
+
public:
|
|
19
|
+
LogNormalSlippage();
|
|
20
|
+
virtual ~LogNormalSlippage();
|
|
21
|
+
virtual void _checkParam(const string& name) const override;
|
|
22
|
+
|
|
23
|
+
private:
|
|
24
|
+
static std::random_device ms_rd;
|
|
25
|
+
static std::mt19937 ms_gen;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-10-25
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
class NormalSlippage : public SlippageBase {
|
|
15
|
+
SLIPPAGE_IMP(NormalSlippage)
|
|
16
|
+
SLIPPAGE_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
18
|
+
public:
|
|
19
|
+
NormalSlippage();
|
|
20
|
+
virtual ~NormalSlippage();
|
|
21
|
+
virtual void _checkParam(const string& name) const override;
|
|
22
|
+
|
|
23
|
+
private:
|
|
24
|
+
static std::random_device ms_rd;
|
|
25
|
+
static std::mt19937 ms_gen;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-10-25
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
class TruncNormalSlippage : public SlippageBase {
|
|
15
|
+
SLIPPAGE_IMP(TruncNormalSlippage)
|
|
16
|
+
SLIPPAGE_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
18
|
+
public:
|
|
19
|
+
TruncNormalSlippage();
|
|
20
|
+
virtual ~TruncNormalSlippage();
|
|
21
|
+
virtual void _checkParam(const string& name) const override;
|
|
22
|
+
|
|
23
|
+
private:
|
|
24
|
+
static std::random_device ms_rd;
|
|
25
|
+
static std::mt19937 ms_gen;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-10-25
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../SlippageBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
class UniformSlippage : public SlippageBase {
|
|
15
|
+
SLIPPAGE_IMP(UniformSlippage)
|
|
16
|
+
SLIPPAGE_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
18
|
+
public:
|
|
19
|
+
UniformSlippage();
|
|
20
|
+
virtual ~UniformSlippage();
|
|
21
|
+
virtual void _checkParam(const string& name) const override;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
} /* namespace hku */
|
hikyuu/include/hikyuu/version.h
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
#define HKU_VERSION_H
|
|
13
13
|
|
|
14
14
|
// clang-format off
|
|
15
|
-
#define HKU_VERSION "2.
|
|
15
|
+
#define HKU_VERSION "2.7.0"
|
|
16
16
|
#define HKU_VERSION_MAJOR 2
|
|
17
|
-
#define HKU_VERSION_MINOR
|
|
18
|
-
#define HKU_VERSION_ALTER
|
|
19
|
-
#define HKU_VERSION_BUILD
|
|
17
|
+
#define HKU_VERSION_MINOR 7
|
|
18
|
+
#define HKU_VERSION_ALTER 0
|
|
19
|
+
#define HKU_VERSION_BUILD 202511020040
|
|
20
20
|
#define HKU_VERSION_MODE "RELEASE"
|
|
21
|
-
#define HKU_VERSION_GIT "2.
|
|
21
|
+
#define HKU_VERSION_GIT "2.7.0 release.3d6e5754 (RELEASE)"
|
|
22
22
|
// clang-format on
|
|
23
23
|
|
|
24
24
|
#endif /* HKU_VERSION_H */
|
hikyuu/plugin/libbacktest.so
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/plugin/libdataserver.so
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/plugin/libdevice.so
CHANGED
|
Binary file
|
hikyuu/plugin/libextind.so
CHANGED
|
Binary file
|
hikyuu/plugin/libhkuextra.so
CHANGED
|
Binary file
|
hikyuu/plugin/libimport2hdf5.so
CHANGED
|
Binary file
|
hikyuu/plugin/libtmreport.so
CHANGED
|
Binary file
|