hikyuu 2.6.8.4__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 +31 -17
- hikyuu/__init__.pyi +610 -590
- hikyuu/analysis/__init__.pyi +584 -563
- hikyuu/analysis/analysis.pyi +585 -564
- hikyuu/core.py +2 -0
- hikyuu/core.pyi +586 -565
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/core310.pyi +501 -108
- hikyuu/cpp/core310.so +0 -0
- hikyuu/cpp/core311.pyi +495 -108
- hikyuu/cpp/core311.so +0 -0
- hikyuu/cpp/core312.pyi +495 -108
- hikyuu/cpp/core312.so +0 -0
- hikyuu/cpp/core313.pyi +501 -108
- hikyuu/cpp/core313.so +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
- hikyuu/cpp/libboost_charconv-mt.so +0 -0
- hikyuu/cpp/libboost_charconv-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_chrono-mt.so +0 -0
- hikyuu/cpp/libboost_chrono-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_date_time-mt.so +0 -0
- hikyuu/cpp/libboost_date_time-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_serialization-mt.so +0 -0
- hikyuu/cpp/libboost_serialization-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_system-mt.so +0 -0
- hikyuu/cpp/libboost_system-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_thread-mt.so +0 -0
- hikyuu/cpp/libboost_thread-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_wserialization-mt.so +0 -0
- hikyuu/cpp/libboost_wserialization-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libhikyuu.so +0 -0
- hikyuu/cpp/libsqlite3.so +0 -0
- hikyuu/data/clickhouse_upgrade/createdb.sql +105 -105
- hikyuu/data/common.py +3 -3
- hikyuu/data/common_clickhouse.py +1 -1
- hikyuu/data/download_block.py +351 -0
- hikyuu/data/em_block_to_clickhouse.py +26 -74
- hikyuu/data/em_block_to_mysql.py +25 -75
- hikyuu/data/em_block_to_sqlite.py +26 -78
- hikyuu/data/hku_config_template.py +3 -3
- hikyuu/data/pytdx_to_clickhouse.py +15 -11
- hikyuu/data/pytdx_to_h5.py +6 -2
- hikyuu/data/pytdx_to_mysql.py +5 -1
- hikyuu/data/pytdx_weight_to_clickhouse.py +1 -1
- hikyuu/data/pytdx_weight_to_mysql.py +1 -1
- hikyuu/data/pytdx_weight_to_sqlite.py +1 -1
- hikyuu/data/zh_bond10_to_clickhouse.py +1 -1
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/__init__.pyi +9 -9
- hikyuu/draw/drawplot/bokeh_draw.pyi +600 -580
- hikyuu/draw/drawplot/common.pyi +1 -1
- hikyuu/draw/drawplot/echarts_draw.pyi +602 -582
- hikyuu/draw/drawplot/matplotlib_draw.py +4 -74
- hikyuu/draw/drawplot/matplotlib_draw.pyi +612 -592
- hikyuu/draw/elder.pyi +11 -11
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/examples/notebook/Demo/Demo1.ipynb +48 -33
- hikyuu/extend.py +0 -7
- hikyuu/extend.pyi +594 -573
- hikyuu/fetcher/stock/zh_block_em.py +12 -40
- hikyuu/gui/HikyuuTDX.py +99 -31
- hikyuu/gui/data/CollectSpotThread.py +1 -1
- hikyuu/gui/data/EscapetimeThread.py +8 -14
- hikyuu/gui/data/ImportBlockInfoTask.py +3 -10
- hikyuu/gui/data/MainWindow.py +1196 -717
- hikyuu/gui/data/SchedImportThread.py +2 -2
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/UseQmtImportToH5Thread.py +2 -2
- hikyuu/gui/data/UseTdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/tool.py +32 -25
- hikyuu/gui/dataserver.py +5 -3
- hikyuu/gui/images/liandongxiaopu.png +0 -0
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/DataType.h +4 -16
- hikyuu/include/hikyuu/KData.h +6 -3
- hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KDataSharedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KQuery.h +2 -2
- hikyuu/include/hikyuu/Stock.h +4 -1
- hikyuu/include/hikyuu/StockManager.h +13 -3
- hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +8 -0
- hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
- hikyuu/include/hikyuu/data_driver/KDataDriver.h +26 -1
- hikyuu/include/hikyuu/data_driver/base_info/mysql/MySQLBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/base_info/sqlite/SQLiteBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/block_info/mysql/MySQLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/qianlong/QLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/sqlite/SQLiteBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/kdata/DoNothingKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/cvs/KDataTempCsvDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/hdf5/H5KDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/tdx/TdxKDataDriver.h +1 -1
- hikyuu/include/hikyuu/hikyuu.h +1 -1
- hikyuu/include/hikyuu/indicator/build_in.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/CYCLE.h +4 -4
- hikyuu/include/hikyuu/indicator/crt/HSL.h +2 -2
- hikyuu/include/hikyuu/indicator/crt/QUANTILE_TRUNC.h +30 -0
- hikyuu/include/hikyuu/indicator/crt/TURNOVER.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/ZSCORE.h +2 -2
- hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +25 -0
- hikyuu/include/hikyuu/misc.h +38 -0
- hikyuu/include/hikyuu/plugin/dataserver.h +2 -1
- hikyuu/include/hikyuu/plugin/device.h +10 -0
- hikyuu/include/hikyuu/plugin/extind.h +37 -0
- hikyuu/include/hikyuu/plugin/hkuextra.h +0 -18
- hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -2
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +2 -0
- hikyuu/include/hikyuu/plugin/interface/ExtendIndicatorsPluginInterface.h +12 -0
- hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +0 -14
- hikyuu/include/hikyuu/plugin/interface/plugins.h +3 -1
- hikyuu/include/hikyuu/python/pybind_utils.h +1 -8
- hikyuu/include/hikyuu/strategy/RunSystemInStrategy.h +3 -0
- hikyuu/include/hikyuu/trade_manage/Performance.h +4 -4
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -1
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +0 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +36 -3
- hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +125 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +125 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/build_in.h +3 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_norm.h +36 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_scfilter.h +51 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/GroupSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreLessOrEqualValueSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreNanSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/MinAmountPercentSCFilter.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/PriceSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/TopNSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/EqualWeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICIRMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormMinMax.h +23 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantile.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantileUniform.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormZScore.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/__init__.py +1 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/quantile_trunc.h +16 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +49 -0
- hikyuu/include/hikyuu/trade_sys/selector/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +40 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +0 -3
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +49 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorValueSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/BandSignal2.h +0 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +4 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +2 -2
- 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/trade_sys/system/System.h +14 -1
- hikyuu/include/hikyuu/utilities/SpendTimer.h +17 -7
- hikyuu/include/hikyuu/utilities/arithmetic.h +55 -0
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +4 -1
- 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/{cpp/core39.so → plugin/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 +599 -579
- hikyuu/trade_manage/broker.pyi +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +1 -1
- hikyuu/trade_manage/trade.py +0 -2
- hikyuu/trade_manage/trade.pyi +599 -579
- hikyuu/util/__init__.pyi +1 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/METADATA +36 -32
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/RECORD +197 -164
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/top_level.txt +2 -2
- hikyuu/cpp/core39.pyi +0 -14385
- hikyuu/data_driver/__init__.py +0 -49
- hikyuu/data_driver/jqdata_data_driver.py +0 -277
- hikyuu/data_driver/pytdx_data_driver.py +0 -292
- hikyuu/fetcher/stock/zh_stock_a_huatai.py +0 -51
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +0 -129
- hikyuu/gui/data/CollectToMemThread.py +0 -123
- hikyuu/gui/data/CollectToMySQLThread.py +0 -178
- hikyuu/gui/start_huatai_insight.py +0 -510
- hikyuu/include/hikyuu/views/arrow_common.h +0 -38
- hikyuu/include/hikyuu/views/arrow_views.h +0 -117
- hikyuu/tools/update_block_info.py +0 -168
- /hikyuu/include/hikyuu/{views → trade_sys/multifactor/filter}/__init__.py +0 -0
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/entry_points.txt +0 -0
hikyuu/cpp/core313.so
CHANGED
|
Binary file
|
hikyuu/cpp/i18n/zh_CN/hikyuu.mo
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
hikyuu/cpp/libhikyuu.so
CHANGED
|
Binary file
|
hikyuu/cpp/libsqlite3.so
CHANGED
|
Binary file
|
|
@@ -880,15 +880,15 @@ INSERT INTO `hku_base`.`holiday` (`date`) VALUES
|
|
|
880
880
|
|
|
881
881
|
CREATE DATABASE IF NOT EXISTS hku_data;
|
|
882
882
|
CREATE table if not exists hku_data.day_k (
|
|
883
|
-
`market`
|
|
884
|
-
`code`
|
|
883
|
+
`market` FixedString(2),
|
|
884
|
+
`code` FixedString(6),
|
|
885
885
|
`date` DateTime,
|
|
886
|
-
`open`
|
|
887
|
-
`high`
|
|
888
|
-
`low`
|
|
889
|
-
`close`
|
|
890
|
-
`amount`
|
|
891
|
-
`volume`
|
|
886
|
+
`open` UInt32,
|
|
887
|
+
`high` UInt32,
|
|
888
|
+
`low` UInt32,
|
|
889
|
+
`close` UInt32,
|
|
890
|
+
`amount` UInt64,
|
|
891
|
+
`volume` UInt64
|
|
892
892
|
)
|
|
893
893
|
ENGINE = MergeTree()
|
|
894
894
|
PARTITION BY market
|
|
@@ -896,188 +896,188 @@ PRIMARY KEY (market, code, date)
|
|
|
896
896
|
ORDER BY (market, code, date)
|
|
897
897
|
SETTINGS index_granularity = 2048;
|
|
898
898
|
CREATE table if not exists hku_data.week_k (
|
|
899
|
-
`market`
|
|
900
|
-
`code`
|
|
899
|
+
`market` FixedString(2),
|
|
900
|
+
`code` FixedString(6),
|
|
901
901
|
`date` DateTime,
|
|
902
|
-
`open`
|
|
903
|
-
`high`
|
|
904
|
-
`low`
|
|
905
|
-
`close`
|
|
906
|
-
`amount`
|
|
907
|
-
`volume`
|
|
902
|
+
`open` UInt32,
|
|
903
|
+
`high` UInt32,
|
|
904
|
+
`low` UInt32,
|
|
905
|
+
`close` UInt32,
|
|
906
|
+
`amount` UInt64,
|
|
907
|
+
`volume` UInt64
|
|
908
908
|
)
|
|
909
909
|
ENGINE = MergeTree()
|
|
910
910
|
PARTITION BY market
|
|
911
911
|
PRIMARY KEY (market, code, date)
|
|
912
912
|
ORDER BY (market, code, date);
|
|
913
913
|
CREATE table if not exists hku_data.month_k (
|
|
914
|
-
`market`
|
|
915
|
-
`code`
|
|
914
|
+
`market` FixedString(2),
|
|
915
|
+
`code` FixedString(6),
|
|
916
916
|
`date` DateTime,
|
|
917
|
-
`open`
|
|
918
|
-
`high`
|
|
919
|
-
`low`
|
|
920
|
-
`close`
|
|
921
|
-
`amount`
|
|
922
|
-
`volume`
|
|
917
|
+
`open` UInt32,
|
|
918
|
+
`high` UInt32,
|
|
919
|
+
`low` UInt32,
|
|
920
|
+
`close` UInt32,
|
|
921
|
+
`amount` UInt64,
|
|
922
|
+
`volume` UInt64
|
|
923
923
|
)
|
|
924
924
|
ENGINE = MergeTree()
|
|
925
925
|
PARTITION BY market
|
|
926
926
|
PRIMARY KEY (market, code, date)
|
|
927
927
|
ORDER BY (market, code, date);
|
|
928
928
|
CREATE table if not exists hku_data.quarter_k (
|
|
929
|
-
`market`
|
|
930
|
-
`code`
|
|
929
|
+
`market` FixedString(2),
|
|
930
|
+
`code` FixedString(6),
|
|
931
931
|
`date` DateTime,
|
|
932
|
-
`open`
|
|
933
|
-
`high`
|
|
934
|
-
`low`
|
|
935
|
-
`close`
|
|
936
|
-
`amount`
|
|
937
|
-
`volume`
|
|
932
|
+
`open` UInt32,
|
|
933
|
+
`high` UInt32,
|
|
934
|
+
`low` UInt32,
|
|
935
|
+
`close` UInt32,
|
|
936
|
+
`amount` UInt64,
|
|
937
|
+
`volume` UInt64
|
|
938
938
|
)
|
|
939
939
|
ENGINE = MergeTree()
|
|
940
940
|
PARTITION BY market
|
|
941
941
|
PRIMARY KEY (market, code, date)
|
|
942
942
|
ORDER BY (market, code, date);
|
|
943
943
|
CREATE table if not exists hku_data.halfyear_k (
|
|
944
|
-
`market`
|
|
945
|
-
`code`
|
|
944
|
+
`market` FixedString(2),
|
|
945
|
+
`code` FixedString(6),
|
|
946
946
|
`date` DateTime,
|
|
947
|
-
`open`
|
|
948
|
-
`high`
|
|
949
|
-
`low`
|
|
950
|
-
`close`
|
|
951
|
-
`amount`
|
|
952
|
-
`volume`
|
|
947
|
+
`open` UInt32,
|
|
948
|
+
`high` UInt32,
|
|
949
|
+
`low` UInt32,
|
|
950
|
+
`close` UInt32,
|
|
951
|
+
`amount` UInt64,
|
|
952
|
+
`volume` UInt64
|
|
953
953
|
)
|
|
954
954
|
ENGINE = MergeTree()
|
|
955
955
|
PARTITION BY market
|
|
956
956
|
PRIMARY KEY (market, code, date)
|
|
957
957
|
ORDER BY (market, code, date);
|
|
958
958
|
CREATE table if not exists hku_data.year_k (
|
|
959
|
-
`market`
|
|
960
|
-
`code`
|
|
959
|
+
`market` FixedString(2),
|
|
960
|
+
`code` FixedString(6),
|
|
961
961
|
`date` DateTime,
|
|
962
|
-
`open`
|
|
963
|
-
`high`
|
|
964
|
-
`low`
|
|
965
|
-
`close`
|
|
966
|
-
`amount`
|
|
967
|
-
`volume`
|
|
962
|
+
`open` UInt32,
|
|
963
|
+
`high` UInt32,
|
|
964
|
+
`low` UInt32,
|
|
965
|
+
`close` UInt32,
|
|
966
|
+
`amount` UInt64,
|
|
967
|
+
`volume` UInt64
|
|
968
968
|
)
|
|
969
969
|
ENGINE = MergeTree()
|
|
970
970
|
PARTITION BY market
|
|
971
971
|
PRIMARY KEY (market, code, date)
|
|
972
972
|
ORDER BY (market, code, date);
|
|
973
973
|
CREATE table if not exists hku_data.min_k (
|
|
974
|
-
`market`
|
|
975
|
-
`code`
|
|
974
|
+
`market` FixedString(2),
|
|
975
|
+
`code` FixedString(6),
|
|
976
976
|
`date` DateTime,
|
|
977
|
-
`open`
|
|
978
|
-
`high`
|
|
979
|
-
`low`
|
|
980
|
-
`close`
|
|
981
|
-
`amount`
|
|
982
|
-
`volume`
|
|
977
|
+
`open` UInt32,
|
|
978
|
+
`high` UInt32,
|
|
979
|
+
`low` UInt32,
|
|
980
|
+
`close` UInt32,
|
|
981
|
+
`amount` UInt64,
|
|
982
|
+
`volume` UInt64
|
|
983
983
|
)
|
|
984
984
|
ENGINE = MergeTree()
|
|
985
985
|
PARTITION BY (market, toYear(date)-toYear(date)%10)
|
|
986
986
|
PRIMARY KEY (market, code, date)
|
|
987
987
|
ORDER BY (market, code, date);
|
|
988
988
|
CREATE table if not exists hku_data.min5_k (
|
|
989
|
-
`market`
|
|
990
|
-
`code`
|
|
989
|
+
`market` FixedString(2),
|
|
990
|
+
`code` FixedString(6),
|
|
991
991
|
`date` DateTime,
|
|
992
|
-
`open`
|
|
993
|
-
`high`
|
|
994
|
-
`low`
|
|
995
|
-
`close`
|
|
996
|
-
`amount`
|
|
997
|
-
`volume`
|
|
992
|
+
`open` UInt32,
|
|
993
|
+
`high` UInt32,
|
|
994
|
+
`low` UInt32,
|
|
995
|
+
`close` UInt32,
|
|
996
|
+
`amount` UInt64,
|
|
997
|
+
`volume` UInt64
|
|
998
998
|
)
|
|
999
999
|
ENGINE = MergeTree()
|
|
1000
1000
|
PARTITION BY (market, toYear(date)-toYear(date)%10)
|
|
1001
1001
|
PRIMARY KEY (market, code, date)
|
|
1002
1002
|
ORDER BY (market, code, date);
|
|
1003
1003
|
CREATE table if not exists hku_data.min15_k (
|
|
1004
|
-
`market`
|
|
1005
|
-
`code`
|
|
1004
|
+
`market` FixedString(2),
|
|
1005
|
+
`code` FixedString(6),
|
|
1006
1006
|
`date` DateTime,
|
|
1007
|
-
`open`
|
|
1008
|
-
`high`
|
|
1009
|
-
`low`
|
|
1010
|
-
`close`
|
|
1011
|
-
`amount`
|
|
1012
|
-
`volume`
|
|
1007
|
+
`open` UInt32,
|
|
1008
|
+
`high` UInt32,
|
|
1009
|
+
`low` UInt32,
|
|
1010
|
+
`close` UInt32,
|
|
1011
|
+
`amount` UInt64,
|
|
1012
|
+
`volume` UInt64
|
|
1013
1013
|
)
|
|
1014
1014
|
ENGINE = MergeTree()
|
|
1015
1015
|
PARTITION BY (market, toYear(date)-toYear(date)%10)
|
|
1016
1016
|
PRIMARY KEY (market, code, date)
|
|
1017
1017
|
ORDER BY (market, code, date);
|
|
1018
1018
|
CREATE table if not exists hku_data.min30_k (
|
|
1019
|
-
`market`
|
|
1020
|
-
`code`
|
|
1019
|
+
`market` FixedString(2),
|
|
1020
|
+
`code` FixedString(6),
|
|
1021
1021
|
`date` DateTime,
|
|
1022
|
-
`open`
|
|
1023
|
-
`high`
|
|
1024
|
-
`low`
|
|
1025
|
-
`close`
|
|
1026
|
-
`amount`
|
|
1027
|
-
`volume`
|
|
1022
|
+
`open` UInt32,
|
|
1023
|
+
`high` UInt32,
|
|
1024
|
+
`low` UInt32,
|
|
1025
|
+
`close` UInt32,
|
|
1026
|
+
`amount` UInt64,
|
|
1027
|
+
`volume` UInt64
|
|
1028
1028
|
)
|
|
1029
1029
|
ENGINE = MergeTree()
|
|
1030
1030
|
PARTITION BY (market, toYear(date)-toYear(date)%10)
|
|
1031
1031
|
PRIMARY KEY (market, code, date)
|
|
1032
1032
|
ORDER BY (market, code, date);
|
|
1033
1033
|
CREATE table if not exists hku_data.min60_k (
|
|
1034
|
-
`market`
|
|
1035
|
-
`code`
|
|
1034
|
+
`market` FixedString(2),
|
|
1035
|
+
`code` FixedString(6),
|
|
1036
1036
|
`date` DateTime,
|
|
1037
|
-
`open`
|
|
1038
|
-
`high`
|
|
1039
|
-
`low`
|
|
1040
|
-
`close`
|
|
1041
|
-
`amount`
|
|
1042
|
-
`volume`
|
|
1037
|
+
`open` UInt32,
|
|
1038
|
+
`high` UInt32,
|
|
1039
|
+
`low` UInt32,
|
|
1040
|
+
`close` UInt32,
|
|
1041
|
+
`amount` UInt64,
|
|
1042
|
+
`volume` UInt64
|
|
1043
1043
|
)
|
|
1044
1044
|
ENGINE = MergeTree()
|
|
1045
1045
|
PARTITION BY market
|
|
1046
1046
|
PRIMARY KEY (market, code, date)
|
|
1047
1047
|
ORDER BY (market, code, date);
|
|
1048
1048
|
CREATE table if not exists hku_data.hour2_k (
|
|
1049
|
-
`market`
|
|
1050
|
-
`code`
|
|
1049
|
+
`market` FixedString(2),
|
|
1050
|
+
`code` FixedString(6),
|
|
1051
1051
|
`date` DateTime,
|
|
1052
|
-
`open`
|
|
1053
|
-
`high`
|
|
1054
|
-
`low`
|
|
1055
|
-
`close`
|
|
1056
|
-
`amount`
|
|
1057
|
-
`volume`
|
|
1052
|
+
`open` UInt32,
|
|
1053
|
+
`high` UInt32,
|
|
1054
|
+
`low` UInt32,
|
|
1055
|
+
`close` UInt32,
|
|
1056
|
+
`amount` UInt64,
|
|
1057
|
+
`volume` UInt64
|
|
1058
1058
|
)
|
|
1059
1059
|
ENGINE = MergeTree()
|
|
1060
1060
|
PARTITION BY market
|
|
1061
1061
|
PRIMARY KEY (market, code, date)
|
|
1062
1062
|
ORDER BY (market, code, date);
|
|
1063
1063
|
CREATE table if not exists hku_data.timeline (
|
|
1064
|
-
`market`
|
|
1065
|
-
`code`
|
|
1064
|
+
`market` FixedString(2),
|
|
1065
|
+
`code` FixedString(6),
|
|
1066
1066
|
`date` DateTime,
|
|
1067
|
-
`price`
|
|
1068
|
-
`vol`
|
|
1067
|
+
`price` UInt32,
|
|
1068
|
+
`vol` UInt32
|
|
1069
1069
|
)
|
|
1070
1070
|
ENGINE = MergeTree()
|
|
1071
1071
|
PARTITION BY (market, toYear(date)-toYear(date)%10)
|
|
1072
1072
|
PRIMARY KEY (market, code, date)
|
|
1073
1073
|
ORDER BY (market, code, date);
|
|
1074
1074
|
CREATE table if not exists hku_data.transdata (
|
|
1075
|
-
`market`
|
|
1076
|
-
`code`
|
|
1075
|
+
`market` FixedString(2),
|
|
1076
|
+
`code` FixedString(6),
|
|
1077
1077
|
`date` DateTime,
|
|
1078
|
-
`price`
|
|
1079
|
-
`vol`
|
|
1080
|
-
`buyorsell`
|
|
1078
|
+
`price` UInt32,
|
|
1079
|
+
`vol` UInt32,
|
|
1080
|
+
`buyorsell` UInt8
|
|
1081
1081
|
)
|
|
1082
1082
|
ENGINE = MergeTree()
|
|
1083
1083
|
PARTITION BY (market, toYear(date))
|
hikyuu/data/common.py
CHANGED
|
@@ -200,11 +200,11 @@ def get_china_bond10_rate(start_date="19901219"):
|
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
def modifiy_code(code):
|
|
203
|
-
if code.startswith(('0', '3')):
|
|
203
|
+
if code.startswith(('0', '3', '5', '20')):
|
|
204
204
|
return 'SZ' + code
|
|
205
|
-
if code.startswith(('4', '8', '92')):
|
|
205
|
+
if code.startswith(('1', '4', '8', '92')):
|
|
206
206
|
return 'BJ' + code
|
|
207
|
-
if code.startswith('6'):
|
|
207
|
+
if code.startswith(('6', '900')):
|
|
208
208
|
return 'SH' + code
|
|
209
209
|
else:
|
|
210
210
|
hku_warn("Unknow code: {}", code)
|
hikyuu/data/common_clickhouse.py
CHANGED
|
@@ -163,7 +163,7 @@ def get_last_krecord(connect, tablename):
|
|
|
163
163
|
# hku_info(f"{tablename} {a}")
|
|
164
164
|
if not a:
|
|
165
165
|
return None
|
|
166
|
-
return (Datetime.from_timestamp_utc(a[0][0]*1000000).ymdhm, a[0][1], a[0][2], a[0][3], a[0][4], a[0][5], a[0][6])
|
|
166
|
+
return (Datetime.from_timestamp_utc(a[0][0]*1000000).ymdhm, a[0][1]*0.001, a[0][2]*0.001, a[0][3]*0.001, a[0][4]*0.001, a[0][5]*0.001, a[0][6]*0.001)
|
|
167
167
|
except:
|
|
168
168
|
return None
|
|
169
169
|
|