hikyuu 2.6.2__py3-none-win_amd64.whl → 2.6.5__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__.py +1 -1
- hikyuu/__init__.pyi +28 -13
- hikyuu/analysis/__init__.pyi +20 -0
- hikyuu/analysis/analysis.pyi +21 -1
- hikyuu/core.pyi +22 -2
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core310.pyi +499 -50
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +499 -50
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +499 -50
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +499 -50
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/core39.pyi +499 -50
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/data/common.py +1 -1
- hikyuu/data/common_mysql.py +19 -0
- hikyuu/data/common_pytdx.py +2 -0
- hikyuu/data/common_sqlite3.py +1 -0
- hikyuu/data/hku_config_template.py +14 -0
- hikyuu/data/mysql_upgrade/0028.sql +95 -0
- hikyuu/data/pytdx_to_h5.py +53 -13
- hikyuu/data/pytdx_to_mysql.py +42 -9
- hikyuu/data/pytdx_to_taos.py +736 -0
- hikyuu/data/sqlite_upgrade/0028.sql +97 -0
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/__init__.pyi +1 -1
- hikyuu/draw/drawplot/bokeh_draw.pyi +24 -9
- hikyuu/draw/drawplot/echarts_draw.pyi +24 -9
- hikyuu/draw/drawplot/matplotlib_draw.py +26 -4
- hikyuu/draw/drawplot/matplotlib_draw.pyi +24 -9
- hikyuu/draw/kaufman.py +2 -2
- hikyuu/draw/kaufman.pyi +2 -2
- hikyuu/examples/notebook/001-overview.ipynb +65 -100
- hikyuu/examples/notebook/004-IndicatorOverview.ipynb +34 -32
- hikyuu/examples/notebook/007-SystemDetails.ipynb +64 -50
- hikyuu/examples/notebook/010-Portfolio.ipynb +120 -124
- hikyuu/extend.py +1 -1
- hikyuu/extend.pyi +24 -9
- hikyuu/fetcher/stock/zh_block_em.py +349 -5
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +2 -1
- hikyuu/gui/HikyuuTDX.py +47 -24
- hikyuu/gui/data/ImportBlockInfoTask.py +1 -1
- hikyuu/gui/data/ImportHistoryFinanceTask.py +48 -44
- hikyuu/gui/data/ImportPytdxTimeToH5Task.py +3 -1
- hikyuu/gui/data/ImportPytdxToH5Task.py +4 -2
- hikyuu/gui/data/ImportPytdxTransToH5Task.py +3 -1
- hikyuu/gui/data/ImportWeightToSqliteTask.py +2 -1
- hikyuu/gui/data/ImportZhBond10Task.py +1 -1
- hikyuu/gui/data/MainWindow.py +123 -106
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +7 -3
- hikyuu/gui/data/UseQmtImportToH5Thread.py +1 -0
- hikyuu/gui/data/UseTdxImportToH5Thread.py +2 -1
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/Block.h +20 -0
- hikyuu/include/hikyuu/KQuery.h +8 -0
- hikyuu/include/hikyuu/MarketInfo.h +6 -0
- hikyuu/include/hikyuu/Stock.h +1 -1
- hikyuu/include/hikyuu/StockManager.h +6 -0
- hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +35 -0
- hikyuu/include/hikyuu/indicator/Indicator.h +5 -0
- hikyuu/include/hikyuu/indicator/IndicatorImp.h +8 -3
- hikyuu/include/hikyuu/indicator/build_in.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/BARSLASTCOUNT.h +33 -0
- hikyuu/include/hikyuu/indicator/crt/INSUM.h +5 -10
- hikyuu/include/hikyuu/indicator/crt/RSI.h +2 -18
- hikyuu/include/hikyuu/indicator/imp/IBarsLastCount.h +27 -0
- hikyuu/include/hikyuu/plugin/backtest.h +3 -2
- hikyuu/include/hikyuu/plugin/device.h +6 -3
- hikyuu/include/hikyuu/plugin/extind.h +150 -0
- hikyuu/include/hikyuu/plugin/interface/BackTestPluginInterface.h +2 -1
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +1 -0
- hikyuu/include/hikyuu/plugin/interface/ExtendIndicatorsPluginInterface.h +26 -0
- hikyuu/include/hikyuu/plugin/interface/TMReportPluginInterface.h +80 -0
- hikyuu/include/hikyuu/plugin/interface/plugins.h +4 -0
- hikyuu/include/hikyuu/strategy/BrokerTradeManager.h +7 -5
- hikyuu/include/hikyuu/strategy/Strategy.h +22 -9
- hikyuu/include/hikyuu/trade_manage/OrderBrokerBase.h +11 -4
- hikyuu/include/hikyuu/trade_manage/Performance.h +17 -9
- hikyuu/include/hikyuu/trade_manage/PositionExtInfo.h +92 -0
- hikyuu/include/hikyuu/trade_manage/PositionRecord.h +7 -1
- hikyuu/include/hikyuu/trade_manage/TradeManager.h +8 -5
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +66 -5
- hikyuu/include/hikyuu/trade_manage/TradeRecord.h +9 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +8 -5
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_EqualWeight.h +4 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICIRWeight.h +4 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICWeight.h +4 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_Weight.h +4 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/EqualWeightMultiFactor.h +2 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICIRMultiFactor.h +2 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICMultiFactor.h +2 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/selector/crt/SE_Optimal.h +8 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/OptimalEvaluateSelector.h +28 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/OptimalSelectorBase.h +1 -0
- hikyuu/include/hikyuu/trade_sys/system/TradeRequest.h +7 -4
- hikyuu/include/hikyuu/trade_sys/system/imp/WalkForwardTradeManager.h +17 -13
- hikyuu/include/hikyuu/utilities/DllLoader.h +226 -0
- hikyuu/include/hikyuu/utilities/datetime/Datetime.h +20 -0
- hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +6 -0
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +10 -10
- hikyuu/include/hikyuu/utilities/thread/{MQStealThreadPool.h → GlobalMQStealThreadPool.h} +12 -12
- hikyuu/include/hikyuu/utilities/thread/GlobalMQThreadPool.h +271 -0
- hikyuu/include/hikyuu/utilities/thread/{StealThreadPool.h → GlobalStealThreadPool.h} +11 -10
- hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +224 -0
- hikyuu/include/hikyuu/utilities/thread/InterruptFlag.h +16 -0
- hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +40 -77
- hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +31 -59
- hikyuu/include/hikyuu/utilities/thread/ThreadSafeQueue.h +4 -0
- hikyuu/include/hikyuu/utilities/thread/algorithm.h +9 -9
- hikyuu/include/hikyuu/utilities/thread/thread.h +4 -0
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/plugin/backtest.dll +0 -0
- hikyuu/plugin/dataserver.dll +0 -0
- hikyuu/plugin/device.dll +0 -0
- hikyuu/plugin/extind.dll +0 -0
- hikyuu/plugin/import2hdf5.dll +0 -0
- hikyuu/plugin/tmreport.dll +0 -0
- hikyuu/trade_manage/__init__.pyi +23 -8
- hikyuu/trade_manage/broker.py +8 -8
- hikyuu/trade_manage/broker.pyi +4 -4
- hikyuu/trade_manage/broker_easytrader.py +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +2 -2
- hikyuu/trade_manage/broker_mail.py +2 -2
- hikyuu/trade_manage/broker_mail.pyi +2 -2
- hikyuu/trade_manage/trade.pyi +23 -8
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.2.dist-info → hikyuu-2.6.5.dist-info}/METADATA +4 -3
- {hikyuu-2.6.2.dist-info → hikyuu-2.6.5.dist-info}/RECORD +136 -121
- {hikyuu-2.6.2.dist-info → hikyuu-2.6.5.dist-info}/LICENSE +0 -0
- {hikyuu-2.6.2.dist-info → hikyuu-2.6.5.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.2.dist-info → hikyuu-2.6.5.dist-info}/entry_points.txt +0 -0
- {hikyuu-2.6.2.dist-info → hikyuu-2.6.5.dist-info}/top_level.txt +0 -0
|
@@ -54,7 +54,7 @@ public:
|
|
|
54
54
|
explicit MQThreadPool(size_t n, bool until_empty = true)
|
|
55
55
|
: m_done(false), m_worker_num(n), m_runnging_until_empty(until_empty) {
|
|
56
56
|
try {
|
|
57
|
-
|
|
57
|
+
m_thread_need_stop.resize(m_worker_num);
|
|
58
58
|
for (int i = 0; i < m_worker_num; i++) {
|
|
59
59
|
// 创建工作线程及其任务队列
|
|
60
60
|
m_queues.push_back(
|
|
@@ -105,7 +105,7 @@ public:
|
|
|
105
105
|
/** 向线程池提交任务 */
|
|
106
106
|
template <typename FunctionType>
|
|
107
107
|
auto submit(FunctionType f) {
|
|
108
|
-
if (
|
|
108
|
+
if (m_done) {
|
|
109
109
|
throw std::logic_error("You can't submit a task to the stopped MQThreadPool!");
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -117,15 +117,17 @@ public:
|
|
|
117
117
|
size_t min_count = std::numeric_limits<size_t>::max();
|
|
118
118
|
int index = 0;
|
|
119
119
|
for (int i = 0; i < m_worker_num; ++i) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
if (!m_thread_need_stop[i].isSet()) {
|
|
121
|
+
size_t cur_count = m_queues[i]->size();
|
|
122
|
+
if (cur_count == 0) {
|
|
123
|
+
index = i;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
125
126
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
if (cur_count < min_count) {
|
|
128
|
+
min_count = cur_count;
|
|
129
|
+
index = i;
|
|
130
|
+
}
|
|
129
131
|
}
|
|
130
132
|
}
|
|
131
133
|
|
|
@@ -146,23 +148,21 @@ public:
|
|
|
146
148
|
* 等待各线程完成当前执行的任务后立即结束退出
|
|
147
149
|
*/
|
|
148
150
|
void stop() {
|
|
149
|
-
if (m_done) {
|
|
151
|
+
if (m_done.exchange(true, std::memory_order_relaxed)) {
|
|
150
152
|
return;
|
|
151
153
|
}
|
|
152
154
|
|
|
153
|
-
m_done = true;
|
|
154
|
-
|
|
155
|
-
// 同时加入结束任务指示,以便在dll退出时也能够终止
|
|
156
155
|
for (size_t i = 0; i < m_worker_num; i++) {
|
|
157
|
-
|
|
158
|
-
m_interrupt_flags[i]->set();
|
|
159
|
-
}
|
|
156
|
+
m_thread_need_stop[i].set();
|
|
160
157
|
m_queues[i]->push(FuncWrapper());
|
|
161
158
|
}
|
|
162
159
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
{
|
|
161
|
+
std::lock_guard<std::mutex> lock(m_mutex_join);
|
|
162
|
+
for (size_t i = 0; i < m_worker_num; i++) {
|
|
163
|
+
if (m_threads[i].joinable()) {
|
|
164
|
+
m_threads[i].join();
|
|
165
|
+
}
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -181,46 +181,27 @@ public:
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
// 指示各工作线程在未获取到工作任务时,停止运行
|
|
184
|
-
if (m_runnging_until_empty) {
|
|
185
|
-
while (true) {
|
|
186
|
-
bool can_quit = true;
|
|
187
|
-
for (size_t i = 0; i < m_worker_num; i++) {
|
|
188
|
-
if (m_queues[i]->size() != 0) {
|
|
189
|
-
can_quit = false;
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (can_quit) {
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
std::this_thread::yield();
|
|
199
|
-
}
|
|
200
|
-
|
|
184
|
+
if (!m_runnging_until_empty) {
|
|
201
185
|
m_done = true;
|
|
202
186
|
for (size_t i = 0; i < m_worker_num; i++) {
|
|
203
|
-
|
|
204
|
-
m_interrupt_flags[i]->set();
|
|
205
|
-
}
|
|
187
|
+
m_thread_need_stop[i].set();
|
|
206
188
|
}
|
|
207
189
|
}
|
|
208
190
|
|
|
209
191
|
for (size_t i = 0; i < m_worker_num; i++) {
|
|
210
192
|
m_queues[i]->push(FuncWrapper());
|
|
193
|
+
m_queues[i]->notify_all();
|
|
211
194
|
}
|
|
212
195
|
|
|
213
|
-
// 等待线程结束
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
m_threads[i].
|
|
196
|
+
{ // 等待线程结束
|
|
197
|
+
std::lock_guard<std::mutex> lock(m_mutex_join);
|
|
198
|
+
for (size_t i = 0; i < m_worker_num; i++) {
|
|
199
|
+
if (m_threads[i].joinable()) {
|
|
200
|
+
m_threads[i].join();
|
|
201
|
+
}
|
|
217
202
|
}
|
|
218
203
|
}
|
|
219
204
|
|
|
220
|
-
for (size_t i = 0; i < m_worker_num; i++) {
|
|
221
|
-
m_queues[i]->clear();
|
|
222
|
-
}
|
|
223
|
-
|
|
224
205
|
m_done = true;
|
|
225
206
|
}
|
|
226
207
|
|
|
@@ -231,38 +212,20 @@ private:
|
|
|
231
212
|
bool m_runnging_until_empty; // 运行直到队列空时停止
|
|
232
213
|
|
|
233
214
|
std::vector<std::unique_ptr<ThreadSafeQueue<task_type>>> m_queues; // 线程任务队列
|
|
234
|
-
std::vector<InterruptFlag
|
|
215
|
+
std::vector<InterruptFlag> m_thread_need_stop; // 线程终止标志
|
|
235
216
|
std::vector<std::thread> m_threads; // 工作线程
|
|
236
|
-
|
|
237
|
-
// 线程本地变量
|
|
238
|
-
#if CPP_STANDARD >= CPP_STANDARD_17 && !defined(__clang__)
|
|
239
|
-
inline static thread_local ThreadSafeQueue<task_type>* m_local_work_queue =
|
|
240
|
-
nullptr; // 本地任务队列
|
|
241
|
-
inline static thread_local int m_index = -1; // 在线程池中的序号
|
|
242
|
-
inline static thread_local InterruptFlag m_thread_need_stop; // 线程停止运行指示
|
|
243
|
-
#else
|
|
244
|
-
static thread_local ThreadSafeQueue<task_type>* m_local_work_queue; // 本地任务队列
|
|
245
|
-
static thread_local int m_index; // 在线程池中的序号
|
|
246
|
-
static thread_local InterruptFlag m_thread_need_stop; // 线程停止运行指示
|
|
247
|
-
#endif
|
|
217
|
+
std::mutex m_mutex_join; // 用于保护 joinable
|
|
248
218
|
|
|
249
219
|
void worker_thread(int index) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
static void run_pending_task() {
|
|
261
|
-
task_type task;
|
|
262
|
-
m_local_work_queue->wait_and_pop(task);
|
|
263
|
-
if (task.isNullTask()) {
|
|
264
|
-
m_thread_need_stop.set();
|
|
265
|
-
} else {
|
|
220
|
+
auto *local_queue = m_queues[index].get();
|
|
221
|
+
auto *local_stop_flag = &m_thread_need_stop[index];
|
|
222
|
+
while (!local_stop_flag->isSet() || !m_done) {
|
|
223
|
+
task_type task;
|
|
224
|
+
local_queue->wait_and_pop(task);
|
|
225
|
+
if (task.isNullTask()) {
|
|
226
|
+
local_stop_flag->set();
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
266
229
|
task();
|
|
267
230
|
}
|
|
268
231
|
}
|
|
@@ -19,16 +19,13 @@
|
|
|
19
19
|
#include "ThreadSafeQueue.h"
|
|
20
20
|
#include "InterruptFlag.h"
|
|
21
21
|
#include "../cppdef.h"
|
|
22
|
+
#include "../Log.h"
|
|
22
23
|
|
|
23
24
|
#ifdef __GNUC__
|
|
24
25
|
#pragma GCC diagnostic push
|
|
25
26
|
#pragma GCC diagnostic ignored "-Wsign-compare"
|
|
26
27
|
#endif
|
|
27
28
|
|
|
28
|
-
#ifndef HKU_UTILS_API
|
|
29
|
-
#define HKU_UTILS_API
|
|
30
|
-
#endif
|
|
31
|
-
|
|
32
29
|
namespace hku {
|
|
33
30
|
|
|
34
31
|
/**
|
|
@@ -37,11 +34,7 @@ namespace hku {
|
|
|
37
34
|
* @details
|
|
38
35
|
* @ingroup ThreadPool
|
|
39
36
|
*/
|
|
40
|
-
#ifdef _MSC_VER
|
|
41
37
|
class ThreadPool {
|
|
42
|
-
#else
|
|
43
|
-
class HKU_UTILS_API ThreadPool {
|
|
44
|
-
#endif
|
|
45
38
|
public:
|
|
46
39
|
/**
|
|
47
40
|
* 默认构造函数,创建和当前系统CPU数一致的线程数
|
|
@@ -56,7 +49,6 @@ public:
|
|
|
56
49
|
explicit ThreadPool(size_t n, bool until_empty = true)
|
|
57
50
|
: m_done(false), m_worker_num(n), m_running_until_empty(until_empty) {
|
|
58
51
|
try {
|
|
59
|
-
m_interrupt_flags.resize(m_worker_num, nullptr);
|
|
60
52
|
// 初始完毕所有线程资源后再启动线程
|
|
61
53
|
for (int i = 0; i < m_worker_num; i++) {
|
|
62
54
|
// 创建工作线程及其任务队列
|
|
@@ -94,7 +86,7 @@ public:
|
|
|
94
86
|
/** 向线程池提交任务 */
|
|
95
87
|
template <typename FunctionType>
|
|
96
88
|
auto submit(FunctionType f) {
|
|
97
|
-
if (
|
|
89
|
+
if (m_done) {
|
|
98
90
|
throw std::logic_error("You can't submit a task to the stopped task group!");
|
|
99
91
|
}
|
|
100
92
|
typedef typename std::invoke_result<FunctionType>::type result_type;
|
|
@@ -122,23 +114,23 @@ public:
|
|
|
122
114
|
* 等待各线程完成当前执行的任务后立即结束退出
|
|
123
115
|
*/
|
|
124
116
|
void stop() {
|
|
125
|
-
if (m_done) {
|
|
117
|
+
if (m_done.exchange(true, std::memory_order_relaxed)) {
|
|
126
118
|
return;
|
|
127
119
|
}
|
|
128
120
|
|
|
129
|
-
m_done = true;
|
|
130
|
-
|
|
131
121
|
// 同时加入结束任务指示,以便在dll退出时也能够终止
|
|
132
122
|
for (size_t i = 0; i < m_worker_num; i++) {
|
|
133
|
-
if (m_interrupt_flags[i]) {
|
|
134
|
-
m_interrupt_flags[i]->set();
|
|
135
|
-
}
|
|
136
123
|
m_master_work_queue.push(FuncWrapper());
|
|
137
124
|
}
|
|
138
125
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
126
|
+
m_master_work_queue.notify_all();
|
|
127
|
+
|
|
128
|
+
{
|
|
129
|
+
std::lock_guard<std::mutex> lock(m_mutex_join);
|
|
130
|
+
for (size_t i = 0; i < m_worker_num; i++) {
|
|
131
|
+
if (m_threads[i].joinable()) {
|
|
132
|
+
m_threads[i].join();
|
|
133
|
+
}
|
|
142
134
|
}
|
|
143
135
|
}
|
|
144
136
|
|
|
@@ -155,31 +147,28 @@ public:
|
|
|
155
147
|
}
|
|
156
148
|
|
|
157
149
|
// 指示各工作线程在未获取到工作任务时,停止运行
|
|
158
|
-
if (m_running_until_empty) {
|
|
159
|
-
while (m_master_work_queue.size() > 0) {
|
|
160
|
-
std::this_thread::yield();
|
|
161
|
-
}
|
|
150
|
+
if (!m_running_until_empty) {
|
|
162
151
|
m_done = true;
|
|
163
|
-
for (size_t i = 0; i < m_worker_num; i++) {
|
|
164
|
-
if (m_interrupt_flags[i]) {
|
|
165
|
-
m_interrupt_flags[i]->set();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
152
|
}
|
|
169
153
|
|
|
170
|
-
|
|
154
|
+
// 仍旧有可能某个线程没有获取到,导致没有终止
|
|
155
|
+
for (size_t i = 0; i < 2 * m_worker_num; i++) {
|
|
171
156
|
m_master_work_queue.push(FuncWrapper());
|
|
172
157
|
}
|
|
173
158
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
159
|
+
m_master_work_queue.notify_all();
|
|
160
|
+
|
|
161
|
+
{
|
|
162
|
+
std::lock_guard<std::mutex> lock(m_mutex_join);
|
|
163
|
+
for (size_t i = 0; i < m_worker_num; i++) {
|
|
164
|
+
if (m_threads[i].joinable()) {
|
|
165
|
+
m_threads[i].join();
|
|
166
|
+
}
|
|
178
167
|
}
|
|
179
168
|
}
|
|
180
169
|
|
|
181
|
-
m_master_work_queue.clear();
|
|
182
170
|
m_done = true;
|
|
171
|
+
m_master_work_queue.clear();
|
|
183
172
|
}
|
|
184
173
|
|
|
185
174
|
private:
|
|
@@ -190,36 +179,19 @@ private:
|
|
|
190
179
|
|
|
191
180
|
ThreadSafeQueue<task_type> m_master_work_queue; // 主线程任务队列
|
|
192
181
|
std::vector<std::thread> m_threads; // 工作线程
|
|
193
|
-
std::
|
|
194
|
-
|
|
195
|
-
// 线程本地变量
|
|
196
|
-
#if CPP_STANDARD >= CPP_STANDARD_17 && !defined(__clang__)
|
|
197
|
-
inline static thread_local InterruptFlag m_thread_need_stop; // 线程停止运行指示
|
|
198
|
-
inline static thread_local int m_index = -1; // 在线程池中的序号
|
|
199
|
-
#else
|
|
200
|
-
static thread_local InterruptFlag m_thread_need_stop; // 线程停止运行指示
|
|
201
|
-
static thread_local int m_index; // 在线程池中的序号
|
|
202
|
-
#endif
|
|
182
|
+
std::mutex m_mutex_join; // 用于保护 joinable
|
|
203
183
|
|
|
204
184
|
void worker_thread(int index) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
m_interrupt_flags[index] = nullptr;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
void run_pending_task() {
|
|
215
|
-
task_type task;
|
|
216
|
-
m_master_work_queue.wait_and_pop(task);
|
|
217
|
-
if (task.isNullTask()) {
|
|
218
|
-
m_thread_need_stop.set();
|
|
219
|
-
} else {
|
|
185
|
+
while (!m_done) {
|
|
186
|
+
task_type task;
|
|
187
|
+
m_master_work_queue.wait_and_pop(task);
|
|
188
|
+
if (task.isNullTask()) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
220
191
|
task();
|
|
221
192
|
}
|
|
222
193
|
}
|
|
194
|
+
|
|
223
195
|
}; // namespace hku
|
|
224
196
|
|
|
225
197
|
} /* namespace hku */
|
|
@@ -11,9 +11,13 @@
|
|
|
11
11
|
#include <functional>
|
|
12
12
|
#include <vector>
|
|
13
13
|
#include "ThreadPool.h"
|
|
14
|
-
#include "StealThreadPool.h"
|
|
15
14
|
#include "MQThreadPool.h"
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
//----------------------------------------------------------------
|
|
17
|
+
// Note: 除 ThreadPool/MQThreadPool 外,其他线程池由于使用
|
|
18
|
+
// 了 thread_local,本质为全局变量,只适合全局单例的方式使用,
|
|
19
|
+
// 否则会出现不同线程池示例互相影响导致出错。
|
|
20
|
+
//----------------------------------------------------------------
|
|
17
21
|
|
|
18
22
|
namespace hku {
|
|
19
23
|
|
|
@@ -26,10 +30,6 @@ inline std::vector<range_t> parallelIndexRange(size_t start, size_t end) {
|
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
size_t total = end - start;
|
|
29
|
-
if (total == 0) {
|
|
30
|
-
return ret;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
33
|
size_t cpu_num = std::thread::hardware_concurrency();
|
|
34
34
|
if (cpu_num == 1) {
|
|
35
35
|
ret.emplace_back(start, end);
|
|
@@ -51,7 +51,7 @@ inline std::vector<range_t> parallelIndexRange(size_t start, size_t end) {
|
|
|
51
51
|
return ret;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
template <typename FunctionType, class TaskGroup =
|
|
54
|
+
template <typename FunctionType, class TaskGroup = MQThreadPool>
|
|
55
55
|
void parallel_for_index_void(size_t start, size_t end, FunctionType f) {
|
|
56
56
|
auto ranges = parallelIndexRange(start, end);
|
|
57
57
|
TaskGroup tg;
|
|
@@ -66,7 +66,7 @@ void parallel_for_index_void(size_t start, size_t end, FunctionType f) {
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
template <typename FunctionType, class TaskGroup =
|
|
69
|
+
template <typename FunctionType, class TaskGroup = MQThreadPool>
|
|
70
70
|
auto parallel_for_index(size_t start, size_t end, FunctionType f) {
|
|
71
71
|
auto ranges = parallelIndexRange(start, end);
|
|
72
72
|
TaskGroup tg;
|
|
@@ -93,7 +93,7 @@ auto parallel_for_index(size_t start, size_t end, FunctionType f) {
|
|
|
93
93
|
return ret;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
template <typename FunctionType, class TaskGroup =
|
|
96
|
+
template <typename FunctionType, class TaskGroup = MQThreadPool>
|
|
97
97
|
auto parallel_for_range(size_t start, size_t end, FunctionType f) {
|
|
98
98
|
auto ranges = parallelIndexRange(start, end);
|
|
99
99
|
TaskGroup tg;
|
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.6.
|
|
15
|
+
#define HKU_VERSION "2.6.5"
|
|
16
16
|
#define HKU_VERSION_MAJOR 2
|
|
17
17
|
#define HKU_VERSION_MINOR 6
|
|
18
|
-
#define HKU_VERSION_ALTER
|
|
19
|
-
#define HKU_VERSION_BUILD
|
|
18
|
+
#define HKU_VERSION_ALTER 5
|
|
19
|
+
#define HKU_VERSION_BUILD 202507031531
|
|
20
20
|
#define HKU_VERSION_MODE "RELEASE"
|
|
21
|
-
#define HKU_VERSION_GIT "2.6.
|
|
21
|
+
#define HKU_VERSION_GIT "2.6.5 release.113bf7ee (RELEASE)"
|
|
22
22
|
// clang-format on
|
|
23
23
|
|
|
24
24
|
#endif /* HKU_VERSION_H */
|
hikyuu/plugin/backtest.dll
CHANGED
|
Binary file
|
hikyuu/plugin/dataserver.dll
CHANGED
|
Binary file
|
hikyuu/plugin/device.dll
CHANGED
|
Binary file
|
hikyuu/plugin/extind.dll
ADDED
|
Binary file
|
hikyuu/plugin/import2hdf5.dll
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/trade_manage/__init__.pyi
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from datetime import date
|
|
3
3
|
from datetime import datetime
|
|
4
|
-
from datetime import time
|
|
5
4
|
from datetime import timedelta
|
|
6
|
-
from datetime import timezone
|
|
7
|
-
from datetime import tzinfo
|
|
8
5
|
from hikyuu import core
|
|
9
6
|
from hikyuu import cpp
|
|
10
7
|
import hikyuu.cpp.core39
|
|
@@ -26,6 +23,7 @@ from hikyuu.cpp.core39 import AllocateFundsBase
|
|
|
26
23
|
from hikyuu.cpp.core39 import BACKSET
|
|
27
24
|
from hikyuu.cpp.core39 import BARSCOUNT
|
|
28
25
|
from hikyuu.cpp.core39 import BARSLAST
|
|
26
|
+
from hikyuu.cpp.core39 import BARSLASTCOUNT
|
|
29
27
|
from hikyuu.cpp.core39 import BARSSINCE
|
|
30
28
|
from hikyuu.cpp.core39 import BARSSINCEN
|
|
31
29
|
from hikyuu.cpp.core39 import BETWEEN
|
|
@@ -178,6 +176,7 @@ from hikyuu.cpp.core39 import PositionRecord
|
|
|
178
176
|
from hikyuu.cpp.core39 import PositionRecordList
|
|
179
177
|
from hikyuu.cpp.core39 import ProfitGoalBase
|
|
180
178
|
from hikyuu.cpp.core39 import Query
|
|
179
|
+
from hikyuu.cpp.core39 import RANK
|
|
181
180
|
from hikyuu.cpp.core39 import RECOVER_BACKWARD
|
|
182
181
|
from hikyuu.cpp.core39 import RECOVER_EQUAL_BACKWARD
|
|
183
182
|
from hikyuu.cpp.core39 import RECOVER_EQUAL_FORWARD
|
|
@@ -195,6 +194,7 @@ from hikyuu.cpp.core39 import ROUNDDOWN
|
|
|
195
194
|
from hikyuu.cpp.core39 import ROUNDUP
|
|
196
195
|
from hikyuu.cpp.core39 import RSI
|
|
197
196
|
from hikyuu.cpp.core39 import SAFTYLOSS
|
|
197
|
+
from hikyuu.cpp.core39 import SE_EvaluateOptimal
|
|
198
198
|
from hikyuu.cpp.core39 import SE_Fixed
|
|
199
199
|
from hikyuu.cpp.core39 import SE_MaxFundsOptimal
|
|
200
200
|
from hikyuu.cpp.core39 import SE_MultiFactor
|
|
@@ -227,8 +227,8 @@ from hikyuu.cpp.core39 import SPEARMAN
|
|
|
227
227
|
from hikyuu.cpp.core39 import SP_FixedPercent
|
|
228
228
|
from hikyuu.cpp.core39 import SP_FixedValue
|
|
229
229
|
from hikyuu.cpp.core39 import SQRT
|
|
230
|
-
from hikyuu.cpp.core39 import STDEV as STD
|
|
231
230
|
from hikyuu.cpp.core39 import STDEV
|
|
231
|
+
from hikyuu.cpp.core39 import STDEV as STD
|
|
232
232
|
from hikyuu.cpp.core39 import STDP
|
|
233
233
|
from hikyuu.cpp.core39 import ST_FixedPercent
|
|
234
234
|
from hikyuu.cpp.core39 import ST_Indicator
|
|
@@ -439,12 +439,28 @@ from hikyuu.cpp.core39 import TradeRequest
|
|
|
439
439
|
from hikyuu.cpp.core39 import TransList
|
|
440
440
|
from hikyuu.cpp.core39 import TransRecord
|
|
441
441
|
from hikyuu.cpp.core39 import UPNDAY
|
|
442
|
+
from hikyuu.cpp.core39 import UTCOffset
|
|
442
443
|
from hikyuu.cpp.core39 import VAR
|
|
443
444
|
from hikyuu.cpp.core39 import VARP
|
|
444
445
|
from hikyuu.cpp.core39 import VIGOR
|
|
445
446
|
from hikyuu.cpp.core39 import WEAVE
|
|
446
447
|
from hikyuu.cpp.core39 import WEEK
|
|
447
448
|
from hikyuu.cpp.core39 import WINNER
|
|
449
|
+
from hikyuu.cpp.core39 import WITHDAY
|
|
450
|
+
from hikyuu.cpp.core39 import WITHHALFYEAR
|
|
451
|
+
from hikyuu.cpp.core39 import WITHHOUR
|
|
452
|
+
from hikyuu.cpp.core39 import WITHHOUR2
|
|
453
|
+
from hikyuu.cpp.core39 import WITHHOUR4
|
|
454
|
+
from hikyuu.cpp.core39 import WITHKTYPE
|
|
455
|
+
from hikyuu.cpp.core39 import WITHMIN
|
|
456
|
+
from hikyuu.cpp.core39 import WITHMIN15
|
|
457
|
+
from hikyuu.cpp.core39 import WITHMIN30
|
|
458
|
+
from hikyuu.cpp.core39 import WITHMIN5
|
|
459
|
+
from hikyuu.cpp.core39 import WITHMIN60
|
|
460
|
+
from hikyuu.cpp.core39 import WITHMONTH
|
|
461
|
+
from hikyuu.cpp.core39 import WITHQUARTER
|
|
462
|
+
from hikyuu.cpp.core39 import WITHWEEK
|
|
463
|
+
from hikyuu.cpp.core39 import WITHYEAR
|
|
448
464
|
from hikyuu.cpp.core39 import WMA
|
|
449
465
|
from hikyuu.cpp.core39 import YEAR
|
|
450
466
|
from hikyuu.cpp.core39 import ZHBOND10
|
|
@@ -484,6 +500,7 @@ from hikyuu.cpp.core39 import hikyuu_init
|
|
|
484
500
|
from hikyuu.cpp.core39 import inner_analysis_sys_list
|
|
485
501
|
from hikyuu.cpp.core39 import inner_combinate_ind_analysis
|
|
486
502
|
from hikyuu.cpp.core39 import inner_combinate_ind_analysis_with_block
|
|
503
|
+
from hikyuu.cpp.core39 import is_valid_license
|
|
487
504
|
from hikyuu.cpp.core39 import isinf
|
|
488
505
|
from hikyuu.cpp.core39 import isnan
|
|
489
506
|
from hikyuu.cpp.core39 import open_ostream_to_python
|
|
@@ -554,8 +571,8 @@ from hikyuu.util.mylog import class_logger
|
|
|
554
571
|
from hikyuu.util.mylog import hku_benchmark
|
|
555
572
|
from hikyuu.util.mylog import hku_debug
|
|
556
573
|
from hikyuu.util.mylog import hku_debug as hku_trace
|
|
557
|
-
from hikyuu.util.mylog import hku_debug_if as hku_trace_if
|
|
558
574
|
from hikyuu.util.mylog import hku_debug_if
|
|
575
|
+
from hikyuu.util.mylog import hku_debug_if as hku_trace_if
|
|
559
576
|
from hikyuu.util.mylog import hku_error
|
|
560
577
|
from hikyuu.util.mylog import hku_error_if
|
|
561
578
|
from hikyuu.util.mylog import hku_fatal
|
|
@@ -583,7 +600,7 @@ from . import broker
|
|
|
583
600
|
from . import broker_easytrader
|
|
584
601
|
from . import broker_mail
|
|
585
602
|
from . import trade
|
|
586
|
-
__all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'AMO', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', 'BARSSINCEN', 'BASE_DIR', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CAPITAL', 'CEILING', 'CLOSE', 'CN_Bool', 'CN_OPLine', 'CONST', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EasyTraderOrderBroker', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'HHV', 'HHVBARS', 'HIGH', 'HKUCheckError', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'IF', 'INBLOCK', 'INDEXA', 'INDEXADV', 'INDEXC', 'INDEXDEC', 'INDEXH', 'INDEXL', 'INDEXO', 'INDEXV', 'INFO', 'INSUM', 'INTPART', 'IR', 'ISINF', 'ISINFA', 'ISLASTBAR', 'ISNA', 'IndParam', 'Indicator', 'IndicatorImp', 'JUMPDOWN', 'JUMPUP', 'KALMAN', 'KDATA', 'KDATA_PART', 'KDJ', 'KData', 'KDataDriver', 'KDataToHdf5Importer', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LOW', 'LoanRecord', 'LoggingContext', 'MA', 'MACD', 'MAX', '
|
|
603
|
+
__all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'AMO', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSLASTCOUNT', 'BARSSINCE', 'BARSSINCEN', 'BASE_DIR', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CAPITAL', 'CEILING', 'CLOSE', 'CN_Bool', 'CN_OPLine', 'CONST', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EasyTraderOrderBroker', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'HHV', 'HHVBARS', 'HIGH', 'HKUCheckError', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'IF', 'INBLOCK', 'INDEXA', 'INDEXADV', 'INDEXC', 'INDEXDEC', 'INDEXH', 'INDEXL', 'INDEXO', 'INDEXV', 'INFO', 'INSUM', 'INTPART', 'IR', 'ISINF', 'ISINFA', 'ISLASTBAR', 'ISNA', 'IndParam', 'Indicator', 'IndicatorImp', 'JUMPDOWN', 'JUMPUP', 'KALMAN', 'KDATA', 'KDATA_PART', 'KDJ', 'KData', 'KDataDriver', 'KDataToHdf5Importer', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LOW', 'LoanRecord', 'LoggingContext', 'MA', 'MACD', 'MAX', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MailOrderBroker', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'NDAY', 'NOT', 'OFF', 'OPEN', 'OrderBrokerBase', 'OrderBrokerWrap', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Path', 'Performance', 'Performance_to_df', 'Portfolio', 'PositionList_to_df', 'PositionList_to_np', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RANK', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_EvaluateOptimal', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STD', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', 'Seconds', 'SelectorBase', 'SignalBase', 'SlippageBase', 'SpotRecord', 'Stock', 'StockManager', 'StockTypeInfo', 'StockWeight', 'StockWeightList', 'StoplossBase', 'Strategy', 'StrategyContext', 'System', 'SystemPart', 'SystemWeight', 'SystemWeightList', 'TAN', 'TA_ACCBANDS', 'TA_ACOS', 'TA_AD', 'TA_ADD', 'TA_ADOSC', 'TA_ADX', 'TA_ADXR', 'TA_APO', 'TA_AROON', 'TA_AROONOSC', 'TA_ASIN', 'TA_ATAN', 'TA_ATR', 'TA_AVGDEV', 'TA_AVGPRICE', 'TA_BBANDS', 'TA_BETA', 'TA_BOP', 'TA_CCI', 'TA_CDL2CROWS', 'TA_CDL3BLACKCROWS', 'TA_CDL3INSIDE', 'TA_CDL3LINESTRIKE', 'TA_CDL3OUTSIDE', 'TA_CDL3STARSINSOUTH', 'TA_CDL3WHITESOLDIERS', 'TA_CDLABANDONEDBABY', 'TA_CDLADVANCEBLOCK', 'TA_CDLBELTHOLD', 'TA_CDLBREAKAWAY', 'TA_CDLCLOSINGMARUBOZU', 'TA_CDLCONCEALBABYSWALL', 'TA_CDLCOUNTERATTACK', 'TA_CDLDARKCLOUDCOVER', 'TA_CDLDOJI', 'TA_CDLDOJISTAR', 'TA_CDLDRAGONFLYDOJI', 'TA_CDLENGULFING', 'TA_CDLEVENINGDOJISTAR', 'TA_CDLEVENINGSTAR', 'TA_CDLGAPSIDESIDEWHITE', 'TA_CDLGRAVESTONEDOJI', 'TA_CDLHAMMER', 'TA_CDLHANGINGMAN', 'TA_CDLHARAMI', 'TA_CDLHARAMICROSS', 'TA_CDLHIGHWAVE', 'TA_CDLHIKKAKE', 'TA_CDLHIKKAKEMOD', 'TA_CDLHOMINGPIGEON', 'TA_CDLIDENTICAL3CROWS', 'TA_CDLINNECK', 'TA_CDLINVERTEDHAMMER', 'TA_CDLKICKING', 'TA_CDLKICKINGBYLENGTH', 'TA_CDLLADDERBOTTOM', 'TA_CDLLONGLEGGEDDOJI', 'TA_CDLLONGLINE', 'TA_CDLMARUBOZU', 'TA_CDLMATCHINGLOW', 'TA_CDLMATHOLD', 'TA_CDLMORNINGDOJISTAR', 'TA_CDLMORNINGSTAR', 'TA_CDLONNECK', 'TA_CDLPIERCING', 'TA_CDLRICKSHAWMAN', 'TA_CDLRISEFALL3METHODS', 'TA_CDLSEPARATINGLINES', 'TA_CDLSHOOTINGSTAR', 'TA_CDLSHORTLINE', 'TA_CDLSPINNINGTOP', 'TA_CDLSTALLEDPATTERN', 'TA_CDLSTICKSANDWICH', 'TA_CDLTAKURI', 'TA_CDLTASUKIGAP', 'TA_CDLTHRUSTING', 'TA_CDLTRISTAR', 'TA_CDLUNIQUE3RIVER', 'TA_CDLUPSIDEGAP2CROWS', 'TA_CDLXSIDEGAP3METHODS', 'TA_CEIL', 'TA_CMO', 'TA_CORREL', 'TA_COS', 'TA_COSH', 'TA_DEMA', 'TA_DIV', 'TA_DX', 'TA_EMA', 'TA_EXP', 'TA_FLOOR', 'TA_HT_DCPERIOD', 'TA_HT_DCPHASE', 'TA_HT_PHASOR', 'TA_HT_SINE', 'TA_HT_TRENDLINE', 'TA_HT_TRENDMODE', 'TA_IMI', 'TA_KAMA', 'TA_LINEARREG', 'TA_LINEARREG_ANGLE', 'TA_LINEARREG_INTERCEPT', 'TA_LINEARREG_SLOPE', 'TA_LN', 'TA_LOG10', 'TA_MA', 'TA_MACD', 'TA_MACDEXT', 'TA_MACDFIX', 'TA_MAMA', 'TA_MAVP', 'TA_MAX', 'TA_MAXINDEX', 'TA_MEDPRICE', 'TA_MFI', 'TA_MIDPOINT', 'TA_MIDPRICE', 'TA_MIN', 'TA_MININDEX', 'TA_MINMAX', 'TA_MINMAXINDEX', 'TA_MINUS_DI', 'TA_MINUS_DM', 'TA_MOM', 'TA_MULT', 'TA_NATR', 'TA_OBV', 'TA_PLUS_DI', 'TA_PLUS_DM', 'TA_PPO', 'TA_ROC', 'TA_ROCP', 'TA_ROCR', 'TA_ROCR100', 'TA_RSI', 'TA_SAR', 'TA_SAREXT', 'TA_SIN', 'TA_SINH', 'TA_SMA', 'TA_SQRT', 'TA_STDDEV', 'TA_STOCH', 'TA_STOCHF', 'TA_STOCHRSI', 'TA_SUB', 'TA_SUM', 'TA_T3', 'TA_TAN', 'TA_TANH', 'TA_TEMA', 'TA_TRANGE', 'TA_TRIMA', 'TA_TRIX', 'TA_TSF', 'TA_TYPPRICE', 'TA_ULTOSC', 'TA_VAR', 'TA_WCLPRICE', 'TA_WILLR', 'TA_WMA', 'TC_FixedA', 'TC_FixedA2015', 'TC_FixedA2017', 'TC_TestStub', 'TC_Zero', 'TIME', 'TIMELINE', 'TIMELINEVOL', 'TR', 'TRACE', 'TURNOVER', 'TestOrderBroker', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TimeLine_to_df', 'TimeLine_to_np', 'TradeCostBase', 'TradeList_to_df', 'TradeList_to_np', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransList_to_df', 'TransList_to_np', 'TransRecord', 'UPNDAY', 'UTCOffset', 'VALUE', 'VAR', 'VARP', 'VIGOR', 'VOL', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WITHDAY', 'WITHHALFYEAR', 'WITHHOUR', 'WITHHOUR2', 'WITHHOUR4', 'WITHKTYPE', 'WITHMIN', 'WITHMIN15', 'WITHMIN30', 'WITHMIN5', 'WITHMIN60', 'WITHMONTH', 'WITHQUARTER', 'WITHWEEK', 'WITHYEAR', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'active_device', 'add_class_logger_handler', 'backtest', 'batch_calculate_inds', 'broker', 'broker_easytrader', 'broker_mail', 'can_upgrade', 'capture_multiprocess_all_logger', 'class_logger', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_index', 'concat_to_df', 'constant', 'core', 'cpp', 'crtBrokerTM', 'crtOB', 'crtSEOptimal', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'current_path', 'date', 'datetime', 'df_to_ind', 'dll_directory', 'extend', 'fetch_trial_license', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_data_from_buffer_server', 'get_date_range', 'get_kdata', 'get_last_version', 'get_log_level', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'hikyuu_init', 'hku_benchmark', 'hku_catch', 'hku_check', 'hku_check_ignore', 'hku_check_throw', 'hku_debug', 'hku_debug_if', 'hku_error', 'hku_error_if', 'hku_fatal', 'hku_fatal_if', 'hku_info', 'hku_info_if', 'hku_logger', 'hku_to_async', 'hku_trace', 'hku_trace_if', 'hku_warn', 'hku_warn_if', 'in_interactive_session', 'in_ipython_frontend', 'indicator', 'indicator_getitem', 'indicator_iter', 'indicator_to_df', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'is_valid_license', 'isinf', 'isnan', 'list_getitem', 'new_Query_init', 'new_path', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'os', 'pd', 'pickle', 'pyind', 'remove_license', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'set_log_level', 'set_my_logger_file', 'set_python_in_interactive', 'set_python_in_jupyter', 'spend_time', 'start_data_server', 'start_spot_agent', 'stop_data_server', 'stop_spot_agent', 'sys', 'talib_wrap', 'timedelta', 'timeout', 'toPriceList', 'traceback', 'trade', 'util', 'view_license', 'with_trace']
|
|
587
604
|
AMO: hikyuu.cpp.core39.Indicator # value = Indicator{...
|
|
588
605
|
BASE_DIR: str = 'D:\\workspace\\hikyuu\\hikyuu'
|
|
589
606
|
CLOSE: hikyuu.cpp.core39.Indicator # value = Indicator{...
|
|
@@ -594,8 +611,6 @@ HIGH: hikyuu.cpp.core39.Indicator # value = Indicator{...
|
|
|
594
611
|
INFO: hikyuu.cpp.core39.LOG_LEVEL # value = <LOG_LEVEL.INFO: 2>
|
|
595
612
|
KDATA: hikyuu.cpp.core39.Indicator # value = Indicator{...
|
|
596
613
|
LOW: hikyuu.cpp.core39.Indicator # value = Indicator{...
|
|
597
|
-
MAXYEAR: int = 9999
|
|
598
|
-
MINYEAR: int = 1
|
|
599
614
|
OFF: hikyuu.cpp.core39.LOG_LEVEL # value = <LOG_LEVEL.OFF: 6>
|
|
600
615
|
OPEN: hikyuu.cpp.core39.Indicator # value = Indicator{...
|
|
601
616
|
TRACE: hikyuu.cpp.core39.LOG_LEVEL # value = <LOG_LEVEL.TRACE: 0>
|