hikyuu 2.2.3__py3-none-win_amd64.whl → 2.3.0__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/cpp/boost_date_time-mt.dll +0 -0
- hikyuu/cpp/boost_serialization-mt.dll +0 -0
- hikyuu/cpp/boost_wserialization-mt.dll +0 -0
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core38.pyd +0 -0
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/data/mysql_upgrade/0024.sql +2 -0
- hikyuu/draw/__init__.py +12 -6
- hikyuu/draw/drawplot/__init__.py +7 -1
- hikyuu/draw/drawplot/icon/1.png +0 -0
- hikyuu/draw/drawplot/icon/10.png +0 -0
- hikyuu/draw/drawplot/icon/11.png +0 -0
- hikyuu/draw/drawplot/icon/12.png +0 -0
- hikyuu/draw/drawplot/icon/13.png +0 -0
- hikyuu/draw/drawplot/icon/14.png +0 -0
- hikyuu/draw/drawplot/icon/15.png +0 -0
- hikyuu/draw/drawplot/icon/16.png +0 -0
- hikyuu/draw/drawplot/icon/17.png +0 -0
- hikyuu/draw/drawplot/icon/18.png +0 -0
- hikyuu/draw/drawplot/icon/19.png +0 -0
- hikyuu/draw/drawplot/icon/2.png +0 -0
- hikyuu/draw/drawplot/icon/20.png +0 -0
- hikyuu/draw/drawplot/icon/21.png +0 -0
- hikyuu/draw/drawplot/icon/22.png +0 -0
- hikyuu/draw/drawplot/icon/23.png +0 -0
- hikyuu/draw/drawplot/icon/24.png +0 -0
- hikyuu/draw/drawplot/icon/25.png +0 -0
- hikyuu/draw/drawplot/icon/26.png +0 -0
- hikyuu/draw/drawplot/icon/27.png +0 -0
- hikyuu/draw/drawplot/icon/28.png +0 -0
- hikyuu/draw/drawplot/icon/29.png +0 -0
- hikyuu/draw/drawplot/icon/3.png +0 -0
- hikyuu/draw/drawplot/icon/30.png +0 -0
- hikyuu/draw/drawplot/icon/31.png +0 -0
- hikyuu/draw/drawplot/icon/32.png +0 -0
- hikyuu/draw/drawplot/icon/33.png +0 -0
- hikyuu/draw/drawplot/icon/34.png +0 -0
- hikyuu/draw/drawplot/icon/35.png +0 -0
- hikyuu/draw/drawplot/icon/36.png +0 -0
- hikyuu/draw/drawplot/icon/37.png +0 -0
- hikyuu/draw/drawplot/icon/38.png +0 -0
- hikyuu/draw/drawplot/icon/39.png +0 -0
- hikyuu/draw/drawplot/icon/4.png +0 -0
- hikyuu/draw/drawplot/icon/40.png +0 -0
- hikyuu/draw/drawplot/icon/41.png +0 -0
- hikyuu/draw/drawplot/icon/42.png +0 -0
- hikyuu/draw/drawplot/icon/43.png +0 -0
- hikyuu/draw/drawplot/icon/44.png +0 -0
- hikyuu/draw/drawplot/icon/45.png +0 -0
- hikyuu/draw/drawplot/icon/46.png +0 -0
- hikyuu/draw/drawplot/icon/47.png +0 -0
- hikyuu/draw/drawplot/icon/48.png +0 -0
- hikyuu/draw/drawplot/icon/49.png +0 -0
- hikyuu/draw/drawplot/icon/5.png +0 -0
- hikyuu/draw/drawplot/icon/6.png +0 -0
- hikyuu/draw/drawplot/icon/7.png +0 -0
- hikyuu/draw/drawplot/icon/8.png +0 -0
- hikyuu/draw/drawplot/icon/9.png +0 -0
- hikyuu/draw/drawplot/icon/__init__.py +0 -0
- hikyuu/draw/drawplot/matplotlib_draw.py +553 -4
- hikyuu/examples/notebook/Demo/Demo1.ipynb +85 -84
- hikyuu/gui/HikyuuTDX.py +19 -16
- hikyuu/gui/data/MainWindow.py +14 -11
- hikyuu/gui/hikyuu_small.png +0 -0
- hikyuu/hub.py +4 -4
- hikyuu/include/hikyuu/DataType.h +3 -1
- hikyuu/include/hikyuu/StockManager.h +10 -0
- hikyuu/include/hikyuu/config.h +3 -0
- hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +15 -1
- hikyuu/include/hikyuu/data_driver/block_info/mysql/MySQLBlockInfoDriver.h +8 -1
- hikyuu/include/hikyuu/data_driver/block_info/qianlong/QLBlockInfoDriver.h +3 -1
- hikyuu/include/hikyuu/data_driver/block_info/sqlite/SQLiteBlockInfoDriver.h +8 -1
- hikyuu/include/hikyuu/indicator/Indicator.h +4 -4
- hikyuu/include/hikyuu/indicator/IndicatorImp.h +11 -8
- hikyuu/include/hikyuu/indicator/build_in.h +3 -0
- hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +30 -0
- hikyuu/include/hikyuu/indicator/crt/CORR.h +1 -1
- hikyuu/include/hikyuu/indicator/crt/ISLASTBAR.h +30 -0
- hikyuu/include/hikyuu/indicator/crt/SPEARMAN.h +2 -2
- hikyuu/include/hikyuu/indicator/crt/WMA.h +46 -0
- hikyuu/include/hikyuu/indicator/imp/IContext.h +44 -0
- hikyuu/include/hikyuu/indicator/imp/ICorr.h +0 -1
- hikyuu/include/hikyuu/indicator/imp/IIsLastBar.h +27 -0
- hikyuu/include/hikyuu/indicator/imp/ISpearman.h +0 -1
- hikyuu/include/hikyuu/indicator/imp/IWma.h +30 -0
- hikyuu/include/hikyuu/indicator_talib/__init__.py +1 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaAdosc.h +26 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaApo.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaBbands.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaMa.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaMacd.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaMacdext.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaMama.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaMavp.h +41 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaPpo.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaSar.h +26 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaSarext.h +31 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaStddev.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaStoch.h +27 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaStochf.h +26 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaStochrsi.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaT3.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaUltosc.h +26 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaVar.h +24 -0
- hikyuu/include/hikyuu/indicator_talib/imp/__init__.py +1 -0
- hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +288 -0
- hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +1364 -0
- hikyuu/include/hikyuu/indicator_talib/ta_crt.h +320 -0
- hikyuu/include/hikyuu/trade_manage/OrderBrokerBase.h +25 -0
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +0 -4
- hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/PerformanceOptimalSelector.h +1 -1
- hikyuu/include/hikyuu/utilities/Null.h +33 -0
- hikyuu/include/hikyuu/utilities/Parameter.h +9 -9
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +1 -0
- hikyuu/include/hikyuu/version.h +5 -5
- hikyuu/indicator/talib_wrap.py +424 -415
- hikyuu/test/Datetime.py +12 -12
- hikyuu/test/Indicator.py +36 -36
- hikyuu/test/KData.py +11 -11
- hikyuu/test/Stock.py +10 -10
- {hikyuu-2.2.3.dist-info → hikyuu-2.3.0.dist-info}/METADATA +26 -3
- {hikyuu-2.2.3.dist-info → hikyuu-2.3.0.dist-info}/RECORD +131 -52
- {hikyuu-2.2.3.dist-info → hikyuu-2.3.0.dist-info}/top_level.txt +3 -0
- hikyuu/sqlite3.dll +0 -0
- hikyuu/vcruntime140.dll +0 -0
- hikyuu/vcruntime140_1.dll +0 -0
- {hikyuu-2.2.3.dist-info → hikyuu-2.3.0.dist-info}/LICENSE +0 -0
- {hikyuu-2.2.3.dist-info → hikyuu-2.3.0.dist-info}/WHEEL +0 -0
- {hikyuu-2.2.3.dist-info → hikyuu-2.3.0.dist-info}/entry_points.txt +0 -0
hikyuu/test/Datetime.py
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# -*- coding: utf8 -*-
|
|
3
3
|
# cp936
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# ===============================================================================
|
|
6
6
|
# 作者:fasiondog
|
|
7
7
|
# 历史:1)20120927, Added by fasiondog
|
|
8
|
-
|
|
8
|
+
# ===============================================================================
|
|
9
9
|
|
|
10
10
|
import unittest
|
|
11
11
|
|
|
@@ -24,16 +24,16 @@ class DatetimeTest(unittest.TestCase):
|
|
|
24
24
|
self.assertEqual(Datetime(140001010000), Datetime.min())
|
|
25
25
|
self.assertEqual(Datetime(999912310000), Datetime.max())
|
|
26
26
|
|
|
27
|
-
self.
|
|
28
|
-
self.
|
|
29
|
-
self.
|
|
30
|
-
self.
|
|
31
|
-
self.
|
|
32
|
-
self.
|
|
33
|
-
self.
|
|
34
|
-
self.
|
|
35
|
-
self.
|
|
36
|
-
self.
|
|
27
|
+
self.assertEqual(d, Datetime(201209272301))
|
|
28
|
+
self.assertNotEqual(d, Datetime(200101010000))
|
|
29
|
+
self.assertGreaterEqual(d, Datetime(201209272301))
|
|
30
|
+
self.assertTrue(d >= Datetime(201209272259))
|
|
31
|
+
self.assertTrue(d <= Datetime(201209272301))
|
|
32
|
+
self.assertTrue(d <= Datetime(201209272302))
|
|
33
|
+
self.assertTrue(not (d > Datetime(201209272301)))
|
|
34
|
+
self.assertTrue(d > Datetime(201209272259))
|
|
35
|
+
self.assertTrue(not (d < Datetime(201209272301)))
|
|
36
|
+
self.assertTrue(d < Datetime(201209272302))
|
|
37
37
|
|
|
38
38
|
d = Datetime(200101010159)
|
|
39
39
|
self.assertEqual(str(d), "2001-01-01 01:59:00")
|
hikyuu/test/Indicator.py
CHANGED
|
@@ -48,10 +48,10 @@ class IndicatorTest(unittest.TestCase):
|
|
|
48
48
|
self.assertEqual(m.name, "AddIndicator")
|
|
49
49
|
self.assertEqual(len(m), 4)
|
|
50
50
|
self.assertEqual(m.empty(), False)
|
|
51
|
-
self.
|
|
52
|
-
self.
|
|
53
|
-
self.
|
|
54
|
-
self.
|
|
51
|
+
self.assertTrue(abs(m[0] - 1) < 0.0001)
|
|
52
|
+
self.assertTrue(abs(m[1] - 2) < 0.0001)
|
|
53
|
+
self.assertTrue(abs(m[2] - 3) < 0.0001)
|
|
54
|
+
self.assertTrue(abs(m[3] - 4) < 0.0001)
|
|
55
55
|
|
|
56
56
|
b = toPriceList([1, 2, 3, 4])
|
|
57
57
|
x = PRICELIST(b)
|
|
@@ -59,10 +59,10 @@ class IndicatorTest(unittest.TestCase):
|
|
|
59
59
|
m = m(x)
|
|
60
60
|
self.assertEqual(len(m), 4)
|
|
61
61
|
self.assertEqual(m.empty(), False)
|
|
62
|
-
self.
|
|
63
|
-
self.
|
|
64
|
-
self.
|
|
65
|
-
self.
|
|
62
|
+
self.assertTrue(abs(m[0] - 2) < 0.0001)
|
|
63
|
+
self.assertTrue(abs(m[1] - 3) < 0.0001)
|
|
64
|
+
self.assertTrue(abs(m[2] - 4) < 0.0001)
|
|
65
|
+
self.assertTrue(abs(m[3] - 5) < 0.0001)
|
|
66
66
|
|
|
67
67
|
def test_operator(self):
|
|
68
68
|
a = toPriceList([0, 1, 2, 3, 5])
|
|
@@ -76,16 +76,16 @@ class IndicatorTest(unittest.TestCase):
|
|
|
76
76
|
self.assertEqual(a[3], 7)
|
|
77
77
|
|
|
78
78
|
a = x1 + 1.1
|
|
79
|
-
self.
|
|
80
|
-
self.
|
|
81
|
-
self.
|
|
82
|
-
self.
|
|
79
|
+
self.assertTrue(abs(a[0] - 1.1) < 0.0001)
|
|
80
|
+
self.assertTrue(abs(a[1] - 2.1) < 0.0001)
|
|
81
|
+
self.assertTrue(abs(a[2] - 3.1) < 0.0001)
|
|
82
|
+
self.assertTrue(abs(a[3] - 4.1) < 0.0001)
|
|
83
83
|
|
|
84
84
|
a = 2.1 + x1
|
|
85
|
-
self.
|
|
86
|
-
self.
|
|
87
|
-
self.
|
|
88
|
-
self.
|
|
85
|
+
self.assertTrue(abs(a[0] - 2.1) < 0.0001)
|
|
86
|
+
self.assertTrue(abs(a[1] - 3.1) < 0.0001)
|
|
87
|
+
self.assertTrue(abs(a[2] - 4.1) < 0.0001)
|
|
88
|
+
self.assertTrue(abs(a[3] - 5.1) < 0.0001)
|
|
89
89
|
|
|
90
90
|
a = x2 - x1
|
|
91
91
|
self.assertEqual(a[0], 1)
|
|
@@ -124,10 +124,10 @@ class IndicatorTest(unittest.TestCase):
|
|
|
124
124
|
self.assertEqual(a[3], 6)
|
|
125
125
|
|
|
126
126
|
a = x2 / x1
|
|
127
|
-
self.
|
|
127
|
+
self.assertTrue(isinf(a[0]))
|
|
128
128
|
self.assertEqual(a[1], 2)
|
|
129
129
|
self.assertEqual(a[2], 1.5)
|
|
130
|
-
self.
|
|
130
|
+
self.assertTrue(abs(a[3] - 4.0 / 3.0) < 0.0001)
|
|
131
131
|
|
|
132
132
|
a = x1 / 0.5
|
|
133
133
|
self.assertEqual(a[0], 0)
|
|
@@ -136,10 +136,10 @@ class IndicatorTest(unittest.TestCase):
|
|
|
136
136
|
self.assertEqual(a[3], 6)
|
|
137
137
|
|
|
138
138
|
a = 2. / x1
|
|
139
|
-
self.
|
|
139
|
+
self.assertTrue(isinf(a[0]))
|
|
140
140
|
self.assertEqual(a[1], 2.0)
|
|
141
141
|
self.assertEqual(a[2], 1.)
|
|
142
|
-
self.
|
|
142
|
+
self.assertTrue(abs(a[3] - 2.0/3.0) < 0.0001)
|
|
143
143
|
|
|
144
144
|
a = x1 > x2
|
|
145
145
|
self.assertEqual(a[0], 0 > 1)
|
|
@@ -180,19 +180,19 @@ class IndicatorTest(unittest.TestCase):
|
|
|
180
180
|
self.assertEqual(a.empty(), False)
|
|
181
181
|
self.assertEqual(v.empty(), False)
|
|
182
182
|
|
|
183
|
-
self.
|
|
184
|
-
self.
|
|
185
|
-
self.
|
|
186
|
-
self.
|
|
187
|
-
self.
|
|
188
|
-
self.
|
|
183
|
+
self.assertTrue(abs(o[0] - 96.05) < 0.0001)
|
|
184
|
+
self.assertTrue(abs(h[0] - 99.98) < 0.0001)
|
|
185
|
+
self.assertTrue(abs(l[0] - 95.79) < 0.0001)
|
|
186
|
+
self.assertTrue(abs(c[0] - 99.98) < 0.0001)
|
|
187
|
+
self.assertTrue(abs(a[0] - 49.4) < 0.0001)
|
|
188
|
+
self.assertTrue(abs(v[0] - 1260) < 0.0001)
|
|
189
189
|
|
|
190
|
-
self.
|
|
191
|
-
self.
|
|
192
|
-
self.
|
|
193
|
-
self.
|
|
194
|
-
self.
|
|
195
|
-
self.
|
|
190
|
+
self.assertTrue(abs(o[1] - 104.3) < 0.0001)
|
|
191
|
+
self.assertTrue(abs(h[1] - 104.39) < 0.0001)
|
|
192
|
+
self.assertTrue(abs(l[1] - 99.98) < 0.0001)
|
|
193
|
+
self.assertTrue(abs(c[1] - 104.39) < 0.0001)
|
|
194
|
+
self.assertTrue(abs(a[1] - 8.4) < 0.0001)
|
|
195
|
+
self.assertTrue(abs(v[1] - 197) < 0.0001)
|
|
196
196
|
|
|
197
197
|
def test_MA(self):
|
|
198
198
|
a = toPriceList([0, 1, 2, 3])
|
|
@@ -200,10 +200,10 @@ class IndicatorTest(unittest.TestCase):
|
|
|
200
200
|
m = MA(x, 2)
|
|
201
201
|
self.assertEqual(len(m), 4)
|
|
202
202
|
self.assertEqual(m.discard, 0)
|
|
203
|
-
self.
|
|
204
|
-
self.
|
|
205
|
-
self.
|
|
206
|
-
self.
|
|
203
|
+
self.assertTrue(abs(m[0] - 0.0) < 0.0001)
|
|
204
|
+
self.assertTrue(abs(m[1] - 0.5) < 0.0001)
|
|
205
|
+
self.assertTrue(abs(m[2] - 1.5) < 0.0001)
|
|
206
|
+
self.assertTrue(abs(m[3] - 2.5) < 0.0001)
|
|
207
207
|
|
|
208
208
|
def test_pickle(self):
|
|
209
209
|
if not constant.pickle_support:
|
hikyuu/test/KData.py
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# -*- coding: utf8 -*-
|
|
3
3
|
# gb18030
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# ===============================================================================
|
|
6
6
|
# 作者:fasiondog
|
|
7
7
|
# 历史:1)20130220, Added by fasiondog
|
|
8
|
-
|
|
8
|
+
# ===============================================================================
|
|
9
9
|
|
|
10
10
|
import unittest
|
|
11
11
|
|
|
@@ -33,14 +33,14 @@ class KDataTest(unittest.TestCase):
|
|
|
33
33
|
self.assertEqual(k.end_pos, 10)
|
|
34
34
|
self.assertEqual(k.last_pos, 9)
|
|
35
35
|
self.assertEqual(k[0].datetime, Datetime(199012190000))
|
|
36
|
-
self.
|
|
37
|
-
self.
|
|
38
|
-
self.
|
|
39
|
-
self.
|
|
40
|
-
self.
|
|
41
|
-
self.
|
|
42
|
-
self.
|
|
43
|
-
self.
|
|
36
|
+
self.assertTrue(abs(k[0].open - 96.05) < 0.0001)
|
|
37
|
+
self.assertTrue(abs(k[0].high - 99.980) < 0.0001)
|
|
38
|
+
self.assertTrue(abs(k[0].low - 95.79) < 0.0001)
|
|
39
|
+
self.assertTrue(abs(k[0].close - 99.98) < 0.0001)
|
|
40
|
+
self.assertTrue(abs(k[0].amount - 49.4) < 0.0001)
|
|
41
|
+
self.assertTrue(abs(k[0].volume - 1260) < 0.0001)
|
|
42
|
+
self.assertTrue(abs(k[1].open - 104.3) < 0.0001)
|
|
43
|
+
self.assertTrue(abs(k[9].open - 127.61) < 0.0001)
|
|
44
44
|
|
|
45
45
|
def test_pickle(self):
|
|
46
46
|
if not constant.pickle_support:
|
|
@@ -61,4 +61,4 @@ class KDataTest(unittest.TestCase):
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
def suite():
|
|
64
|
-
return unittest.TestLoader().loadTestsFromTestCase(KDataTest)
|
|
64
|
+
return unittest.TestLoader().loadTestsFromTestCase(KDataTest)
|
hikyuu/test/Stock.py
CHANGED
|
@@ -36,12 +36,12 @@ class StockTest(unittest.TestCase):
|
|
|
36
36
|
|
|
37
37
|
s1 = sm['sh000001']
|
|
38
38
|
s2 = sm['sh000001']
|
|
39
|
-
self.
|
|
40
|
-
self.
|
|
39
|
+
self.assertTrue(s1 == s2)
|
|
40
|
+
self.assertTrue(not (s1 != s2))
|
|
41
41
|
|
|
42
42
|
s2 = sm['sz000001']
|
|
43
|
-
self.
|
|
44
|
-
self.
|
|
43
|
+
self.assertTrue(not (s1 == s2))
|
|
44
|
+
self.assertTrue(s1 != s2)
|
|
45
45
|
|
|
46
46
|
def test_pickle(self):
|
|
47
47
|
if not constant.pickle_support:
|
|
@@ -79,7 +79,7 @@ class StockTest(unittest.TestCase):
|
|
|
79
79
|
|
|
80
80
|
self.assertEqual(stk.valid, False)
|
|
81
81
|
stk.valid = True
|
|
82
|
-
self.
|
|
82
|
+
self.assertTrue(stk.valid)
|
|
83
83
|
|
|
84
84
|
self.assertNotEqual(stk.type, constant.STOCKTYPE_A)
|
|
85
85
|
stk.type = constant.STOCKTYPE_A
|
|
@@ -113,14 +113,14 @@ class StockTest(unittest.TestCase):
|
|
|
113
113
|
self.assertEqual(len(k), 1)
|
|
114
114
|
self.assertEqual(k[0], KRecord(Datetime(20010101), 5.0, 9.0, 4.0, 6.5, 1000.0, 100000.0))
|
|
115
115
|
|
|
116
|
-
self.
|
|
116
|
+
self.assertTrue(stk not in sm)
|
|
117
117
|
sm.add_stock(stk)
|
|
118
|
-
self.
|
|
118
|
+
self.assertTrue(stk in sm)
|
|
119
119
|
stk2 = sm['ab000001']
|
|
120
|
-
self.
|
|
121
|
-
self.
|
|
120
|
+
self.assertTrue(not stk2.is_null())
|
|
121
|
+
self.assertTrue(stk2, stk)
|
|
122
122
|
sm.remove_stock("ab000001")
|
|
123
|
-
self.
|
|
123
|
+
self.assertTrue(stk not in sm)
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
def suite():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hikyuu
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Hikyuu Quant Framework for System Trading Analysis and backtester
|
|
5
5
|
Home-page: http://hikyuu.org/
|
|
6
6
|
Author: fasiondog
|
|
@@ -16,6 +16,8 @@ Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
17
17
|
Classifier: License :: OSI Approved :: MIT License
|
|
18
18
|
Classifier: Operating System :: Microsoft :: Windows
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
19
21
|
Classifier: Programming Language :: Python :: 3
|
|
20
22
|
Classifier: Programming Language :: Python :: 3.8
|
|
21
23
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -53,7 +55,7 @@ Requires-Dist: tdqm
|
|
|
53
55
|
|
|
54
56
|
     
