hikyuu 2.3.0__py3-none-win_amd64.whl → 2.5.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/__init__.py +438 -6
- hikyuu/__init__.pyi +791 -0
- hikyuu/analysis/__init__.pyi +487 -0
- hikyuu/analysis/analysis.pyi +517 -0
- hikyuu/core.pyi +482 -0
- hikyuu/cpp/__init__.pyi +3 -0
- 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/core312.pyi +12867 -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/cpp/sqlite3.dll +0 -0
- hikyuu/data/common_mysql.py +24 -7
- hikyuu/data/common_pytdx.py +17 -1
- hikyuu/data/em_block_to_mysql.py +3 -2
- hikyuu/data/em_block_to_sqlite.py +8 -3
- hikyuu/data/mysql_upgrade/0025.sql +61 -0
- hikyuu/data/mysql_upgrade/0026.sql +9 -0
- hikyuu/data/sqlite_upgrade/0025.sql +63 -0
- hikyuu/data/sqlite_upgrade/0026.sql +10 -0
- hikyuu/draw/__init__.pyi +35 -0
- hikyuu/draw/drawplot/__init__.py +3 -0
- hikyuu/draw/drawplot/__init__.pyi +134 -0
- hikyuu/draw/drawplot/bokeh_draw.pyi +796 -0
- hikyuu/draw/drawplot/common.pyi +10 -0
- hikyuu/draw/drawplot/echarts_draw.py +219 -24
- hikyuu/draw/drawplot/echarts_draw.pyi +682 -0
- hikyuu/draw/drawplot/matplotlib_draw.py +18 -3
- hikyuu/draw/drawplot/matplotlib_draw.pyi +1101 -0
- hikyuu/draw/elder.pyi +44 -0
- hikyuu/draw/kaufman.pyi +38 -0
- hikyuu/draw/volume.pyi +31 -0
- hikyuu/examples/notebook/Demo/Demo2.ipynb +1 -1
- hikyuu/extend.py +9 -3
- hikyuu/extend.pyi +636 -0
- hikyuu/fetcher/stock/zh_block_em.py +118 -51
- hikyuu/gui/data/EscapetimeThread.py +4 -4
- hikyuu/gui/data/ImportBlockInfoTask.py +3 -2
- hikyuu/gui/data/ImportHistoryFinanceTask.py +2 -0
- hikyuu/gui/data/MainWindow.py +48 -42
- hikyuu/gui/importdata.py +13 -26
- hikyuu/hub.py +2 -4
- hikyuu/hub.pyi +254 -0
- hikyuu/include/hikyuu/DataType.h +5 -0
- hikyuu/include/hikyuu/Stock.h +7 -0
- hikyuu/include/hikyuu/indicator/Indicator.h +8 -1
- hikyuu/include/hikyuu/indicator/Indicator2InImp.h +65 -0
- hikyuu/include/hikyuu/indicator/IndicatorImp.h +4 -3
- hikyuu/include/hikyuu/indicator/build_in.h +12 -0
- hikyuu/include/hikyuu/indicator/crt/ADVANCE.h +3 -1
- hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +2 -2
- hikyuu/include/hikyuu/indicator/crt/CORR.h +4 -2
- hikyuu/include/hikyuu/indicator/crt/COST.h +3 -0
- hikyuu/include/hikyuu/indicator/crt/CYCLE.h +24 -0
- hikyuu/include/hikyuu/indicator/crt/DECLINE.h +3 -1
- hikyuu/include/hikyuu/indicator/crt/DISCARD.h +27 -0
- hikyuu/include/hikyuu/indicator/crt/DMA.h +2 -1
- hikyuu/include/hikyuu/indicator/crt/HSL.h +1 -13
- hikyuu/include/hikyuu/indicator/crt/INBLOCK.h +31 -0
- hikyuu/include/hikyuu/indicator/crt/INDEX.h +60 -0
- hikyuu/include/hikyuu/indicator/crt/INSUM.h +5 -2
- hikyuu/include/hikyuu/indicator/crt/ISINF.h +28 -0
- hikyuu/include/hikyuu/indicator/crt/ISINFA.h +28 -0
- hikyuu/include/hikyuu/indicator/crt/ISNA.h +29 -0
- hikyuu/include/hikyuu/indicator/crt/JUMPDOWN.h +24 -0
- hikyuu/include/hikyuu/indicator/crt/JUMPUP.h +24 -0
- hikyuu/include/hikyuu/indicator/crt/LASTVALUE.h +29 -0
- hikyuu/include/hikyuu/indicator/crt/LIUTONGPAN.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/REPLACE.h +29 -0
- hikyuu/include/hikyuu/indicator/crt/SPEARMAN.h +3 -2
- hikyuu/include/hikyuu/indicator/crt/WINNER.h +38 -0
- hikyuu/include/hikyuu/indicator/imp/IContext.h +1 -1
- hikyuu/include/hikyuu/indicator/imp/ICorr.h +7 -22
- hikyuu/include/hikyuu/indicator/imp/ICost.h +31 -0
- hikyuu/include/hikyuu/indicator/imp/ICycle.h +30 -0
- hikyuu/include/hikyuu/indicator/imp/IDiscard.h +28 -0
- hikyuu/include/hikyuu/indicator/imp/IDma.h +7 -24
- hikyuu/include/hikyuu/indicator/imp/IHsl.h +30 -0
- hikyuu/include/hikyuu/indicator/imp/IInBlock.h +30 -0
- hikyuu/include/hikyuu/indicator/imp/IIndex.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/IIsInf.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/IIsInfa.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/IIsNa.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/IJumpDown.h +24 -0
- hikyuu/include/hikyuu/indicator/imp/IJumpUp.h +24 -0
- hikyuu/include/hikyuu/indicator/imp/ILastValue.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/IReplace.h +26 -0
- hikyuu/include/hikyuu/indicator/imp/ISpearman.h +6 -21
- hikyuu/include/hikyuu/indicator/imp/IWinner.h +26 -0
- hikyuu/include/hikyuu/indicator_talib/imp/TaMavp.h +6 -20
- hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +14 -65
- hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +54 -90
- hikyuu/include/hikyuu/indicator_talib/ta_crt.h +11 -9
- hikyuu/include/hikyuu/strategy/RunPortfolioInStrategy.h +3 -4
- hikyuu/include/hikyuu/strategy/Strategy.h +4 -5
- hikyuu/include/hikyuu/trade_manage/TradeRecord.h +5 -1
- hikyuu/include/hikyuu/trade_sys/allocatefunds/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_FixedWeightList.h +22 -0
- hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/FixedWeightListAllocateFunds.h +25 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +17 -4
- hikyuu/include/hikyuu/trade_sys/moneymanager/build_in.h +2 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCapital.h +6 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCapitalFunds.h +26 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedCountTps.h +27 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedRisk.h +6 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_FixedUnits.h +6 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/crt/MM_WilliamsFixedRisk.h +7 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +28 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCountTpsMM.h +44 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_Weight.h +30 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +41 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +38 -37
- hikyuu/include/hikyuu/trade_sys/portfolio/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/crt/PF_Simple.h +25 -1
- hikyuu/include/hikyuu/trade_sys/portfolio/crt/PF_WithoutAF.h +50 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +53 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +57 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +7 -0
- hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +51 -5
- hikyuu/include/hikyuu/trade_sys/signal/build_in.h +2 -0
- hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Bool.h +2 -1
- hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Logic.h +37 -0
- hikyuu/include/hikyuu/trade_sys/signal/crt/SG_OneSide.h +28 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/OneSideSignal.h +46 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +68 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +67 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubSignal.h +19 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/__init__.py +1 -0
- hikyuu/include/hikyuu/trade_sys/stoploss/crt/ST_Indicator.h +1 -1
- hikyuu/include/hikyuu/trade_sys/stoploss/imp/IndicatorStoploss.h +3 -4
- hikyuu/include/hikyuu/utilities/FilterNode.h +2 -2
- hikyuu/include/hikyuu/utilities/Log.h +42 -15
- hikyuu/include/hikyuu/utilities/datetime/Datetime.h +1 -1
- hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +2 -2
- hikyuu/include/hikyuu/utilities/db_connect/DBCondition.h +4 -0
- hikyuu/include/hikyuu/utilities/db_connect/SQLResultSet.h +2 -2
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +5 -1
- hikyuu/include/hikyuu/utilities/node/NodeServer.h +4 -4
- hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +2 -2
- hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +2 -2
- hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +5 -5
- hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +2 -2
- hikyuu/include/hikyuu/utilities/thread/algorithm.h +16 -10
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/indicator/indicator.py +1 -0
- hikyuu/interactive.py +3 -266
- hikyuu/trade_manage/__init__.pyi +584 -0
- hikyuu/trade_manage/broker.pyi +54 -0
- hikyuu/trade_manage/broker_easytrader.pyi +21 -0
- hikyuu/trade_manage/broker_mail.pyi +55 -0
- hikyuu/trade_manage/trade.pyi +590 -0
- hikyuu/util/__init__.pyi +55 -0
- hikyuu/util/check.pyi +59 -0
- hikyuu/util/mylog.pyi +70 -0
- hikyuu/util/notebook.pyi +23 -0
- hikyuu/util/singleton.pyi +18 -0
- hikyuu/util/slice.pyi +8 -0
- {hikyuu-2.3.0.dist-info → hikyuu-2.5.0.dist-info}/METADATA +3 -2
- {hikyuu-2.3.0.dist-info → hikyuu-2.5.0.dist-info}/RECORD +178 -95
- {hikyuu-2.3.0.dist-info → hikyuu-2.5.0.dist-info}/top_level.txt +1 -0
- hikyuu/deprecated.py +0 -651
- {hikyuu-2.3.0.dist-info → hikyuu-2.5.0.dist-info}/LICENSE +0 -0
- {hikyuu-2.3.0.dist-info → hikyuu-2.5.0.dist-info}/WHEEL +0 -0
- {hikyuu-2.3.0.dist-info → hikyuu-2.5.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2019 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2018年2月8日
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../AllocateFundsBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @brief 固定比例资产分配
|
|
16
|
+
* @param weights 指定的资产比例列表
|
|
17
|
+
* @return AFPtr
|
|
18
|
+
* @ingroup AllocateFunds
|
|
19
|
+
*/
|
|
20
|
+
AFPtr HKU_API AF_FixedWeightList(const vector<double>& weights);
|
|
21
|
+
|
|
22
|
+
} /* namespace hku */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-07
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../AllocateFundsBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
class FixedWeightListAllocateFunds : public AllocateFundsBase {
|
|
15
|
+
ALLOCATEFUNDS_IMP(FixedWeightListAllocateFunds)
|
|
16
|
+
ALLOCATEFUNDS_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
17
|
+
|
|
18
|
+
public:
|
|
19
|
+
FixedWeightListAllocateFunds();
|
|
20
|
+
explicit FixedWeightListAllocateFunds(const PriceList& weights);
|
|
21
|
+
virtual ~FixedWeightListAllocateFunds();
|
|
22
|
+
virtual void _checkParam(const string& name) const override;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
} /* namespace hku */
|
|
@@ -71,11 +71,17 @@ public:
|
|
|
71
71
|
/** 克隆操作 */
|
|
72
72
|
MoneyManagerPtr clone();
|
|
73
73
|
|
|
74
|
-
/**
|
|
75
|
-
|
|
74
|
+
/** 接收实际交易变化情况 */
|
|
75
|
+
void buyNotify(const TradeRecord& tr);
|
|
76
76
|
|
|
77
|
-
/**
|
|
78
|
-
virtual void
|
|
77
|
+
/** 子类接收实际交易变化情况接口,一般存在多次增减仓的情况才需要重载 */
|
|
78
|
+
virtual void _buyNotify(const TradeRecord&) {}
|
|
79
|
+
|
|
80
|
+
/** 接收实际交易变化情况 */
|
|
81
|
+
void sellNotify(const TradeRecord& tr);
|
|
82
|
+
|
|
83
|
+
/** 子类接收实际交易变化情况接口,一般存在多次增减仓的情况才需要重载 */
|
|
84
|
+
virtual void _sellNotify(const TradeRecord&) {}
|
|
79
85
|
|
|
80
86
|
/**
|
|
81
87
|
* 获取指定交易对象可卖出的数量
|
|
@@ -122,6 +128,12 @@ public:
|
|
|
122
128
|
double getBuyNumber(const Datetime& datetime, const Stock& stock, price_t price, price_t risk,
|
|
123
129
|
SystemPart from);
|
|
124
130
|
|
|
131
|
+
/** 当前买入交易次数, 连续买入计数,一旦接收卖出将恢复置0 */
|
|
132
|
+
size_t currentBuyCount(const Stock&) const;
|
|
133
|
+
|
|
134
|
+
/** 当前卖出交易次数,连续卖出计数,一旦接收买入将恢复置0 */
|
|
135
|
+
size_t currentSellCount(const Stock&) const;
|
|
136
|
+
|
|
125
137
|
virtual double _getBuyNumber(const Datetime& datetime, const Stock& stock, price_t price,
|
|
126
138
|
price_t risk, SystemPart from) = 0;
|
|
127
139
|
|
|
@@ -144,6 +156,7 @@ protected:
|
|
|
144
156
|
string m_name;
|
|
145
157
|
KQuery m_query;
|
|
146
158
|
TradeManagerPtr m_tm;
|
|
159
|
+
unordered_map<Stock, std::pair<size_t, size_t>> m_buy_sell_counts;
|
|
147
160
|
|
|
148
161
|
//============================================
|
|
149
162
|
// 序列化支持
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
#include "crt/MM_FixedPercent.h"
|
|
14
14
|
#include "crt/MM_FixedRisk.h"
|
|
15
15
|
#include "crt/MM_FixedCapital.h"
|
|
16
|
+
#include "crt/MM_FixedCapitalFunds.h"
|
|
16
17
|
#include "crt/MM_FixedCount.h"
|
|
18
|
+
#include "crt/MM_FixedCountTps.h"
|
|
17
19
|
#include "crt/MM_FixedUnits.h"
|
|
18
20
|
#include "crt/MM_WilliamsFixedRisk.h"
|
|
19
21
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-19
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef TRADE_SYS_MONEYMANAGER_CRT_MM_FIXEDCAPITALFUNDS_H_
|
|
10
|
+
#define TRADE_SYS_MONEYMANAGER_CRT_MM_FIXEDCAPITALFUNDS_H_
|
|
11
|
+
|
|
12
|
+
#include "../MoneyManagerBase.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 固定资本管理策略
|
|
18
|
+
* 公式: 买入数量 = 当前总资产 / capital
|
|
19
|
+
* @param capital
|
|
20
|
+
* @return MoneyManagerPtr
|
|
21
|
+
*/
|
|
22
|
+
MoneyManagerPtr HKU_API MM_FixedCapitalFunds(double capital = 10000.00);
|
|
23
|
+
|
|
24
|
+
} /* namespace hku */
|
|
25
|
+
|
|
26
|
+
#endif /* TRADE_SYS_MONEYMANAGER_CRT_MM_FIXEDCAPITALFUNDS_H_ */
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MM_FixedCapital.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2016年5月3日
|
|
5
|
+
* Author: Administrator
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef TRADE_SYS_MONEYMANAGER_CRT_MM_FIXEDCOUNT_TPS_H_
|
|
10
|
+
#define TRADE_SYS_MONEYMANAGER_CRT_MM_FIXEDCOUNT_TPS_H_
|
|
11
|
+
|
|
12
|
+
#include "../MoneyManagerBase.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @brief 连续买入/卖出固定数量资金管理策略。
|
|
18
|
+
* @param buy_counts 依次买入数量
|
|
19
|
+
* @param sell_counts 依次卖出数量
|
|
20
|
+
* @return MoneyManagerPtr
|
|
21
|
+
*/
|
|
22
|
+
MoneyManagerPtr HKU_API MM_FixedCountTps(const vector<double>& buy_counts,
|
|
23
|
+
const vector<double>& sell_counts);
|
|
24
|
+
|
|
25
|
+
} /* namespace hku */
|
|
26
|
+
|
|
27
|
+
#endif /* TRADE_SYS_MONEYMANAGER_CRT_MM_FIXEDCOUNT_TPS_H_ */
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
|
|
14
14
|
namespace hku {
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* 固定风险资金管理策略对每笔交易限定一个预先确定的或者固定的资金风险,如每笔交易固定风险1000元。
|
|
18
|
+
* 公式:交易数量 = 固定风险 / 交易风险。
|
|
19
|
+
* @param risk
|
|
20
|
+
* @return MoneyManagerPtr
|
|
21
|
+
*/
|
|
16
22
|
MoneyManagerPtr HKU_API MM_FixedRisk(double risk = 1000.00);
|
|
17
23
|
|
|
18
24
|
} /* namespace hku */
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
namespace hku {
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @brief 威廉斯固定风险资金管理策略
|
|
18
|
+
* 买入数量 =(账户余额 × 风险百分比p)÷ 最大损失(max_loss)
|
|
19
|
+
* @param p 风险百分比
|
|
20
|
+
* @param max_loss 最大损失
|
|
21
|
+
* @return MoneyManagerPtr
|
|
22
|
+
*/
|
|
16
23
|
MoneyManagerPtr HKU_API MM_WilliamsFixedRisk(double p = 0.1, price_t max_loss = 1000.0);
|
|
17
24
|
|
|
18
25
|
} // namespace hku
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-19
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef TRADE_SYS_MONEYMANAGER_IMP_FIXEDCAPITAL_FUNDS_MM_H_
|
|
10
|
+
#define TRADE_SYS_MONEYMANAGER_IMP_FIXEDCAPITAL_FUNDS_MM_H_
|
|
11
|
+
|
|
12
|
+
#include "../MoneyManagerBase.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
class FixedCapitalFundsMM : public MoneyManagerBase {
|
|
17
|
+
MONEY_MANAGER_IMP(FixedCapitalFundsMM)
|
|
18
|
+
MONEY_MANAGER_NO_PRIVATE_MEMBER_SERIALIZATION
|
|
19
|
+
|
|
20
|
+
public:
|
|
21
|
+
FixedCapitalFundsMM();
|
|
22
|
+
virtual ~FixedCapitalFundsMM();
|
|
23
|
+
virtual void _checkParam(const string& name) const override;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
} /* namespace hku */
|
|
27
|
+
|
|
28
|
+
#endif /* TRADE_SYS_MONEYMANAGER_IMP_FIXEDCAPITAL_FUNDS_MM_H_ */
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-20
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef TRADE_SYS_MONEYMANAGER_IMP_FIXEDCAPITAL_FUNDS_MM_H_
|
|
10
|
+
#define TRADE_SYS_MONEYMANAGER_IMP_FIXEDCAPITAL_FUNDS_MM_H_
|
|
11
|
+
|
|
12
|
+
#include "../MoneyManagerBase.h"
|
|
13
|
+
|
|
14
|
+
namespace hku {
|
|
15
|
+
|
|
16
|
+
class FixedCountTpsMM : public MoneyManagerBase {
|
|
17
|
+
public:
|
|
18
|
+
FixedCountTpsMM();
|
|
19
|
+
FixedCountTpsMM(const vector<double>& buy_counts, const vector<double>& sell_counts);
|
|
20
|
+
virtual ~FixedCountTpsMM();
|
|
21
|
+
|
|
22
|
+
virtual MoneyManagerPtr _clone() override;
|
|
23
|
+
virtual double _getBuyNumber(const Datetime& datetime, const Stock& stock, price_t price,
|
|
24
|
+
price_t risk, SystemPart from) override;
|
|
25
|
+
virtual double _getSellNumber(const Datetime& datetime, const Stock& stock, price_t price,
|
|
26
|
+
price_t risk, SystemPart from) override;
|
|
27
|
+
|
|
28
|
+
private:
|
|
29
|
+
vector<double> m_buy_counts;
|
|
30
|
+
vector<double> m_sell_counts;
|
|
31
|
+
|
|
32
|
+
#if HKU_SUPPORT_SERIALIZATION
|
|
33
|
+
private:
|
|
34
|
+
friend class boost::serialization::access;
|
|
35
|
+
template <class Archive>
|
|
36
|
+
void serialize(Archive& ar, const unsigned int version) {
|
|
37
|
+
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(MoneyManagerBase);
|
|
38
|
+
}
|
|
39
|
+
#endif
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
} /* namespace hku */
|
|
43
|
+
|
|
44
|
+
#endif /* TRADE_SYS_MONEYMANAGER_IMP_FIXEDCAPITAL_FUNDS_MM_H_ */
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2024-03-13
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#include "../MultiFactorBase.h"
|
|
10
|
+
|
|
11
|
+
namespace hku {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @brief 指定权重合成因子 = ind1 * w1 + ind2 * w2 + ... + indn * wn
|
|
15
|
+
* @param inds 原始因子列表
|
|
16
|
+
* @param weights 权重列表
|
|
17
|
+
* @param stks 计算证券列表
|
|
18
|
+
* @param query 日期范围
|
|
19
|
+
* @param ref_stk 参考证券
|
|
20
|
+
* @param ic_n 默认 IC 对应的 N 日收益率
|
|
21
|
+
* @param spearman 默认使用 spearman 计算相关系数,否则为 pearson
|
|
22
|
+
* @return MultiFactorPtr
|
|
23
|
+
*/
|
|
24
|
+
MultiFactorPtr HKU_API MF_Weight(const IndicatorList& inds, const PriceList& weights,
|
|
25
|
+
const StockList& stks, const KQuery& query, const Stock& ref_stk,
|
|
26
|
+
int ic_n = 5, bool spearman = true);
|
|
27
|
+
|
|
28
|
+
MultiFactorPtr HKU_API MF_Weight();
|
|
29
|
+
|
|
30
|
+
} // namespace hku
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2024-03-13
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "../MultiFactorBase.h"
|
|
11
|
+
|
|
12
|
+
namespace hku {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 指定指标权重评分板,证券得分为其个指标的权重之和
|
|
16
|
+
*/
|
|
17
|
+
class WeightMultiFactor : public MultiFactorBase {
|
|
18
|
+
MULTIFACTOR_IMP(WeightMultiFactor)
|
|
19
|
+
|
|
20
|
+
public:
|
|
21
|
+
WeightMultiFactor();
|
|
22
|
+
WeightMultiFactor(const vector<Indicator>& inds, const PriceList& weights,
|
|
23
|
+
const StockList& stks, const KQuery& query, const Stock& ref_stk, int ic_n,
|
|
24
|
+
bool spearman);
|
|
25
|
+
virtual ~WeightMultiFactor() = default;
|
|
26
|
+
|
|
27
|
+
private:
|
|
28
|
+
PriceList m_weights; // 每个指标权重,与输入 inds 列表等长
|
|
29
|
+
|
|
30
|
+
#if HKU_SUPPORT_SERIALIZATION
|
|
31
|
+
private:
|
|
32
|
+
friend class boost::serialization::access;
|
|
33
|
+
template <class Archive>
|
|
34
|
+
void serialize(Archive& ar, const unsigned int version) {
|
|
35
|
+
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(MultiFactorBase);
|
|
36
|
+
ar& BOOST_SERIALIZATION_NVP(m_weights);
|
|
37
|
+
}
|
|
38
|
+
#endif
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace hku
|
|
@@ -33,11 +33,13 @@ public:
|
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* @brief 构造函数
|
|
36
|
+
* @param name 组合名称
|
|
36
37
|
* @param tm 账户
|
|
37
38
|
* @param se 选择器
|
|
38
39
|
* @param af 资产分配算法
|
|
39
40
|
*/
|
|
40
|
-
Portfolio(const
|
|
41
|
+
Portfolio(const string& name, const TradeManagerPtr& tm, const SelectorPtr& se,
|
|
42
|
+
const AFPtr& af);
|
|
41
43
|
|
|
42
44
|
/** 析构函数 */
|
|
43
45
|
virtual ~Portfolio();
|
|
@@ -50,28 +52,10 @@ public:
|
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
54
|
* @brief 运行资产组合
|
|
53
|
-
* @details
|
|
54
|
-
* <pre>
|
|
55
|
-
* 调仓模式 adjust_mode 说明:
|
|
56
|
-
* - "query" 模式,跟随输入参数 query 中的 ktype,此时 adjust_cycle 为以 query 中的 ktype
|
|
57
|
-
* 决定周期间隔;
|
|
58
|
-
* - "day" 模式,adjust_cycle 为调仓间隔天数
|
|
59
|
-
* - "week" | "month" | "quarter" | "year" 模式时,adjust_cycle
|
|
60
|
-
* 为对应的每周第N日、每月第n日、每季度第n日、每年第n日,在 delay_to_trading_day 为 false 时
|
|
61
|
-
* 如果当日不是交易日将会被跳过调仓;当 delay_to_trading_day 为 true时,如果当日不是交易日
|
|
62
|
-
* 将会顺延至当前周期内的第一个交易日,如指定每月第1日调仓,但当月1日不是交易日,则将顺延至当月
|
|
63
|
-
* 的第一个交易日
|
|
64
|
-
* </pre>
|
|
65
|
-
* @note
|
|
66
|
-
* 由于各个组件可能存在参数变化的情况,无法自动感知判断是否需要重新计算,此时需要手工指定强制计算
|
|
67
55
|
* @param query 查询条件, 其 KType 必须为 KQuery::DAY
|
|
68
|
-
* @param adjust_cycle 调仓周期(受 adjust_mode 影响), 默认为1
|
|
69
56
|
* @param force 是否强制重计算
|
|
70
|
-
* @param adjust_mode 调仓模式 "query" | "day" | "week" | "month" | "year"
|
|
71
|
-
* @param delay_to_trading_day true 时,如果当日不是交易日将会被顺延至当前周期内的第一个交易日
|
|
72
57
|
*/
|
|
73
|
-
void run(const KQuery& query,
|
|
74
|
-
const string& adjust_mode = "query", bool delay_to_trading_day = true);
|
|
58
|
+
void run(const KQuery& query, bool force = false);
|
|
75
59
|
|
|
76
60
|
/** 修改查询条件 */
|
|
77
61
|
void setQuery(const KQuery& query);
|
|
@@ -97,33 +81,43 @@ public:
|
|
|
97
81
|
/** 设置资产分配算法 */
|
|
98
82
|
void setAF(const AFPtr& af);
|
|
99
83
|
|
|
84
|
+
const SystemList& getRealSystemList() const;
|
|
85
|
+
|
|
100
86
|
/** 复位操作 */
|
|
101
87
|
void reset();
|
|
102
88
|
|
|
89
|
+
/** 克隆操作 */
|
|
103
90
|
typedef shared_ptr<Portfolio> PortfolioPtr;
|
|
91
|
+
PortfolioPtr clone() const;
|
|
104
92
|
|
|
105
|
-
/**
|
|
106
|
-
|
|
93
|
+
/** 运行前准备 */
|
|
94
|
+
void readyForRun();
|
|
107
95
|
|
|
108
|
-
|
|
109
|
-
const SystemList& getSystemList() const;
|
|
96
|
+
void runMoment(const Datetime& date, const Datetime& nextCycle, bool adjust);
|
|
110
97
|
|
|
111
|
-
/**
|
|
112
|
-
|
|
98
|
+
/** 用于打印输出 */
|
|
99
|
+
virtual string str() const;
|
|
113
100
|
|
|
114
|
-
|
|
115
|
-
|
|
101
|
+
virtual void _reset() {}
|
|
102
|
+
virtual PortfolioPtr _clone() const {
|
|
103
|
+
return std::make_shared<Portfolio>();
|
|
104
|
+
}
|
|
116
105
|
|
|
117
|
-
|
|
118
|
-
void
|
|
106
|
+
virtual void _readyForRun() {}
|
|
107
|
+
virtual void _runMoment(const Datetime& date, const Datetime& nextCycle, bool adjust) {}
|
|
119
108
|
|
|
120
|
-
|
|
109
|
+
private:
|
|
110
|
+
void initParam();
|
|
121
111
|
|
|
122
112
|
void _runOnMode(const DatetimeList& datelist, int adjust_cycle, const string& mode);
|
|
123
113
|
|
|
124
114
|
void _runOnModeDelayToTradingDay(const DatetimeList& datelist, int adjust_cycle,
|
|
125
115
|
const string& mode);
|
|
126
116
|
|
|
117
|
+
protected:
|
|
118
|
+
// 跟踪打印当前TM持仓情况
|
|
119
|
+
void traceMomentTM(const Datetime& date);
|
|
120
|
+
|
|
127
121
|
protected:
|
|
128
122
|
string m_name;
|
|
129
123
|
TMPtr m_tm;
|
|
@@ -138,10 +132,6 @@ protected:
|
|
|
138
132
|
|
|
139
133
|
// 用于中间计算的临时数据
|
|
140
134
|
std::unordered_set<SYSPtr> m_running_sys_set;
|
|
141
|
-
SystemList m_dlist_sys_list; // 因证券退市,无法执行买入的系统(资产全部损失)
|
|
142
|
-
SystemWeightList m_delay_adjust_sys_list; // 延迟调仓卖出的系统列表
|
|
143
|
-
SystemWeightList m_tmp_selected_list;
|
|
144
|
-
SystemWeightList m_tmp_will_remove_sys;
|
|
145
135
|
|
|
146
136
|
//============================================
|
|
147
137
|
// 序列化支持
|
|
@@ -158,7 +148,6 @@ private:
|
|
|
158
148
|
ar& BOOST_SERIALIZATION_NVP(m_se);
|
|
159
149
|
ar& BOOST_SERIALIZATION_NVP(m_af);
|
|
160
150
|
ar& BOOST_SERIALIZATION_NVP(m_query);
|
|
161
|
-
ar& BOOST_SERIALIZATION_NVP(m_need_calculate);
|
|
162
151
|
}
|
|
163
152
|
|
|
164
153
|
template <class Archive>
|
|
@@ -170,13 +159,25 @@ private:
|
|
|
170
159
|
ar& BOOST_SERIALIZATION_NVP(m_se);
|
|
171
160
|
ar& BOOST_SERIALIZATION_NVP(m_af);
|
|
172
161
|
ar& BOOST_SERIALIZATION_NVP(m_query);
|
|
173
|
-
ar& BOOST_SERIALIZATION_NVP(m_need_calculate);
|
|
174
162
|
}
|
|
175
163
|
|
|
176
164
|
BOOST_SERIALIZATION_SPLIT_MEMBER()
|
|
177
165
|
#endif /* HKU_SUPPORT_SERIALIZATION */
|
|
178
166
|
};
|
|
179
167
|
|
|
168
|
+
#if HKU_SUPPORT_SERIALIZATION
|
|
169
|
+
BOOST_SERIALIZATION_ASSUME_ABSTRACT(Portfolio)
|
|
170
|
+
#endif
|
|
171
|
+
|
|
172
|
+
#define PORTFOLIO_IMP(classname) \
|
|
173
|
+
public: \
|
|
174
|
+
virtual PortfolioPtr _clone() const override { \
|
|
175
|
+
return std::make_shared<classname>(); \
|
|
176
|
+
} \
|
|
177
|
+
virtual void _reset() override; \
|
|
178
|
+
virtual void _readyForRun() override; \
|
|
179
|
+
virtual void _runMoment(const Datetime& date, const Datetime& nextCycle, bool adjust) override;
|
|
180
|
+
|
|
180
181
|
/**
|
|
181
182
|
* 客户程序都应使用该指针类型
|
|
182
183
|
* @ingroup Selector
|
|
@@ -15,8 +15,32 @@
|
|
|
15
15
|
|
|
16
16
|
namespace hku {
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @brief 创建资产组合
|
|
20
|
+
* @details
|
|
21
|
+
* <pre>
|
|
22
|
+
* 调仓模式 adjust_mode 说明:
|
|
23
|
+
* - "query" 模式,跟随输入参数 query 中的 ktype,此时 adjust_cycle 为以 query 中的 ktype
|
|
24
|
+
* 决定周期间隔;
|
|
25
|
+
* - "day" 模式,adjust_cycle 为调仓间隔天数
|
|
26
|
+
* - "week" | "month" | "quarter" | "year" 模式时,adjust_cycle
|
|
27
|
+
* 为对应的每周第N日、每月第n日、每季度第n日、每年第n日,在 delay_to_trading_day 为 false 时
|
|
28
|
+
* 如果当日不是交易日将会被跳过调仓;当 delay_to_trading_day 为 true时,如果当日不是交易日
|
|
29
|
+
* 将会顺延至当前周期内的第一个交易日,如指定每月第1日调仓,但当月1日不是交易日,则将顺延至当月
|
|
30
|
+
* 的第一个交易日
|
|
31
|
+
* </pre>
|
|
32
|
+
* @param tm 交易账户
|
|
33
|
+
* @param se 系统选择器
|
|
34
|
+
* @param af 资金分配算法
|
|
35
|
+
* @param adjust_cycle 调仓周期(受 adjust_mode 影响), 默认为1
|
|
36
|
+
* @param adjust_mode 调仓模式 "query" | "day" | "week" | "month" | "year"
|
|
37
|
+
* @param delay_to_trading_day true 时,如果调仓日不是交易日将会被顺延至当前周期内的第一个交易日
|
|
38
|
+
* @return 组合实例
|
|
39
|
+
*/
|
|
18
40
|
PortfolioPtr HKU_API PF_Simple(const TMPtr& tm = TradeManagerPtr(), const SEPtr& se = SE_Fixed(),
|
|
19
|
-
const AFPtr& af = AF_EqualWeight()
|
|
41
|
+
const AFPtr& af = AF_EqualWeight(), int adjust_cycle = 1,
|
|
42
|
+
const string& adjust_mode = "query",
|
|
43
|
+
bool delay_to_trading_day = true);
|
|
20
44
|
|
|
21
45
|
} /* namespace hku */
|
|
22
46
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-02-18
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
#ifndef TRADE_SYS_PORTFOLIO_IMP_PF_WITHOUTAF_H_
|
|
10
|
+
#define TRADE_SYS_PORTFOLIO_IMP_PF_WITHOUTAF_H_
|
|
11
|
+
|
|
12
|
+
#include "../Portfolio.h"
|
|
13
|
+
#include "../../selector/crt/SE_Fixed.h"
|
|
14
|
+
#include "../../allocatefunds/crt/AF_EqualWeight.h"
|
|
15
|
+
|
|
16
|
+
namespace hku {
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @brief 无资金分配算法的投资组合
|
|
20
|
+
* @details
|
|
21
|
+
* <pre>
|
|
22
|
+
* 调仓模式 adjust_mode 说明:
|
|
23
|
+
* - "query" 模式,跟随输入参数 query 中的 ktype,此时 adjust_cycle 为以 query 中的 ktype
|
|
24
|
+
* 决定周期间隔;
|
|
25
|
+
* - "day" 模式,adjust_cycle 为调仓间隔天数
|
|
26
|
+
* - "week" | "month" | "quarter" | "year" 模式时,adjust_cycle
|
|
27
|
+
* 为对应的每周第N日、每月第n日、每季度第n日、每年第n日,在 delay_to_trading_day 为 false 时
|
|
28
|
+
* 如果当日不是交易日将会被跳过调仓;当 delay_to_trading_day 为 true时,如果当日不是交易日
|
|
29
|
+
* 将会顺延至当前周期内的第一个交易日,如指定每月第1日调仓,但当月1日不是交易日,则将顺延至当月
|
|
30
|
+
* 的第一个交易日
|
|
31
|
+
* </pre>
|
|
32
|
+
* @note 无资金分配算法模式下,仅支持全部在开盘时买卖或全部在收盘时买卖!
|
|
33
|
+
* @param tm 交易账户
|
|
34
|
+
* @param se 系统选择器
|
|
35
|
+
* @param adjust_cycle 调仓周期(受 adjust_mode 影响), 默认为1
|
|
36
|
+
* @param adjust_mode 调仓模式 "query" | "day" | "week" | "month" | "year"
|
|
37
|
+
* @param delay_to_trading_day true 时,如果当日不是交易日将会被顺延至当前周期内的第一个交易日
|
|
38
|
+
* @param trade_on_close 在收盘时执行交易
|
|
39
|
+
* @param sys_use_self_tm 使用原型系统自身交易账户进行计算(仅在无资金分配模式下有效),默认 false
|
|
40
|
+
* @param sell_at_not_selected 调仓日未选中的股票是否强制卖出,默认 false
|
|
41
|
+
* @return 组合实例
|
|
42
|
+
*/
|
|
43
|
+
PortfolioPtr HKU_API PF_WithoutAF(const TMPtr& tm = TradeManagerPtr(), const SEPtr& se = SE_Fixed(),
|
|
44
|
+
int adjust_cycle = 1, const string& adjust_mode = "query",
|
|
45
|
+
bool delay_to_trading_day = true, bool trade_on_close = true,
|
|
46
|
+
bool sys_use_self_tm = false, bool sell_at_not_selected = false);
|
|
47
|
+
|
|
48
|
+
} /* namespace hku */
|
|
49
|
+
|
|
50
|
+
#endif /* TRADE_SYS_PORTFOLIO_IMP_PF_WITHOUTAF_H_ */
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SimplePortfolio.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2016年2月21日
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#ifndef TRADE_SYS_PORTFOLIO_SIMPLE_H_
|
|
11
|
+
#define TRADE_SYS_PORTFOLIO_SIMPLE_H_
|
|
12
|
+
|
|
13
|
+
#include "hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h"
|
|
14
|
+
#include "hikyuu/trade_sys/selector/SelectorBase.h"
|
|
15
|
+
#include "hikyuu/trade_sys/portfolio/Portfolio.h"
|
|
16
|
+
|
|
17
|
+
namespace hku {
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* 资产组合
|
|
21
|
+
* @ingroup SimplePortfolio
|
|
22
|
+
*/
|
|
23
|
+
class HKU_API SimplePortfolio : public Portfolio {
|
|
24
|
+
PORTFOLIO_IMP(SimplePortfolio)
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
SimplePortfolio();
|
|
28
|
+
SimplePortfolio(const TradeManagerPtr& tm, const SelectorPtr& se, const AFPtr& af);
|
|
29
|
+
virtual ~SimplePortfolio();
|
|
30
|
+
|
|
31
|
+
private:
|
|
32
|
+
SystemList m_dlist_sys_list; // 因证券退市,无法执行卖出的系统(资产全部损失)
|
|
33
|
+
SystemWeightList m_delay_adjust_sys_list; // 延迟调仓卖出的系统列表
|
|
34
|
+
SystemWeightList m_tmp_selected_list;
|
|
35
|
+
SystemWeightList m_tmp_will_remove_sys;
|
|
36
|
+
|
|
37
|
+
//============================================
|
|
38
|
+
// 序列化支持
|
|
39
|
+
//============================================
|
|
40
|
+
#if HKU_SUPPORT_SERIALIZATION
|
|
41
|
+
private:
|
|
42
|
+
friend class boost::serialization::access;
|
|
43
|
+
template <class Archive>
|
|
44
|
+
void serialize(Archive& ar, const unsigned int version) {
|
|
45
|
+
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Portfolio);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#endif /* HKU_SUPPORT_SERIALIZATION */
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
} /* namespace hku */
|
|
52
|
+
|
|
53
|
+
#endif /* TRADE_SYS_PORTFOLIO_SIMPLE_H_ */
|