hikyuu 2.7.3__py3-none-win_amd64.whl → 2.7.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.
Files changed (217) hide show
  1. hikyuu/__init__.py +3 -1
  2. hikyuu/__init__.pyi +14 -13
  3. hikyuu/analysis/__init__.pyi +1 -0
  4. hikyuu/analysis/analysis.pyi +2 -1
  5. hikyuu/core.pyi +3 -2
  6. hikyuu/cpp/core310.pyd +0 -0
  7. hikyuu/cpp/core310.pyi +80 -46
  8. hikyuu/cpp/core311.pyd +0 -0
  9. hikyuu/cpp/core311.pyi +80 -46
  10. hikyuu/cpp/core312.pyd +0 -0
  11. hikyuu/cpp/core312.pyi +80 -46
  12. hikyuu/cpp/core313.pyd +0 -0
  13. hikyuu/cpp/core313.pyi +80 -46
  14. hikyuu/cpp/hikyuu.dll +0 -0
  15. hikyuu/cpp/hikyuu.lib +0 -0
  16. hikyuu/cpp/mimalloc-redirect.dll +0 -0
  17. hikyuu/cpp/mimalloc.dll +0 -0
  18. hikyuu/data/clickhouse_upgrade/0002.sql +9 -0
  19. hikyuu/data/common_mysql.py +1 -1
  20. hikyuu/data/em_block_to_mysql.py +16 -4
  21. hikyuu/data/em_block_to_sqlite.py +16 -4
  22. hikyuu/data/hku_config_template.py +1 -1
  23. hikyuu/data/mysql_upgrade/0030.sql +3 -0
  24. hikyuu/data/pytdx_to_h5.py +2 -2
  25. hikyuu/data/pytdx_to_mysql.py +5 -5
  26. hikyuu/data/sqlite_upgrade/0030.sql +5 -0
  27. hikyuu/draw/__init__.pyi +1 -1
  28. hikyuu/draw/drawplot/__init__.pyi +1 -1
  29. hikyuu/draw/drawplot/bokeh_draw.pyi +7 -6
  30. hikyuu/draw/drawplot/echarts_draw.pyi +7 -6
  31. hikyuu/draw/drawplot/matplotlib_draw.py +19 -11
  32. hikyuu/draw/drawplot/matplotlib_draw.pyi +7 -6
  33. hikyuu/examples/notebook/001-overview.ipynb +112 -78
  34. hikyuu/examples/notebook/004-IndicatorOverview.ipynb +52 -65
  35. hikyuu/examples/notebook/006-TradeManager.ipynb +402 -291
  36. hikyuu/examples/notebook/008-Pickle.ipynb +25 -17
  37. hikyuu/examples/notebook/009-RealData.ipynb +36 -38
  38. hikyuu/examples/notebook/Demo/Demo2.ipynb +146 -116
  39. hikyuu/extend.pyi +4 -3
  40. hikyuu/gui/data/UseTdxImportToH5Thread.py +4 -2
  41. hikyuu/gui/start_qmt.py +1 -1
  42. hikyuu/hub.pyi +6 -6
  43. hikyuu/include/hikyuu/Block.h +9 -9
  44. hikyuu/include/hikyuu/HistoryFinanceInfo.h +3 -3
  45. hikyuu/include/hikyuu/KData.h +51 -28
  46. hikyuu/include/hikyuu/KDataImp.h +12 -7
  47. hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +13 -7
  48. hikyuu/include/hikyuu/KDataSharedBufferImp.h +8 -6
  49. hikyuu/include/hikyuu/KQuery.h +11 -11
  50. hikyuu/include/hikyuu/KRecord.h +1 -1
  51. hikyuu/include/hikyuu/MarketInfo.h +10 -10
  52. hikyuu/include/hikyuu/Stock.h +30 -30
  53. hikyuu/include/hikyuu/StockManager.h +11 -10
  54. hikyuu/include/hikyuu/StockTypeInfo.h +9 -9
  55. hikyuu/include/hikyuu/StockWeight.h +9 -9
  56. hikyuu/include/hikyuu/TimeLineRecord.h +1 -1
  57. hikyuu/include/hikyuu/TransRecord.h +1 -1
  58. hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
  59. hikyuu/include/hikyuu/data_driver/KDataDriver.h +4 -3
  60. hikyuu/include/hikyuu/indicator/IndParam.h +1 -1
  61. hikyuu/include/hikyuu/indicator/Indicator.h +56 -27
  62. hikyuu/include/hikyuu/indicator/Indicator2InImp.h +0 -4
  63. hikyuu/include/hikyuu/indicator/IndicatorImp.h +146 -73
  64. hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +11 -1
  65. hikyuu/include/hikyuu/indicator/crt/IC.h +19 -14
  66. hikyuu/include/hikyuu/indicator/crt/ICIR.h +4 -7
  67. hikyuu/include/hikyuu/indicator/imp/IAbs.h +1 -0
  68. hikyuu/include/hikyuu/indicator/imp/IAcos.h +1 -0
  69. hikyuu/include/hikyuu/indicator/imp/IAd.h +0 -2
  70. hikyuu/include/hikyuu/indicator/imp/IAdvance.h +3 -0
  71. hikyuu/include/hikyuu/indicator/imp/IAma.h +3 -0
  72. hikyuu/include/hikyuu/indicator/imp/IAsin.h +1 -0
  73. hikyuu/include/hikyuu/indicator/imp/IAtan.h +1 -0
  74. hikyuu/include/hikyuu/indicator/imp/IAtr.h +2 -3
  75. hikyuu/include/hikyuu/indicator/imp/IBackset.h +2 -4
  76. hikyuu/include/hikyuu/indicator/imp/IBlockSetNum.h +3 -0
  77. hikyuu/include/hikyuu/indicator/imp/ICeil.h +1 -0
  78. hikyuu/include/hikyuu/indicator/imp/IContext.h +0 -3
  79. hikyuu/include/hikyuu/indicator/imp/ICorr.h +3 -0
  80. hikyuu/include/hikyuu/indicator/imp/ICos.h +1 -0
  81. hikyuu/include/hikyuu/indicator/imp/ICost.h +0 -2
  82. hikyuu/include/hikyuu/indicator/imp/ICount.h +2 -1
  83. hikyuu/include/hikyuu/indicator/imp/ICval.h +1 -4
  84. hikyuu/include/hikyuu/indicator/imp/ICycle.h +0 -2
  85. hikyuu/include/hikyuu/indicator/imp/IDecline.h +3 -0
  86. hikyuu/include/hikyuu/indicator/imp/IDevsq.h +4 -1
  87. hikyuu/include/hikyuu/indicator/imp/IDiff.h +1 -0
  88. hikyuu/include/hikyuu/indicator/imp/IDma.h +2 -0
  89. hikyuu/include/hikyuu/indicator/imp/IDropna.h +0 -4
  90. hikyuu/include/hikyuu/indicator/imp/IEma.h +3 -1
  91. hikyuu/include/hikyuu/indicator/imp/IEvery.h +5 -1
  92. hikyuu/include/hikyuu/indicator/imp/IExist.h +5 -1
  93. hikyuu/include/hikyuu/indicator/imp/IExp.h +1 -0
  94. hikyuu/include/hikyuu/indicator/imp/IFilter.h +4 -5
  95. hikyuu/include/hikyuu/indicator/imp/IFinance.h +1 -2
  96. hikyuu/include/hikyuu/indicator/imp/IFloor.h +1 -0
  97. hikyuu/include/hikyuu/indicator/imp/IHhvbars.h +5 -1
  98. hikyuu/include/hikyuu/indicator/imp/IHighLine.h +5 -1
  99. hikyuu/include/hikyuu/indicator/imp/IHsl.h +0 -2
  100. hikyuu/include/hikyuu/indicator/imp/IIc.h +3 -6
  101. hikyuu/include/hikyuu/indicator/imp/IInBlock.h +1 -2
  102. hikyuu/include/hikyuu/indicator/imp/IIntpart.h +1 -0
  103. hikyuu/include/hikyuu/indicator/imp/IIsInf.h +1 -0
  104. hikyuu/include/hikyuu/indicator/imp/IIsInfa.h +1 -0
  105. hikyuu/include/hikyuu/indicator/imp/IIsLastBar.h +0 -1
  106. hikyuu/include/hikyuu/indicator/imp/IIsNa.h +1 -0
  107. hikyuu/include/hikyuu/indicator/imp/IJumpDown.h +1 -0
  108. hikyuu/include/hikyuu/indicator/imp/IJumpUp.h +1 -0
  109. hikyuu/include/hikyuu/indicator/imp/IKData.h +1 -2
  110. hikyuu/include/hikyuu/indicator/imp/ILiuTongPan.h +0 -2
  111. hikyuu/include/hikyuu/indicator/imp/ILn.h +1 -0
  112. hikyuu/include/hikyuu/indicator/imp/ILog.h +1 -0
  113. hikyuu/include/hikyuu/indicator/imp/ILowLine.h +5 -1
  114. hikyuu/include/hikyuu/indicator/imp/ILowLineBars.h +5 -1
  115. hikyuu/include/hikyuu/indicator/imp/IMa.h +6 -1
  116. hikyuu/include/hikyuu/indicator/imp/IMacd.h +2 -0
  117. hikyuu/include/hikyuu/indicator/imp/INot.h +1 -0
  118. hikyuu/include/hikyuu/indicator/imp/IPow.h +3 -1
  119. hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +1 -0
  120. hikyuu/include/hikyuu/indicator/imp/IRecover.h +3 -0
  121. hikyuu/include/hikyuu/indicator/imp/IRef.h +3 -1
  122. hikyuu/include/hikyuu/indicator/imp/IResult.h +1 -0
  123. hikyuu/include/hikyuu/indicator/imp/IReverse.h +1 -0
  124. hikyuu/include/hikyuu/indicator/imp/IRoc.h +6 -1
  125. hikyuu/include/hikyuu/indicator/imp/IRocp.h +5 -1
  126. hikyuu/include/hikyuu/indicator/imp/IRocr.h +5 -1
  127. hikyuu/include/hikyuu/indicator/imp/IRocr100.h +5 -1
  128. hikyuu/include/hikyuu/indicator/imp/IRound.h +1 -0
  129. hikyuu/include/hikyuu/indicator/imp/IRoundDown.h +1 -0
  130. hikyuu/include/hikyuu/indicator/imp/IRoundUp.h +1 -0
  131. hikyuu/include/hikyuu/indicator/imp/ISaftyLoss.h +1 -0
  132. hikyuu/include/hikyuu/indicator/imp/ISign.h +1 -0
  133. hikyuu/include/hikyuu/indicator/imp/ISin.h +1 -0
  134. hikyuu/include/hikyuu/indicator/imp/ISlope.h +5 -1
  135. hikyuu/include/hikyuu/indicator/imp/ISma.h +2 -0
  136. hikyuu/include/hikyuu/indicator/imp/ISpearman.h +3 -0
  137. hikyuu/include/hikyuu/indicator/imp/ISqrt.h +1 -0
  138. hikyuu/include/hikyuu/indicator/imp/IStdev.h +5 -1
  139. hikyuu/include/hikyuu/indicator/imp/IStdp.h +5 -1
  140. hikyuu/include/hikyuu/indicator/imp/ISum.h +6 -1
  141. hikyuu/include/hikyuu/indicator/imp/ITan.h +1 -0
  142. hikyuu/include/hikyuu/indicator/imp/ITime.h +1 -2
  143. hikyuu/include/hikyuu/indicator/imp/ITimeLine.h +0 -2
  144. hikyuu/include/hikyuu/indicator/imp/ITr.h +1 -2
  145. hikyuu/include/hikyuu/indicator/imp/IVar.h +5 -1
  146. hikyuu/include/hikyuu/indicator/imp/IVarp.h +5 -1
  147. hikyuu/include/hikyuu/indicator/imp/IVigor.h +0 -2
  148. hikyuu/include/hikyuu/indicator/imp/IWma.h +5 -1
  149. hikyuu/include/hikyuu/indicator/imp/IZongGuBen.h +1 -2
  150. hikyuu/include/hikyuu/indicator_talib/imp/TaAdosc.h +0 -2
  151. hikyuu/include/hikyuu/indicator_talib/imp/TaSar.h +0 -2
  152. hikyuu/include/hikyuu/indicator_talib/imp/TaSarext.h +0 -4
  153. hikyuu/include/hikyuu/indicator_talib/imp/TaStoch.h +0 -3
  154. hikyuu/include/hikyuu/indicator_talib/imp/TaStochf.h +0 -2
  155. hikyuu/include/hikyuu/indicator_talib/imp/TaUltosc.h +0 -2
  156. hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +2 -4
  157. hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +70 -90
  158. hikyuu/include/hikyuu/plugin/hkuextra.h +2 -0
  159. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +2 -0
  160. hikyuu/include/hikyuu/python/pybind_utils.h +22 -5
  161. hikyuu/include/hikyuu/trade_manage/TradeCostBase.h +5 -3
  162. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +9 -2
  163. hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +8 -3
  164. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +5 -2
  165. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +6 -2
  166. hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +5 -2
  167. hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +23 -19
  168. hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +6 -3
  169. hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +5 -2
  170. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_EqualWeight.h +3 -3
  171. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICIRWeight.h +4 -4
  172. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICWeight.h +4 -4
  173. hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_Weight.h +4 -4
  174. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +5 -2
  175. hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +4 -2
  176. hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +12 -2
  177. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor.h +1 -1
  178. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +1 -1
  179. hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +1 -0
  180. hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +1 -0
  181. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/OptimalSelectorBase.h +0 -2
  182. hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/PerformanceOptimalSelector.h +0 -4
  183. hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +5 -2
  184. hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +5 -2
  185. hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +5 -2
  186. hikyuu/include/hikyuu/trade_sys/system/System.h +5 -2
  187. hikyuu/include/hikyuu/utilities/LruCache.h +299 -0
  188. hikyuu/include/hikyuu/utilities/arithmetic.h +2 -2
  189. hikyuu/include/hikyuu/utilities/omp_macro.h +25 -0
  190. hikyuu/include/hikyuu/utilities/plugin/PluginManager.h +5 -0
  191. hikyuu/include/hikyuu/utilities/thread/GlobalStealThreadPool.h +72 -19
  192. hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +0 -4
  193. hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +0 -4
  194. hikyuu/include/hikyuu/utilities/thread/algorithm.h +286 -0
  195. hikyuu/include/hikyuu/version.h +4 -4
  196. hikyuu/plugin/backtest.dll +0 -0
  197. hikyuu/plugin/checkdata.dll +0 -0
  198. hikyuu/plugin/clickhousedriver.dll +0 -0
  199. hikyuu/plugin/dataserver.dll +0 -0
  200. hikyuu/plugin/dataserver_parquet.dll +0 -0
  201. hikyuu/plugin/device.dll +0 -0
  202. hikyuu/plugin/extind.dll +0 -0
  203. hikyuu/plugin/hkuextra.dll +0 -0
  204. hikyuu/plugin/import2ch.dll +0 -0
  205. hikyuu/plugin/import2hdf5.dll +0 -0
  206. hikyuu/plugin/import2mysql.dll +0 -0
  207. hikyuu/plugin/tmreport.dll +0 -0
  208. hikyuu/test/Indicator.py +1 -2
  209. hikyuu/trade_manage/__init__.pyi +6 -5
  210. hikyuu/trade_manage/trade.pyi +6 -5
  211. hikyuu/util/__init__.pyi +1 -1
  212. hikyuu/util/singleton.pyi +1 -1
  213. {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/METADATA +2 -13
  214. {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/RECORD +217 -210
  215. {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/WHEEL +1 -1
  216. {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/entry_points.txt +0 -0
  217. {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/top_level.txt +0 -0
@@ -93,8 +93,8 @@ public:
93
93
  /** 子类克隆接口 */
94
94
  virtual EnvironmentPtr _clone() = 0;
95
95
 
96
- virtual bool isPythonObject() const {
97
- return false;
96
+ bool isPythonObject() const noexcept {
97
+ return m_is_python_object;
98
98
  }
99
99
 
100
100
  protected:
@@ -104,6 +104,8 @@ protected:
104
104
  vector<price_t> m_values;
105
105
  mutable std::shared_mutex m_mutex;
106
106
 
107
+ bool m_is_python_object{false};
108
+
107
109
  //============================================
108
110
  // 序列化支持
109
111
  //============================================
@@ -118,6 +120,7 @@ private:
118
120
  ar& BOOST_SERIALIZATION_NVP(m_query);
119
121
  ar& BOOST_SERIALIZATION_NVP(m_date_index);
120
122
  ar& BOOST_SERIALIZATION_NVP(m_values);
123
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
121
124
  }
122
125
 
123
126
  template <class Archive>
@@ -127,6 +130,7 @@ private:
127
130
  ar& BOOST_SERIALIZATION_NVP(m_query);
128
131
  ar& BOOST_SERIALIZATION_NVP(m_date_index);
129
132
  ar& BOOST_SERIALIZATION_NVP(m_values);
133
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
130
134
  }
131
135
 
132
136
  BOOST_SERIALIZATION_SPLIT_MEMBER()
@@ -152,8 +152,8 @@ public:
152
152
  /** 子类克隆私有变量接口 */
153
153
  virtual MoneyManagerPtr _clone() = 0;
154
154
 
155
- virtual bool isPythonObject() const {
156
- return false;
155
+ bool isPythonObject() const noexcept {
156
+ return m_is_python_object;
157
157
  }
158
158
 
159
159
  protected:
@@ -161,6 +161,7 @@ protected:
161
161
  KQuery m_query;
162
162
  TradeManagerPtr m_tm;
163
163
  unordered_map<Stock, std::pair<size_t, size_t>> m_buy_sell_counts;
164
+ bool m_is_python_object{false};
164
165
 
165
166
  //============================================
166
167
  // 序列化支持
@@ -172,6 +173,7 @@ private:
172
173
  void save(Archive& ar, const unsigned int version) const {
173
174
  ar& BOOST_SERIALIZATION_NVP(m_name);
174
175
  ar& BOOST_SERIALIZATION_NVP(m_params);
176
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
175
177
  // m_query、m_tm都是系统运行时临时设置,不需要序列化
176
178
  // ar & BOOST_SERIALIZATION_NVP(m_query);
177
179
  // ar & BOOST_SERIALIZATION_NVP(m_tm);
@@ -181,6 +183,7 @@ private:
181
183
  void load(Archive& ar, const unsigned int version) {
182
184
  ar& BOOST_SERIALIZATION_NVP(m_name);
183
185
  ar& BOOST_SERIALIZATION_NVP(m_params);
186
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
184
187
  }
185
188
 
186
189
  BOOST_SERIALIZATION_SPLIT_MEMBER()
@@ -164,34 +164,44 @@ public:
164
164
  virtual MultiFactorPtr _clone() = 0;
165
165
  virtual IndicatorList _calculate(const vector<IndicatorList>&) = 0;
166
166
 
167
- virtual bool isPythonObject() const {
168
- return false;
167
+ bool isPythonObject() const noexcept {
168
+ return m_is_python_object;
169
169
  }
170
170
 
171
- private:
172
- /** 执行计算 */
171
+ /**
172
+ * 执行计算。默认取结果时,会自动计算。但并行使用mf时,应主动调用该接口
173
+ * @note 因获取scores非常频繁,所以为使用锁。
174
+ * 这样的话,在并行时并不完备。在需要并行计算时可主动调用该接口。
175
+ */
173
176
  void calculate();
174
177
 
178
+ private:
175
179
  void initParam();
176
180
 
177
181
  // 构造每个指标构造行业哑变量,以便进行行业中性化处理
178
182
  unordered_map<string, PriceList> _buildDummyIndex();
179
183
 
180
- void _buildIndex(); // 计算完成后创建截面索引
181
- void _buildIndexDesc(); // 创建降序排列的索引
182
- void _buildIndexAsc(); // 创建升序排列的索引
183
- void _buildIndexNone(); // build index when no index
184
+ void _buildIndex(); // 计算完成后创建截面索引
184
185
 
185
- IndicatorList _getAllReturns(int ndays) const;
186
186
  void _checkData();
187
187
 
188
188
  protected:
189
+ IndicatorList _getAllReturns(int ndays) const;
190
+
191
+ protected:
192
+ bool m_is_python_object{false};
189
193
  string m_name;
190
- IndicatorList m_inds; // 输入的原始因子列表
194
+ IndicatorList m_inds; // 输入的原始因子公式列表
191
195
  StockList m_stks; // 证券组合
192
- Stock m_ref_stk; // 指定的参考证券
196
+ Stock m_ref_stk; // 指定的参考证券, 仅为对齐日期
193
197
  KQuery m_query; // 计算的日期范围条件
194
198
 
199
+ NormPtr m_norm; // 全局标准化/归一化操作
200
+ unordered_map<string, NormPtr> m_special_norms; // 对特定指标执行特定的标准化操作
201
+ unordered_map<string, string> m_special_category; // 对特定指标执行行业中性化时指定的板块分类
202
+ unordered_map<string, IndicatorList>
203
+ m_special_style_inds; // 对特定指标执行风格因子中性化时指定的风格因子
204
+
195
205
  // 以下变量为计算后生成
196
206
  DatetimeList m_ref_dates; // 依据参考证券和query计算的参考日期,合成因子和该日期对齐
197
207
  unordered_map<Stock, size_t> m_stk_map; // 证券->合成后因子位置索引
@@ -200,12 +210,6 @@ protected:
200
210
  vector<ScoreRecordList> m_stk_factor_by_date;
201
211
  Indicator m_ic;
202
212
 
203
- NormPtr m_norm; // 全局标准化/归一化操作
204
- unordered_map<string, NormPtr> m_special_norms; // 对特定指标执行特定的标准化操作
205
- unordered_map<string, string> m_special_category; // 对特定指标执行行业中性化时指定的板块分类
206
- unordered_map<string, IndicatorList>
207
- m_special_style_inds; // 对特定指标执行风格因子中性化时指定的风格因子
208
-
209
213
  private:
210
214
  std::mutex m_mutex;
211
215
  bool m_calculated{false};
@@ -218,13 +222,13 @@ private:
218
222
  friend class boost::serialization::access;
219
223
  template <class Archive>
220
224
  void save(Archive& ar, const unsigned int version) const {
225
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
221
226
  ar& BOOST_SERIALIZATION_NVP(m_name);
222
227
  ar& BOOST_SERIALIZATION_NVP(m_params);
223
228
  ar& BOOST_SERIALIZATION_NVP(m_inds);
224
229
  ar& BOOST_SERIALIZATION_NVP(m_stks);
225
230
  ar& BOOST_SERIALIZATION_NVP(m_ref_stk);
226
231
  ar& BOOST_SERIALIZATION_NVP(m_query);
227
- ar& BOOST_SERIALIZATION_NVP(m_ref_dates);
228
232
  ar& BOOST_SERIALIZATION_NVP(m_special_norms);
229
233
  ar& BOOST_SERIALIZATION_NVP(m_special_category);
230
234
  // 以下不需要保存,加载后重新计算
@@ -238,13 +242,13 @@ private:
238
242
 
239
243
  template <class Archive>
240
244
  void load(Archive& ar, const unsigned int version) {
245
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
241
246
  ar& BOOST_SERIALIZATION_NVP(m_name);
242
247
  ar& BOOST_SERIALIZATION_NVP(m_params);
243
248
  ar& BOOST_SERIALIZATION_NVP(m_inds);
244
249
  ar& BOOST_SERIALIZATION_NVP(m_stks);
245
250
  ar& BOOST_SERIALIZATION_NVP(m_ref_stk);
246
251
  ar& BOOST_SERIALIZATION_NVP(m_query);
247
- ar& BOOST_SERIALIZATION_NVP(m_ref_dates);
248
252
  ar& BOOST_SERIALIZATION_NVP(m_special_norms);
249
253
  ar& BOOST_SERIALIZATION_NVP(m_special_category);
250
254
  // ar& BOOST_SERIALIZATION_NVP(m_stk_map);
@@ -42,12 +42,13 @@ public:
42
42
 
43
43
  virtual PriceList normalize(const PriceList& data) = 0;
44
44
 
45
- virtual bool isPythonObject() const {
46
- return false;
45
+ bool isPythonObject() const noexcept {
46
+ return m_is_python_object;
47
47
  }
48
48
 
49
49
  protected:
50
50
  string m_name;
51
+ bool m_is_python_object{false};
51
52
 
52
53
  //============================================
53
54
  // 序列化支持
@@ -58,12 +59,14 @@ private:
58
59
  template <class Archive>
59
60
  void save(Archive& ar, const unsigned int version) const {
60
61
  ar& BOOST_SERIALIZATION_NVP(m_name);
62
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
61
63
  ar& BOOST_SERIALIZATION_NVP(m_params);
62
64
  }
63
65
 
64
66
  template <class Archive>
65
67
  void load(Archive& ar, const unsigned int version) {
66
68
  ar& BOOST_SERIALIZATION_NVP(m_name);
69
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
67
70
  ar& BOOST_SERIALIZATION_NVP(m_params);
68
71
  }
69
72
 
@@ -72,7 +75,7 @@ private:
72
75
  };
73
76
 
74
77
  #if HKU_SUPPORT_SERIALIZATION
75
- BOOST_SERIALIZATION_ASSUME_ABSTRACT(MultiFactorBase)
78
+ BOOST_SERIALIZATION_ASSUME_ABSTRACT(NormalizeBase)
76
79
  #endif
77
80
 
78
81
  #if HKU_SUPPORT_SERIALIZATION
@@ -49,13 +49,14 @@ public:
49
49
  public:
50
50
  friend HKU_API ScoresFilterPtr operator|(const ScoresFilterPtr& a, const ScoresFilterPtr& b);
51
51
 
52
- virtual bool isPythonObject() const {
53
- return false;
52
+ bool isPythonObject() const noexcept {
53
+ return m_is_python_object;
54
54
  }
55
55
 
56
56
  protected:
57
57
  string m_name;
58
58
  ScoresFilterPtr m_child;
59
+ bool m_is_python_object{false};
59
60
 
60
61
  //============================================
61
62
  // 序列化支持
@@ -68,6 +69,7 @@ private:
68
69
  ar& BOOST_SERIALIZATION_NVP(m_name);
69
70
  ar& BOOST_SERIALIZATION_NVP(m_params);
70
71
  ar& BOOST_SERIALIZATION_NVP(m_child);
72
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
71
73
  }
72
74
 
73
75
  template <class Archive>
@@ -75,6 +77,7 @@ private:
75
77
  ar& BOOST_SERIALIZATION_NVP(m_name);
76
78
  ar& BOOST_SERIALIZATION_NVP(m_params);
77
79
  ar& BOOST_SERIALIZATION_NVP(m_child);
80
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
78
81
  }
79
82
 
80
83
  BOOST_SERIALIZATION_SPLIT_MEMBER()
@@ -15,7 +15,7 @@ namespace hku {
15
15
  * @param inds 原始因子列表
16
16
  * @param stks 计算证券列表
17
17
  * @param query 日期范围
18
- * @param ref_stk 参考证券
18
+ * @param ref_stk 参考证券, 用于日期对齐, 未指定时为 SH000001
19
19
  * @param ic_n 默认 IC 对应的 N 日收益率
20
20
  * @param spearman 默认使用 spearman 计算相关系数,否则为 pearson
21
21
  * @param mode 获取截面数据时排序模式: 0-降序, 1-升序, 2-不排序
@@ -23,8 +23,8 @@ namespace hku {
23
23
  * @return MultiFactorPtr
24
24
  */
25
25
  MultiFactorPtr HKU_API MF_EqualWeight(const IndicatorList& inds, const StockList& stks,
26
- const KQuery& query, const Stock& ref_stk, int ic_n = 5,
27
- bool spearman = true, int mode = 0,
26
+ const KQuery& query, const Stock& ref_stk = Stock(),
27
+ int ic_n = 5, bool spearman = true, int mode = 0,
28
28
  bool save_all_factors = false);
29
29
 
30
30
  MultiFactorPtr HKU_API MF_EqualWeight();
@@ -16,7 +16,7 @@ namespace hku {
16
16
  * @param inds 原始因子列表
17
17
  * @param stks 计算证券列表
18
18
  * @param query 日期范围
19
- * @param ref_stk 参考证券
19
+ * @param ref_stk 参考证券,用于日期对齐,未指定时为 sh000001
20
20
  * @param ic_n 默认 IC 对应的 N 日收益率
21
21
  * @param ic_rolling_n IC 滚动窗口
22
22
  * @param spearman 默认使用 spearman 计算相关系数,否则为 pearson
@@ -25,9 +25,9 @@ namespace hku {
25
25
  * @return MultiFactorPtr
26
26
  */
27
27
  MultiFactorPtr HKU_API MF_ICIRWeight(const IndicatorList& inds, const StockList& stks,
28
- const KQuery& query, const Stock& ref_stk, int ic_n = 5,
29
- int ic_rolling_n = 120, bool spearman = true, int mode = 0,
30
- bool save_all_factors = false);
28
+ const KQuery& query, const Stock& ref_stk = Stock(),
29
+ int ic_n = 5, int ic_rolling_n = 120, bool spearman = true,
30
+ int mode = 0, bool save_all_factors = false);
31
31
 
32
32
  MultiFactorPtr HKU_API MF_ICIRWeight();
33
33
  } // namespace hku
@@ -16,7 +16,7 @@ namespace hku {
16
16
  * @param inds 原始因子列表
17
17
  * @param stks 计算证券列表
18
18
  * @param query 日期范围
19
- * @param ref_stk 参考证券
19
+ * @param ref_stk 参考证券,用于日期对齐,未指定时为 sh000001
20
20
  * @param ic_n 默认 IC 对应的 N 日收益率
21
21
  * @param ic_rolling_n IC 滚动窗口
22
22
  * @param spearman 默认使用 spearman 计算相关系数,否则为 pearson
@@ -25,9 +25,9 @@ namespace hku {
25
25
  * @return MultiFactorPtr
26
26
  */
27
27
  MultiFactorPtr HKU_API MF_ICWeight(const IndicatorList& inds, const StockList& stks,
28
- const KQuery& query, const Stock& ref_stk, int ic_n = 5,
29
- int ic_rolling_n = 120, bool spearman = true, int mode = 0,
30
- bool save_all_factors = false);
28
+ const KQuery& query, const Stock& ref_stk = Stock(),
29
+ int ic_n = 5, int ic_rolling_n = 120, bool spearman = true,
30
+ int mode = 0, bool save_all_factors = false);
31
31
  MultiFactorPtr HKU_API MF_ICWeight();
32
32
 
33
33
  } // namespace hku
@@ -16,7 +16,7 @@ namespace hku {
16
16
  * @param weights 权重列表
17
17
  * @param stks 计算证券列表
18
18
  * @param query 日期范围
19
- * @param ref_stk 参考证券
19
+ * @param ref_stk 参考证券,用于日期对齐,未指定时为 sh000001
20
20
  * @param ic_n 默认 IC 对应的 N 日收益率
21
21
  * @param spearman 默认使用 spearman 计算相关系数,否则为 pearson
22
22
  * @param mode 获取截面数据时排序模式: 0-降序, 1-升序, 2-不排序
@@ -24,9 +24,9 @@ namespace hku {
24
24
  * @return MultiFactorPtr
25
25
  */
26
26
  MultiFactorPtr HKU_API MF_Weight(const IndicatorList& inds, const PriceList& weights,
27
- const StockList& stks, const KQuery& query, const Stock& ref_stk,
28
- int ic_n = 5, bool spearman = true, int mode = 0,
29
- bool save_all_factors = false);
27
+ const StockList& stks, const KQuery& query,
28
+ const Stock& ref_stk = Stock(), int ic_n = 5, bool spearman = true,
29
+ int mode = 0, bool save_all_factors = false);
30
30
 
31
31
  MultiFactorPtr HKU_API MF_Weight();
32
32
 
@@ -113,8 +113,8 @@ public:
113
113
  */
114
114
  virtual json lastSuggestion() const;
115
115
 
116
- virtual bool isPythonObject() const {
117
- return false;
116
+ bool isPythonObject() const noexcept {
117
+ return m_is_python_object;
118
118
  }
119
119
 
120
120
  private:
@@ -139,6 +139,7 @@ protected:
139
139
 
140
140
  KQuery m_query; // 关联的查询条件
141
141
  bool m_need_calculate; // 是否需要计算标志
142
+ bool m_is_python_object{false};
142
143
 
143
144
  SystemList m_real_sys_list; // 所有实际运行的子系统列表
144
145
 
@@ -160,6 +161,7 @@ private:
160
161
  ar& BOOST_SERIALIZATION_NVP(m_se);
161
162
  ar& BOOST_SERIALIZATION_NVP(m_af);
162
163
  ar& BOOST_SERIALIZATION_NVP(m_query);
164
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
163
165
  }
164
166
 
165
167
  template <class Archive>
@@ -171,6 +173,7 @@ private:
171
173
  ar& BOOST_SERIALIZATION_NVP(m_se);
172
174
  ar& BOOST_SERIALIZATION_NVP(m_af);
173
175
  ar& BOOST_SERIALIZATION_NVP(m_query);
176
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
174
177
  }
175
178
 
176
179
  BOOST_SERIALIZATION_SPLIT_MEMBER()
@@ -82,10 +82,12 @@ public:
82
82
  /** 子类计算接口,由setTO调用 */
83
83
  virtual void _calculate() {}
84
84
 
85
- virtual bool isPythonObject() const {
86
- return false;
85
+ bool isPythonObject() const noexcept {
86
+ return m_is_python_object;
87
87
  }
88
88
 
89
+ bool m_is_python_object{false};
90
+
89
91
  protected:
90
92
  string m_name;
91
93
  KData m_kdata;
@@ -153,6 +153,11 @@ public:
153
153
  return m_mf;
154
154
  }
155
155
 
156
+ void setMF(const MFPtr& mf) {
157
+ m_mf = mf;
158
+ m_calculated = false;
159
+ }
160
+
156
161
  ScoresFilterPtr getScoresFilter() const {
157
162
  return m_sc_filter;
158
163
  }
@@ -163,8 +168,8 @@ public:
163
168
  /** 在已有过滤基础上追加过滤,仅用于 MF 相关的 Selector,从 MF 获取 Score 列表时进行过滤 */
164
169
  void addScoresFilter(const ScoresFilterPtr& filter);
165
170
 
166
- virtual bool isPythonObject() const {
167
- return false;
171
+ bool isPythonObject() const noexcept {
172
+ return m_is_python_object;
168
173
  }
169
174
 
170
175
  private:
@@ -176,6 +181,7 @@ protected:
176
181
 
177
182
  protected:
178
183
  string m_name;
184
+ bool m_is_python_object{false};
179
185
  bool m_calculated{false}; // 是否已计算过
180
186
  bool m_proto_calculated{false};
181
187
  KQuery m_query;
@@ -195,6 +201,7 @@ private:
195
201
  template <class Archive>
196
202
  void save(Archive& ar, const unsigned int version) const {
197
203
  ar& BOOST_SERIALIZATION_NVP(m_name);
204
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
198
205
  ar& BOOST_SERIALIZATION_NVP(m_params);
199
206
  ar& BOOST_SERIALIZATION_NVP(m_pro_sys_list);
200
207
  ar& BOOST_SERIALIZATION_NVP(m_sc_filter);
@@ -204,6 +211,7 @@ private:
204
211
  template <class Archive>
205
212
  void load(Archive& ar, const unsigned int version) {
206
213
  ar& BOOST_SERIALIZATION_NVP(m_name);
214
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
207
215
  ar& BOOST_SERIALIZATION_NVP(m_params);
208
216
  ar& BOOST_SERIALIZATION_NVP(m_pro_sys_list);
209
217
  ar& BOOST_SERIALIZATION_NVP(m_sc_filter);
@@ -280,10 +288,12 @@ inline const SystemList& SelectorBase::getProtoSystemList() const {
280
288
 
281
289
  inline void SelectorBase::setScoresFilter(const ScoresFilterPtr& filter) {
282
290
  m_sc_filter = filter;
291
+ m_calculated = false;
283
292
  }
284
293
 
285
294
  inline void SelectorBase::addScoresFilter(const ScoresFilterPtr& filter) {
286
295
  m_sc_filter = m_sc_filter | filter;
296
+ m_calculated = false;
287
297
  }
288
298
 
289
299
  } /* namespace hku */
@@ -27,7 +27,7 @@ SelectorPtr HKU_API SE_MultiFactor(const MFPtr& mf, int topn = 10);
27
27
  * @param topn 只选取时间截面中前 topn 个系统,小于等于0时代表不限制
28
28
  * @param ic_n ic 对应的 ic_n 日收益率
29
29
  * @param ic_rolling_n 计算滚动 IC (即 IC 的 n 日移动平均)周期
30
- * @param ref_stk 参照对比证券,未指定时,默认使用 sh000300 沪深300指数
30
+ * @param ref_stk 参考证券,用于日期对齐,未指定时为 sh000001
31
31
  * @param spearman 默认使用 spearman 计算相关系数,否则为 pearson
32
32
  * @param mode "MF_ICIRWeight" | "MF_ICWeight" | "MF_EqualWeight" 因子合成算法名称
33
33
  * @return SelectorPtr
@@ -26,7 +26,7 @@ SelectorPtr HKU_API SE_MultiFactor2(const MFPtr& mf,
26
26
  * @param src_inds 原始因子公式
27
27
  * @param ic_n ic 对应的 ic_n 日收益率
28
28
  * @param ic_rolling_n 计算滚动 IC (即 IC 的 n 日移动平均)周期
29
- * @param ref_stk 参照对比证券,未指定时,默认使用 sh000300 沪深300指数
29
+ * @param ref_stk 参考证券,用于日期对齐,未指定时为 sh000001
30
30
  * @param spearman 默认使用 spearman 计算相关系数,否则为 pearson
31
31
  * @param mode "MF_ICIRWeight" | "MF_ICWeight" | "MF_EqualWeight" 因子合成算法名称
32
32
  * @return SelectorPtr
@@ -27,6 +27,7 @@ public:
27
27
  void setIndicators(const IndicatorList& inds) {
28
28
  HKU_ASSERT(!inds.empty());
29
29
  m_inds = inds;
30
+ m_calculated = false;
30
31
  }
31
32
 
32
33
  private:
@@ -27,6 +27,7 @@ public:
27
27
  void setIndicators(const IndicatorList& inds) {
28
28
  HKU_ASSERT(!inds.empty());
29
29
  m_inds = inds;
30
+ m_calculated = false;
30
31
  }
31
32
 
32
33
  private:
@@ -54,8 +54,6 @@ public:
54
54
 
55
55
  private:
56
56
  void _initParams();
57
- void _calculate_single(const vector<std::pair<size_t, size_t>>& train_ranges,
58
- const DatetimeList& dates, size_t test_len, bool trace);
59
57
 
60
58
  void _calculate_parallel(const vector<std::pair<size_t, size_t>>& train_ranges,
61
59
  const DatetimeList& dates, size_t test_len, bool trace);
@@ -27,10 +27,6 @@ public:
27
27
  virtual void _reset() override;
28
28
 
29
29
  private:
30
- void _calculate_single(const vector<std::pair<size_t, size_t>>& train_ranges,
31
- const DatetimeList& dates, const string& key, int mode, size_t test_len,
32
- bool trace);
33
-
34
30
  void _calculate_parallel(const vector<std::pair<size_t, size_t>>& train_ranges,
35
31
  const DatetimeList& dates, const string& key, int mode,
36
32
  size_t test_len, bool trace);
@@ -130,8 +130,8 @@ public:
130
130
  /** 子类计算接口,在setTO中调用 */
131
131
  virtual void _calculate(const KData&) = 0;
132
132
 
133
- virtual bool isPythonObject() const {
134
- return false;
133
+ bool isPythonObject() const noexcept {
134
+ return m_is_python_object;
135
135
  }
136
136
 
137
137
  private:
@@ -140,6 +140,7 @@ private:
140
140
  protected:
141
141
  string m_name;
142
142
  KData m_kdata;
143
+ bool m_is_python_object{false};
143
144
  bool m_calculated{false}; // 仅针对 setTO 时的计算
144
145
 
145
146
  /* 多头持仓 */
@@ -164,6 +165,7 @@ private:
164
165
  void save(Archive& ar, const unsigned int version) const {
165
166
  ar& BOOST_SERIALIZATION_NVP(m_name);
166
167
  ar& BOOST_SERIALIZATION_NVP(m_params);
168
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
167
169
  ar& BOOST_SERIALIZATION_NVP(m_hold_long);
168
170
  ar& BOOST_SERIALIZATION_NVP(m_hold_short);
169
171
  ar& BOOST_SERIALIZATION_NVP(m_buySig);
@@ -177,6 +179,7 @@ private:
177
179
  void load(Archive& ar, const unsigned int version) {
178
180
  ar& BOOST_SERIALIZATION_NVP(m_name);
179
181
  ar& BOOST_SERIALIZATION_NVP(m_params);
182
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
180
183
  ar& BOOST_SERIALIZATION_NVP(m_hold_long);
181
184
  ar& BOOST_SERIALIZATION_NVP(m_hold_short);
182
185
  ar& BOOST_SERIALIZATION_NVP(m_buySig);
@@ -71,13 +71,14 @@ public:
71
71
  /** 子类计算接口,由setTO调用 */
72
72
  virtual void _calculate() = 0;
73
73
 
74
- virtual bool isPythonObject() const {
75
- return false;
74
+ bool isPythonObject() const noexcept {
75
+ return m_is_python_object;
76
76
  }
77
77
 
78
78
  protected:
79
79
  string m_name;
80
80
  KData m_kdata;
81
+ bool m_is_python_object{false};
81
82
 
82
83
  //============================================
83
84
  // 序列化支持
@@ -88,12 +89,14 @@ private:
88
89
  template <class Archive>
89
90
  void save(Archive& ar, const unsigned int version) const {
90
91
  ar& BOOST_SERIALIZATION_NVP(m_name);
92
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
91
93
  ar& BOOST_SERIALIZATION_NVP(m_params);
92
94
  }
93
95
 
94
96
  template <class Archive>
95
97
  void load(Archive& ar, const unsigned int version) {
96
98
  ar& BOOST_SERIALIZATION_NVP(m_name);
99
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
97
100
  ar& BOOST_SERIALIZATION_NVP(m_params);
98
101
  }
99
102
 
@@ -86,11 +86,12 @@ public:
86
86
  /** 子类计算接口,由setTO调用 */
87
87
  virtual void _calculate() = 0;
88
88
 
89
- virtual bool isPythonObject() const {
90
- return false;
89
+ bool isPythonObject() const noexcept {
90
+ return m_is_python_object;
91
91
  }
92
92
 
93
93
  protected:
94
+ bool m_is_python_object{false};
94
95
  string m_name;
95
96
  TradeManagerPtr m_tm;
96
97
  KData m_kdata;
@@ -103,6 +104,7 @@ private:
103
104
  friend class boost::serialization::access;
104
105
  template <class Archive>
105
106
  void save(Archive& ar, const unsigned int version) const {
107
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
106
108
  ar& BOOST_SERIALIZATION_NVP(m_name);
107
109
  ar& BOOST_SERIALIZATION_NVP(m_params);
108
110
  // m_kdata都是系统运行时临时设置,不需要序列化
@@ -111,6 +113,7 @@ private:
111
113
 
112
114
  template <class Archive>
113
115
  void load(Archive& ar, const unsigned int version) {
116
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
114
117
  ar& BOOST_SERIALIZATION_NVP(m_name);
115
118
  ar& BOOST_SERIALIZATION_NVP(m_params);
116
119
  // m_kdata都是系统运行时临时设置,不需要序列化
@@ -276,8 +276,8 @@ public:
276
276
  // 处理延迟买入请求,仅供 PF 调用
277
277
  virtual TradeRecord pfProcessDelayBuyRequest(const Datetime& date);
278
278
 
279
- virtual bool isPythonObject() const {
280
- return false;
279
+ bool isPythonObject() const noexcept {
280
+ return m_is_python_object;
281
281
  }
282
282
 
283
283
  private:
@@ -351,6 +351,7 @@ protected:
351
351
  KData m_kdata;
352
352
  KData m_src_kdata; // 未复权的原始 K 线数据
353
353
 
354
+ bool m_is_python_object{false};
354
355
  bool m_calculated; // 控制是否需要重新计算
355
356
  bool m_pre_ev_valid;
356
357
  bool m_pre_cn_valid;
@@ -393,6 +394,7 @@ private:
393
394
  ar& BOOST_SERIALIZATION_NVP(m_kdata);
394
395
  ar& BOOST_SERIALIZATION_NVP(m_stock);
395
396
 
397
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
396
398
  ar& BOOST_SERIALIZATION_NVP(m_calculated);
397
399
  ar& BOOST_SERIALIZATION_NVP(m_pre_ev_valid);
398
400
  ar& BOOST_SERIALIZATION_NVP(m_pre_cn_valid);
@@ -427,6 +429,7 @@ private:
427
429
  ar& BOOST_SERIALIZATION_NVP(m_kdata);
428
430
  ar& BOOST_SERIALIZATION_NVP(m_stock);
429
431
 
432
+ ar& BOOST_SERIALIZATION_NVP(m_is_python_object);
430
433
  ar& BOOST_SERIALIZATION_NVP(m_calculated);
431
434
  ar& BOOST_SERIALIZATION_NVP(m_pre_ev_valid);
432
435
  ar& BOOST_SERIALIZATION_NVP(m_pre_cn_valid);