quant1x 0.2.1__tar.gz → 0.3.0__tar.gz

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.
Files changed (47) hide show
  1. {quant1x-0.2.1 → quant1x-0.3.0}/PKG-INFO +2 -2
  2. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/__init__.py +1 -2
  3. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/base/formula.py +1 -1
  4. quant1x-0.3.0/quant1x/data/futu-basicinfo.py +27 -0
  5. quant1x-0.3.0/quant1x/data/quotes.py +637 -0
  6. quant1x-0.3.0/quant1x/findpeaks/__init__.py +13 -0
  7. quant1x-0.3.0/quant1x/findpeaks/filters/__init__.py +0 -0
  8. quant1x-0.3.0/quant1x/findpeaks/filters/frost.py +168 -0
  9. quant1x-0.3.0/quant1x/findpeaks/filters/kuan.py +139 -0
  10. quant1x-0.3.0/quant1x/findpeaks/filters/lee.py +147 -0
  11. quant1x-0.3.0/quant1x/findpeaks/filters/lee_enhanced.py +163 -0
  12. quant1x-0.3.0/quant1x/findpeaks/filters/mean.py +122 -0
  13. quant1x-0.3.0/quant1x/findpeaks/filters/median.py +103 -0
  14. quant1x-0.3.0/quant1x/findpeaks/findpeaks.py +1253 -0
  15. quant1x-0.3.0/quant1x/findpeaks/interpolate.py +194 -0
  16. quant1x-0.3.0/quant1x/findpeaks/stats.py +593 -0
  17. quant1x-0.3.0/quant1x/findpeaks/union_find.py +73 -0
  18. quant1x-0.3.0/quant1x/indicator/__init__.py +4 -0
  19. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x.egg-info/PKG-INFO +2 -2
  20. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x.egg-info/SOURCES.txt +13 -4
  21. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x.egg-info/requires.txt +1 -1
  22. {quant1x-0.2.1 → quant1x-0.3.0}/setup.py +6 -4
  23. quant1x-0.2.1/quant1x/data/quotes.py +0 -204
  24. quant1x-0.2.1/quant1x/indicator/__init__.py +0 -8
  25. quant1x-0.2.1/quant1x/indicator/cdtd.py +0 -78
  26. quant1x-0.2.1/quant1x/indicator/f89k.py +0 -150
  27. quant1x-0.2.1/quant1x/indicator/hjk.py +0 -70
  28. quant1x-0.2.1/quant1x/indicator/p2fb.py +0 -97
  29. {quant1x-0.2.1 → quant1x-0.3.0}/LICENSE +0 -0
  30. {quant1x-0.2.1 → quant1x-0.3.0}/README.rst +0 -0
  31. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/base/__init__.py +0 -0
  32. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/base/basic.py +0 -0
  33. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/base/formula_plus.py +0 -0
  34. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/base/series.py +0 -0
  35. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/data/__init__.py +0 -0
  36. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/formula/__init__.py +0 -0
  37. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/indicator/ma1x.py +0 -0
  38. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/strategy/__init__.py +0 -0
  39. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/strategy/bad_base.py +0 -0
  40. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/strategy/linear_regression.py +0 -0
  41. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/util/__init__.py +0 -0
  42. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x/util/font.py +0 -0
  43. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x.egg-info/dependency_links.txt +0 -0
  44. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x.egg-info/entry_points.txt +0 -0
  45. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x.egg-info/not-zip-safe +0 -0
  46. {quant1x-0.2.1 → quant1x-0.3.0}/quant1x.egg-info/top_level.txt +0 -0
  47. {quant1x-0.2.1 → quant1x-0.3.0}/setup.cfg +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quant1x
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Quant1X量化交易框架
5
5
  Home-page: https://gitee.com/quant1x/89k
6
- Author: wangfeng
6
+ Author: WangFeng
7
7
  Author-email: wangfengxy@sina.cn
8
8
  License: MIT license
9
9
  Keywords: quant1x
@@ -5,7 +5,7 @@
5
5
  89K 努力打造一个适度的量化交易框架
6
6
  """
7
7
 
8
- __version__ = "0.1.0"
8
+ __version__ = "0.3.0"
9
9
  __author__ = "WangFeng"
10
10
 
11
11
  import sys
@@ -17,5 +17,4 @@ del sys
17
17
 
18
18
 
19
19
  def init(**kwargs):
20
- # qx.data.loader.DataHandler()
21
20
  pass
@@ -150,7 +150,7 @@ def rolling_apply(S, N, func: Callable[..., Any], raw: bool = False):
150
150
  N = np.repeat(N, s_len)
151
151
  for i in range(s_len):
152
152
  if (not np.isnan(N[i])) and N[i] <= i + 1:
153
- window = N[i]
153
+ window = int(N[i])
154
154
  T = S[i + 1 - window:i + 1]
155
155
  ret[i] = func(T, window)
156
156
  return ret
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/python
2
+ # -*- coding: UTF-8 -*-
3
+ """
4
+ 证券基本信息
5
+ """
6
+ from futu import *
7
+
8
+ quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
9
+ print('******************************************')
10
+ ret, data = quote_ctx.get_stock_basicinfo(Market.SH, SecurityType.STOCK)
11
+ if ret == RET_OK:
12
+ data.to_csv('sh.csv', index=False)
13
+ else:
14
+ print('error:', data)
15
+ print('******************************************')
16
+ ret, data = quote_ctx.get_stock_basicinfo(Market.SZ, SecurityType.STOCK)
17
+ if ret == RET_OK:
18
+ data.to_csv('sz.csv', index=False)
19
+ else:
20
+ print('error:', data)
21
+ ret, data = quote_ctx.get_stock_basicinfo(Market.HK, SecurityType.STOCK)
22
+ if ret == RET_OK:
23
+ data.to_csv('hk.csv', index=False)
24
+ else:
25
+ print('error:', data)
26
+
27
+ quote_ctx.close() # 结束后记得关闭当条连接,防止连接条数用尽