|
|
55
57
|
|
|
56
|
-
Hikyuu Quant Framework是一款基于C++/Python的开源量化交易研究框架,用于策略分析及回测(目前主要用于国内A
|
|
58
|
+
Hikyuu Quant Framework是一款基于C++/Python的开源量化交易研究框架,用于策略分析及回测(目前主要用于国内A股市场)。其核心思想基于当前成熟的系统化交易方法,将整个系统化交易抽象为由市场环境判断策略、系统有效条件、信号指示器、止损/止盈策略、资金管理策略、盈利目标策略、移滑价差算法等组件,你可以分别构建这些组件的策略资产库,在实际研究中对它们自由组合来观察系统的有效性、稳定性以及单一种类策略的效果。
|
|
57
59
|
|
|
58
60
|
👉 **项目地址:**
|
|
59
61
|
|
|
@@ -94,7 +96,7 @@ Hikyuu Quant Framework是一款基于C++/Python的开源量化交易研究框架
|
|
|
94
96
|
|
|
95
97
|
# 为什么选择 Hikyuu?
|
|
96
98
|
|
|
97
|
-
* **组合灵活,分类构建策略资产库** Hikyuu
|
|
99
|
+
* **组合灵活,分类构建策略资产库** Hikyuu对系统化交易方法进行了良好的抽象:市场环境判断策略、系统有效条件、信号指示器、止损/止盈策略、资金管理策略、盈利目标策略、移滑价差算法、交易对象选择策略、资金分配策略。可以在此基础上构建自己的策略库,并进行灵活的组合和测试。在进行策略探索时,可以更加专注于某一方面的策略性能与影响。其主要功能模块如下:
|
|
98
100
|
* **性能保障,打造自己的专属应用** 目前项目包含了3个主要组成部分:基于C++的核心库、对C++进行包装的Python库(hikyuu)、基于Python的交互式工具。
|
|
99
101
|
* AMD 7950x 实测:A股全市场(1913万日K线)仅加载全部日线计算 20日 MA 并求最后 MA 累积和,首次执行含数据加载 耗时 6秒,数据加载完毕后计算耗时 166 毫秒,详见: [性能实测](https://mp.weixin.qq.com/s?__biz=MzkwMzY1NzYxMA==&mid=2247483768&idx=1&sn=33e40aa9633857fa7b4c7ded51c95ae7&chksm=c093a09df7e4298b3f543121ba01334c0f8bf76e75c643afd6fc53aea1792ebb92de9a32c2be&mpshare=1&scene=23&srcid=05297ByHT6DEv6XAmyje1oOr&sharer_shareinfo=b38f5f91b4efd8fb60303a4ef4774748&sharer_shareinfo_first=b38f5f91b4efd8fb60303a4ef4774748#rd)
|
|
100
102
|
* C++核心库,提供了整体的策略框架,在保证性能的同时,已经考虑了对多线程和多核处理的支持,在未来追求更高运算速度提供便利。C++核心库,可以单独剥离使用,自行构建自己的客户端工具。
|
|
@@ -125,3 +127,24 @@ Hikyuu Quant Framework是一款基于C++/Python的开源量化交易研究框架
|
|
|
125
127
|
## QQ交流群:114910869, 或扫码加入
|
|
126
128
|
|
|
127
129
|

|
|
130
|
+
|
|
131
|
+
## 项目依赖说明
|
|
132
|
+
|
|
133
|
+
Hikyuu直接依赖以下开源项目(由以下项目间接依赖的项目未列出),感谢所有开源作者的贡献:
|
|
134
|
+
|
|
135
|
+
| 名称 | 项目地址 | License |
|
|
136
|
+
| ------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
137
|
+
| xmake | [https://github.com/xmake-io/xmake](https://github.com/xmake-io/xmake) | Apache 2.0 |
|
|
138
|
+
| hdf5 | [https://github.com/HDFGroup/hdf5](https://github.com/HDFGroup/hdf5) | [hdf5 license](https://github.com/HDFGroup/hdf5?tab=License-1-ov-file#License-1-ov-file) |
|
|
139
|
+
| mysql(client) | [https://github.com/mysql/mysql-server]() | [mysql license](https://github.com/mysql/mysql-server?tab=License-1-ov-file#readme) |
|
|
140
|
+
| fmt | [https://github.com/fmtlib/fmt](https://github.com/fmtlib/fmt) | [fmt license](https://github.com/fmtlib/fmt?tab=License-1-ov-file#readme) |
|
|
141
|
+
| spdlog | [https://github.com/gabime/spdlog](https://github.com/gabime/spdlog) | MIT |
|
|
142
|
+
| sqlite | [https://www.sqlite.org/](https://www.sqlite.org/) | [sqlite license](https://www.sqlite.org/copyright.html) |
|
|
143
|
+
| flatbuffers | [https://github.com/google/flatbuffers](https://github.com/google/flatbuffers) | Apache 2.0 |
|
|
144
|
+
| nng | [https://github.com/nanomsg/nng](https://github.com/nanomsg/nng) | MIT |
|
|
145
|
+
| nlohmann_json | [https://github.com/nlohmann/json](https://github.com/nlohmann/json) | MIT |
|
|
146
|
+
| boost | [https://www.boost.org/](https://www.boost.org/) | [Boost Software License](https://www.boost.org/users/license.html) |
|
|
147
|
+
| python | [https://www.python.org/](https://www.python.org/) | [Python license](https://docs.python.org/3/license.html) |
|
|
148
|
+
| pybind11 | [https://github.com/pybind/pybind11](https://github.com/pybind/pybind11) | [pybind11 license](https://github.com/pybind/pybind11?tab=License-1-ov-file#readme) |
|
|
149
|
+
| gzip-hpp | [https://github.com/mapbox/gzip-hpp](https://github.com/mapbox/gzip-hpp) | BSD-2-Clause license |
|
|
150
|
+
| doctest | [https://github.com/doctest/doctest](https://github.com/doctest/doctest) | MIT |
|