aimoon 0.2.1__tar.gz → 0.2.2__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 (617) hide show
  1. aimoon-0.2.2/PKG-INFO +834 -0
  2. aimoon-0.2.2/README.md +810 -0
  3. {aimoon-0.2.1 → aimoon-0.2.2}/pyproject.toml +46 -40
  4. aimoon-0.2.2/src/aimoon/__init__.py +2 -0
  5. aimoon-0.2.2/src/aimoon/adaptive_strategy.py +316 -0
  6. aimoon-0.2.2/src/aimoon/advanced_optimizer.py +504 -0
  7. aimoon-0.2.2/src/aimoon/analysis.py +246 -0
  8. aimoon-0.2.2/src/aimoon/backtest.py +602 -0
  9. aimoon-0.2.2/src/aimoon/backtest_validator.py +352 -0
  10. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/cache.py +62 -53
  11. aimoon-0.2.2/src/aimoon/cache_manager.py +253 -0
  12. aimoon-0.2.2/src/aimoon/charts.py +113 -0
  13. aimoon-0.2.2/src/aimoon/cli.py +714 -0
  14. aimoon-0.2.2/src/aimoon/config.py +141 -0
  15. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/data/__init__.py +12 -7
  16. aimoon-0.2.2/src/aimoon/data/filters.py +642 -0
  17. aimoon-0.2.2/src/aimoon/data/history.py +185 -0
  18. aimoon-0.2.2/src/aimoon/data/mootdx_source.py +90 -0
  19. aimoon-0.2.2/src/aimoon/data/quality.py +54 -0
  20. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/data/spot.py +184 -145
  21. aimoon-0.2.2/src/aimoon/data/validator.py +167 -0
  22. aimoon-0.2.2/src/aimoon/demo.py +99 -0
  23. aimoon-0.2.2/src/aimoon/dependency_injection.py +112 -0
  24. aimoon-0.2.2/src/aimoon/engine_comparison.py +240 -0
  25. aimoon-0.2.2/src/aimoon/enhanced_backtest.py +1651 -0
  26. aimoon-0.2.2/src/aimoon/evaluate_strategy.py +381 -0
  27. aimoon-0.2.2/src/aimoon/factor_combination.py +311 -0
  28. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/factor_eval.py +212 -209
  29. aimoon-0.2.2/src/aimoon/factors/__init__.py +41 -0
  30. aimoon-0.2.2/src/aimoon/factors/base.py +206 -0
  31. aimoon-0.2.2/src/aimoon/factors/panel.py +91 -0
  32. aimoon-0.2.2/src/aimoon/factors/registry.py +323 -0
  33. aimoon-0.2.2/src/aimoon/factors/scorer.py +152 -0
  34. aimoon-0.2.2/src/aimoon/factors/zoo/__init__.py +0 -0
  35. aimoon-0.2.2/src/aimoon/factors/zoo/academic/__init__.py +0 -0
  36. aimoon-0.2.2/src/aimoon/factors/zoo/academic/carhart_mom.py +60 -0
  37. aimoon-0.2.2/src/aimoon/factors/zoo/academic/cma.py +62 -0
  38. aimoon-0.2.2/src/aimoon/factors/zoo/academic/hml.py +61 -0
  39. aimoon-0.2.2/src/aimoon/factors/zoo/academic/mkt_rf.py +54 -0
  40. aimoon-0.2.2/src/aimoon/factors/zoo/academic/rmw.py +55 -0
  41. aimoon-0.2.2/src/aimoon/factors/zoo/academic/smb.py +56 -0
  42. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/__init__.py +0 -0
  43. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_001.py +45 -0
  44. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_002.py +44 -0
  45. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_003.py +41 -0
  46. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_004.py +40 -0
  47. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_005.py +47 -0
  48. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_006.py +40 -0
  49. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_007.py +78 -0
  50. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_008.py +56 -0
  51. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_009.py +71 -0
  52. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_010.py +73 -0
  53. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_011.py +45 -0
  54. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_012.py +41 -0
  55. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_013.py +41 -0
  56. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_014.py +44 -0
  57. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_015.py +47 -0
  58. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_016.py +41 -0
  59. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_017.py +49 -0
  60. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_018.py +43 -0
  61. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_019.py +58 -0
  62. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_020.py +52 -0
  63. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_021.py +94 -0
  64. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_022.py +44 -0
  65. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_023.py +74 -0
  66. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_024.py +87 -0
  67. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_025.py +44 -0
  68. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_026.py +42 -0
  69. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_027.py +82 -0
  70. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_028.py +45 -0
  71. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_029.py +73 -0
  72. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_030.py +61 -0
  73. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_031.py +55 -0
  74. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_032.py +57 -0
  75. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_033.py +41 -0
  76. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_034.py +46 -0
  77. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_035.py +47 -0
  78. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_036.py +65 -0
  79. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_037.py +49 -0
  80. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_038.py +42 -0
  81. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_039.py +53 -0
  82. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_040.py +42 -0
  83. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_041.py +37 -0
  84. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_042.py +41 -0
  85. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_043.py +44 -0
  86. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_044.py +41 -0
  87. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_045.py +59 -0
  88. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_046.py +82 -0
  89. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_047.py +67 -0
  90. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_048.py +91 -0
  91. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_049.py +78 -0
  92. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_050.py +42 -0
  93. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_051.py +78 -0
  94. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_052.py +62 -0
  95. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_053.py +43 -0
  96. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_054.py +44 -0
  97. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_055.py +47 -0
  98. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_056.py +57 -0
  99. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_057.py +43 -0
  100. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_058.py +75 -0
  101. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_059.py +76 -0
  102. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_060.py +46 -0
  103. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_061.py +46 -0
  104. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_062.py +55 -0
  105. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_063.py +89 -0
  106. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_064.py +57 -0
  107. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_065.py +54 -0
  108. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_066.py +50 -0
  109. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_067.py +84 -0
  110. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_068.py +50 -0
  111. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_069.py +83 -0
  112. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_070.py +82 -0
  113. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_071.py +55 -0
  114. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_072.py +50 -0
  115. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_073.py +53 -0
  116. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_074.py +54 -0
  117. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_075.py +47 -0
  118. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_076.py +85 -0
  119. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_077.py +52 -0
  120. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_078.py +53 -0
  121. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_079.py +84 -0
  122. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_080.py +90 -0
  123. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_081.py +63 -0
  124. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_082.py +83 -0
  125. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_083.py +61 -0
  126. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_084.py +49 -0
  127. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_085.py +49 -0
  128. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_086.py +54 -0
  129. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_087.py +85 -0
  130. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_088.py +53 -0
  131. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_089.py +82 -0
  132. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_090.py +81 -0
  133. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_091.py +84 -0
  134. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_092.py +54 -0
  135. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_093.py +84 -0
  136. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_094.py +47 -0
  137. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_095.py +58 -0
  138. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_096.py +55 -0
  139. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_097.py +86 -0
  140. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_098.py +56 -0
  141. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_099.py +52 -0
  142. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_100.py +84 -0
  143. aimoon-0.2.2/src/aimoon/factors/zoo/alpha101/alpha_101.py +42 -0
  144. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/__init__.py +0 -0
  145. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_001.py +39 -0
  146. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_002.py +35 -0
  147. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_003.py +39 -0
  148. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_004.py +44 -0
  149. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_005.py +34 -0
  150. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_006.py +35 -0
  151. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_007.py +38 -0
  152. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_008.py +37 -0
  153. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_009.py +36 -0
  154. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_010.py +40 -0
  155. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_011.py +35 -0
  156. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_012.py +36 -0
  157. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_013.py +36 -0
  158. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_014.py +30 -0
  159. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_015.py +33 -0
  160. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_016.py +35 -0
  161. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_017.py +44 -0
  162. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_018.py +31 -0
  163. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_019.py +45 -0
  164. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_020.py +32 -0
  165. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_021.py +42 -0
  166. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_022.py +35 -0
  167. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_023.py +39 -0
  168. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_024.py +31 -0
  169. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_025.py +43 -0
  170. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_026.py +37 -0
  171. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_027.py +34 -0
  172. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_028.py +40 -0
  173. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_029.py +32 -0
  174. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_030.py +34 -0
  175. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_031.py +33 -0
  176. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_032.py +34 -0
  177. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_033.py +43 -0
  178. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_034.py +32 -0
  179. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_035.py +41 -0
  180. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_036.py +35 -0
  181. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_037.py +36 -0
  182. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_038.py +34 -0
  183. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_039.py +43 -0
  184. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_040.py +36 -0
  185. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_041.py +35 -0
  186. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_042.py +34 -0
  187. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_043.py +30 -0
  188. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_044.py +40 -0
  189. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_045.py +39 -0
  190. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_046.py +33 -0
  191. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_047.py +38 -0
  192. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_048.py +42 -0
  193. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_049.py +47 -0
  194. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_050.py +48 -0
  195. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_051.py +47 -0
  196. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_052.py +43 -0
  197. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_053.py +28 -0
  198. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_054.py +34 -0
  199. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_055.py +48 -0
  200. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_056.py +42 -0
  201. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_057.py +38 -0
  202. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_058.py +28 -0
  203. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_059.py +39 -0
  204. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_060.py +35 -0
  205. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_061.py +43 -0
  206. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_062.py +31 -0
  207. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_063.py +36 -0
  208. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_064.py +44 -0
  209. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_065.py +32 -0
  210. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_066.py +33 -0
  211. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_067.py +36 -0
  212. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_068.py +36 -0
  213. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_069.py +56 -0
  214. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_070.py +30 -0
  215. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_071.py +33 -0
  216. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_072.py +38 -0
  217. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_073.py +41 -0
  218. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_074.py +40 -0
  219. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_075.py +43 -0
  220. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_076.py +35 -0
  221. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_077.py +42 -0
  222. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_078.py +37 -0
  223. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_079.py +34 -0
  224. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_080.py +32 -0
  225. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_081.py +26 -0
  226. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_082.py +38 -0
  227. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_083.py +31 -0
  228. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_084.py +30 -0
  229. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_085.py +36 -0
  230. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_086.py +37 -0
  231. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_087.py +43 -0
  232. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_088.py +32 -0
  233. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_089.py +31 -0
  234. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_090.py +34 -0
  235. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_091.py +36 -0
  236. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_092.py +45 -0
  237. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_093.py +36 -0
  238. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_094.py +30 -0
  239. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_095.py +30 -0
  240. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_096.py +36 -0
  241. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_097.py +30 -0
  242. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_098.py +38 -0
  243. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_099.py +31 -0
  244. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_100.py +30 -0
  245. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_101.py +48 -0
  246. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_102.py +50 -0
  247. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_103.py +43 -0
  248. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_104.py +48 -0
  249. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_105.py +44 -0
  250. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_106.py +42 -0
  251. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_107.py +45 -0
  252. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_108.py +60 -0
  253. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_109.py +51 -0
  254. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_110.py +47 -0
  255. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_111.py +51 -0
  256. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_112.py +45 -0
  257. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_113.py +47 -0
  258. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_114.py +52 -0
  259. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_115.py +57 -0
  260. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_116.py +53 -0
  261. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_117.py +47 -0
  262. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_118.py +44 -0
  263. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_119.py +54 -0
  264. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_120.py +46 -0
  265. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_121.py +59 -0
  266. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_122.py +50 -0
  267. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_123.py +48 -0
  268. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_124.py +48 -0
  269. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_125.py +53 -0
  270. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_126.py +40 -0
  271. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_127.py +45 -0
  272. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_128.py +50 -0
  273. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_129.py +39 -0
  274. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_130.py +53 -0
  275. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_131.py +59 -0
  276. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_132.py +42 -0
  277. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_133.py +44 -0
  278. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_134.py +43 -0
  279. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_135.py +48 -0
  280. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_136.py +48 -0
  281. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_137.py +71 -0
  282. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_138.py +54 -0
  283. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_139.py +43 -0
  284. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_140.py +60 -0
  285. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_141.py +45 -0
  286. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_142.py +50 -0
  287. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_143.py +44 -0
  288. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_144.py +48 -0
  289. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_145.py +43 -0
  290. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_146.py +54 -0
  291. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_147.py +55 -0
  292. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_148.py +48 -0
  293. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_149.py +69 -0
  294. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_150.py +41 -0
  295. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_151.py +43 -0
  296. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_152.py +51 -0
  297. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_153.py +42 -0
  298. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_154.py +49 -0
  299. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_155.py +44 -0
  300. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_156.py +60 -0
  301. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_157.py +55 -0
  302. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_158.py +50 -0
  303. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_159.py +72 -0
  304. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_160.py +48 -0
  305. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_161.py +53 -0
  306. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_162.py +51 -0
  307. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_163.py +50 -0
  308. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_164.py +60 -0
  309. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_165.py +48 -0
  310. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_166.py +47 -0
  311. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_167.py +38 -0
  312. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_168.py +43 -0
  313. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_169.py +48 -0
  314. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_170.py +57 -0
  315. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_171.py +45 -0
  316. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_172.py +63 -0
  317. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_173.py +48 -0
  318. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_174.py +48 -0
  319. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_175.py +53 -0
  320. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_176.py +52 -0
  321. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_177.py +42 -0
  322. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_178.py +43 -0
  323. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_179.py +48 -0
  324. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_180.py +50 -0
  325. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_181.py +64 -0
  326. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_182.py +58 -0
  327. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_183.py +48 -0
  328. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_184.py +46 -0
  329. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_185.py +44 -0
  330. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_186.py +64 -0
  331. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_187.py +48 -0
  332. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_188.py +50 -0
  333. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_189.py +42 -0
  334. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_190.py +55 -0
  335. aimoon-0.2.2/src/aimoon/factors/zoo/gtja191/alpha_191.py +46 -0
  336. aimoon-0.2.2/src/aimoon/factors/zoo/proprietary/__init__.py +21 -0
  337. aimoon-0.2.2/src/aimoon/factors/zoo/proprietary/advanced_tech.py +156 -0
  338. aimoon-0.2.2/src/aimoon/factors/zoo/proprietary/alternative.py +94 -0
  339. aimoon-0.2.2/src/aimoon/factors/zoo/proprietary/microstructure.py +84 -0
  340. aimoon-0.2.2/src/aimoon/factors/zoo/proprietary/northbound.py +81 -0
  341. aimoon-0.2.2/src/aimoon/factors/zoo/proprietary/sector_rotation.py +86 -0
  342. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/__init__.py +0 -0
  343. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/beta10.py +26 -0
  344. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/beta20.py +26 -0
  345. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/beta30.py +26 -0
  346. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/beta5.py +26 -0
  347. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/beta60.py +26 -0
  348. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntd10.py +28 -0
  349. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntd20.py +28 -0
  350. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntd30.py +28 -0
  351. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntd5.py +28 -0
  352. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntd60.py +28 -0
  353. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntn10.py +25 -0
  354. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntn20.py +25 -0
  355. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntn30.py +25 -0
  356. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntn5.py +25 -0
  357. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntn60.py +25 -0
  358. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntp10.py +25 -0
  359. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntp20.py +25 -0
  360. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntp30.py +25 -0
  361. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntp5.py +25 -0
  362. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cntp60.py +25 -0
  363. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cord10.py +31 -0
  364. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cord20.py +31 -0
  365. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cord30.py +31 -0
  366. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cord5.py +31 -0
  367. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/cord60.py +31 -0
  368. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/corr10.py +29 -0
  369. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/corr20.py +29 -0
  370. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/corr30.py +29 -0
  371. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/corr5.py +29 -0
  372. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/corr60.py +29 -0
  373. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imax10.py +26 -0
  374. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imax20.py +26 -0
  375. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imax30.py +26 -0
  376. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imax5.py +26 -0
  377. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imax60.py +26 -0
  378. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imin10.py +26 -0
  379. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imin20.py +26 -0
  380. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imin30.py +26 -0
  381. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imin5.py +26 -0
  382. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imin60.py +26 -0
  383. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imxd10.py +27 -0
  384. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imxd20.py +27 -0
  385. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imxd30.py +27 -0
  386. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imxd5.py +27 -0
  387. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/imxd60.py +27 -0
  388. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/klen.py +28 -0
  389. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/klow.py +29 -0
  390. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/klow2.py +30 -0
  391. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/kmid.py +27 -0
  392. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/kmid2.py +29 -0
  393. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/ksft.py +29 -0
  394. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/ksft2.py +29 -0
  395. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/kup.py +29 -0
  396. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/kup2.py +30 -0
  397. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/ma10.py +26 -0
  398. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/ma20.py +26 -0
  399. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/ma30.py +26 -0
  400. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/ma5.py +26 -0
  401. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/ma60.py +26 -0
  402. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/max10.py +27 -0
  403. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/max20.py +27 -0
  404. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/max30.py +27 -0
  405. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/max5.py +27 -0
  406. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/max60.py +27 -0
  407. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/min10.py +27 -0
  408. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/min20.py +27 -0
  409. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/min30.py +27 -0
  410. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/min5.py +27 -0
  411. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/min60.py +27 -0
  412. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtld10.py +27 -0
  413. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtld20.py +27 -0
  414. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtld30.py +27 -0
  415. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtld5.py +27 -0
  416. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtld60.py +27 -0
  417. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtlu10.py +27 -0
  418. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtlu20.py +27 -0
  419. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtlu30.py +27 -0
  420. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtlu5.py +27 -0
  421. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/qtlu60.py +27 -0
  422. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rank10.py +26 -0
  423. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rank20.py +26 -0
  424. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rank30.py +26 -0
  425. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rank5.py +26 -0
  426. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rank60.py +26 -0
  427. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/resi10.py +26 -0
  428. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/resi20.py +26 -0
  429. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/resi30.py +26 -0
  430. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/resi5.py +26 -0
  431. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/resi60.py +26 -0
  432. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/roc10.py +26 -0
  433. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/roc20.py +26 -0
  434. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/roc30.py +26 -0
  435. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/roc5.py +26 -0
  436. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/roc60.py +26 -0
  437. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsqr10.py +34 -0
  438. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsqr20.py +34 -0
  439. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsqr30.py +34 -0
  440. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsqr5.py +34 -0
  441. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsqr60.py +34 -0
  442. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsv10.py +30 -0
  443. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsv20.py +30 -0
  444. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsv30.py +30 -0
  445. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsv5.py +30 -0
  446. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/rsv60.py +30 -0
  447. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/std10.py +26 -0
  448. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/std20.py +26 -0
  449. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/std30.py +26 -0
  450. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/std5.py +26 -0
  451. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/std60.py +26 -0
  452. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumd10.py +33 -0
  453. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumd20.py +33 -0
  454. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumd30.py +33 -0
  455. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumd5.py +33 -0
  456. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumd60.py +33 -0
  457. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumn10.py +31 -0
  458. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumn20.py +31 -0
  459. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumn30.py +31 -0
  460. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumn5.py +31 -0
  461. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sumn60.py +31 -0
  462. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sump10.py +31 -0
  463. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sump20.py +31 -0
  464. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sump30.py +31 -0
  465. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sump5.py +31 -0
  466. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/sump60.py +31 -0
  467. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vma10.py +26 -0
  468. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vma20.py +26 -0
  469. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vma30.py +26 -0
  470. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vma5.py +26 -0
  471. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vma60.py +26 -0
  472. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vstd10.py +26 -0
  473. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vstd20.py +26 -0
  474. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vstd30.py +26 -0
  475. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vstd5.py +26 -0
  476. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vstd60.py +26 -0
  477. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumd10.py +33 -0
  478. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumd20.py +33 -0
  479. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumd30.py +33 -0
  480. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumd5.py +33 -0
  481. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumd60.py +33 -0
  482. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumn10.py +31 -0
  483. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumn20.py +31 -0
  484. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumn30.py +31 -0
  485. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumn5.py +31 -0
  486. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsumn60.py +31 -0
  487. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsump10.py +31 -0
  488. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsump20.py +31 -0
  489. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsump30.py +31 -0
  490. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsump5.py +31 -0
  491. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/vsump60.py +31 -0
  492. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/wvma10.py +30 -0
  493. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/wvma20.py +30 -0
  494. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/wvma30.py +30 -0
  495. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/wvma5.py +30 -0
  496. aimoon-0.2.2/src/aimoon/factors/zoo/qlib158/wvma60.py +30 -0
  497. aimoon-0.2.2/src/aimoon/factors/zoo/vwap.py +260 -0
  498. aimoon-0.2.2/src/aimoon/indicators/__init__.py +3 -0
  499. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/indicators/technical.py +463 -448
  500. aimoon-0.2.2/src/aimoon/live_trading_validator.py +339 -0
  501. aimoon-0.2.2/src/aimoon/ml/__init__.py +1 -0
  502. aimoon-0.2.2/src/aimoon/ml/_training_commons.py +144 -0
  503. aimoon-0.2.2/src/aimoon/ml/adaptive_system.py +568 -0
  504. aimoon-0.2.2/src/aimoon/ml/alpha360.py +131 -0
  505. aimoon-0.2.2/src/aimoon/ml/data_handler.py +202 -0
  506. aimoon-0.2.2/src/aimoon/ml/ensemble.py +387 -0
  507. aimoon-0.2.2/src/aimoon/ml/factor_decay.py +246 -0
  508. aimoon-0.2.2/src/aimoon/ml/feature_pipeline.py +322 -0
  509. aimoon-0.2.2/src/aimoon/ml/icir_weighter.py +224 -0
  510. aimoon-0.2.2/src/aimoon/ml/label_engine.py +215 -0
  511. aimoon-0.2.2/src/aimoon/ml/lgbm_trainer.py +283 -0
  512. aimoon-0.2.2/src/aimoon/ml/model_base.py +271 -0
  513. aimoon-0.2.2/src/aimoon/ml/optimized_config.py +150 -0
  514. aimoon-0.2.2/src/aimoon/ml/predictor.py +125 -0
  515. aimoon-0.2.2/src/aimoon/ml/purged_tscv.py +363 -0
  516. aimoon-0.2.2/src/aimoon/ml/slippage_model.py +390 -0
  517. aimoon-0.2.2/src/aimoon/ml/trainer.py +562 -0
  518. aimoon-0.2.2/src/aimoon/ml/walk_forward.py +283 -0
  519. aimoon-0.2.2/src/aimoon/models.py +75 -0
  520. aimoon-0.2.2/src/aimoon/optimizer.py +244 -0
  521. aimoon-0.2.2/src/aimoon/output.py +610 -0
  522. aimoon-0.2.2/src/aimoon/paper_trading.py +564 -0
  523. aimoon-0.2.2/src/aimoon/paper_trading_demo.py +279 -0
  524. aimoon-0.2.2/src/aimoon/paper_trading_example.py +204 -0
  525. aimoon-0.2.2/src/aimoon/performance.py +498 -0
  526. aimoon-0.2.2/src/aimoon/portfolio/__init__.py +17 -0
  527. aimoon-0.2.2/src/aimoon/portfolio/optimizer.py +325 -0
  528. aimoon-0.2.2/src/aimoon/regime.py +110 -0
  529. aimoon-0.2.2/src/aimoon/regime_enhanced.py +350 -0
  530. aimoon-0.2.2/src/aimoon/regime_ml.py +276 -0
  531. aimoon-0.2.2/src/aimoon/research.py +337 -0
  532. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/result.py +46 -43
  533. aimoon-0.2.2/src/aimoon/risk.py +101 -0
  534. aimoon-0.2.2/src/aimoon/rumi_optimizer.py +340 -0
  535. aimoon-0.2.2/src/aimoon/rumi_strategy.py +439 -0
  536. aimoon-0.2.2/src/aimoon/run_paper_trading.py +323 -0
  537. aimoon-0.2.2/src/aimoon/scoring/__init__.py +196 -0
  538. aimoon-0.2.2/src/aimoon/scoring/adaptive_weight.py +175 -0
  539. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/bollinger.py +5 -3
  540. aimoon-0.2.2/src/aimoon/scoring/combiner.py +166 -0
  541. aimoon-0.2.2/src/aimoon/scoring/fundamentals.py +55 -0
  542. aimoon-0.2.2/src/aimoon/scoring/hybrid_scorer.py +287 -0
  543. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/kdj.py +2 -0
  544. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/macd.py +2 -0
  545. aimoon-0.2.2/src/aimoon/scoring/mean_reversion.py +175 -0
  546. aimoon-0.2.2/src/aimoon/scoring/momentum.py +111 -0
  547. aimoon-0.2.2/src/aimoon/scoring/momentum_ext.py +97 -0
  548. aimoon-0.2.2/src/aimoon/scoring/reversal.py +98 -0
  549. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/rps.py +23 -8
  550. aimoon-0.2.2/src/aimoon/scoring/rsi.py +36 -0
  551. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/sector.py +6 -1
  552. aimoon-0.2.2/src/aimoon/scoring/service.py +155 -0
  553. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/trend.py +2 -0
  554. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/trend_ext.py +113 -102
  555. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/scoring/volume.py +7 -4
  556. aimoon-0.2.2/src/aimoon/screener.py +378 -0
  557. aimoon-0.2.2/src/aimoon/self_learning.py +161 -0
  558. aimoon-0.2.2/src/aimoon/start_paper_trading.py +132 -0
  559. aimoon-0.2.2/src/aimoon/validation.py +348 -0
  560. aimoon-0.2.2/src/aimoon/watchlist.py +159 -0
  561. aimoon-0.2.2/src/aimoon/zipline_adapter.py +245 -0
  562. aimoon-0.2.2/src/aimoon/zipline_data.py +176 -0
  563. aimoon-0.2.2/src/aimoon/zipline_runner.py +213 -0
  564. aimoon-0.2.2/src/aimoon.egg-info/PKG-INFO +834 -0
  565. aimoon-0.2.2/src/aimoon.egg-info/SOURCES.txt +594 -0
  566. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon.egg-info/requires.txt +6 -0
  567. aimoon-0.2.2/tests/test_alpha360.py +67 -0
  568. aimoon-0.2.2/tests/test_backtest_position.py +354 -0
  569. aimoon-0.2.2/tests/test_charts.py +59 -0
  570. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_cli.py +30 -30
  571. aimoon-0.2.2/tests/test_enhanced_backtest.py +60 -0
  572. aimoon-0.2.2/tests/test_ensemble.py +52 -0
  573. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_filters.py +4 -1
  574. aimoon-0.2.2/tests/test_fundamentals.py +65 -0
  575. aimoon-0.2.2/tests/test_lgbm_trainer.py +30 -0
  576. aimoon-0.2.2/tests/test_ml_features.py +56 -0
  577. aimoon-0.2.2/tests/test_ml_labels.py +59 -0
  578. aimoon-0.2.2/tests/test_ml_predictor.py +54 -0
  579. aimoon-0.2.2/tests/test_ml_trainer.py +82 -0
  580. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_models.py +23 -14
  581. aimoon-0.2.2/tests/test_optimizer.py +87 -0
  582. aimoon-0.2.2/tests/test_regime.py +59 -0
  583. aimoon-0.2.2/tests/test_risk.py +95 -0
  584. aimoon-0.2.2/tests/test_score_rsi.py +53 -0
  585. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_screener.py +40 -32
  586. aimoon-0.2.1/PKG-INFO +0 -336
  587. aimoon-0.2.1/README.md +0 -318
  588. aimoon-0.2.1/src/aimoon/__init__.py +0 -7
  589. aimoon-0.2.1/src/aimoon/backtest.py +0 -316
  590. aimoon-0.2.1/src/aimoon/cli.py +0 -213
  591. aimoon-0.2.1/src/aimoon/config.py +0 -96
  592. aimoon-0.2.1/src/aimoon/data/filters.py +0 -380
  593. aimoon-0.2.1/src/aimoon/data/history.py +0 -73
  594. aimoon-0.2.1/src/aimoon/demo.py +0 -64
  595. aimoon-0.2.1/src/aimoon/indicators/__init__.py +0 -3
  596. aimoon-0.2.1/src/aimoon/models.py +0 -43
  597. aimoon-0.2.1/src/aimoon/output.py +0 -152
  598. aimoon-0.2.1/src/aimoon/scoring/__init__.py +0 -35
  599. aimoon-0.2.1/src/aimoon/scoring/combiner.py +0 -120
  600. aimoon-0.2.1/src/aimoon/scoring/momentum.py +0 -38
  601. aimoon-0.2.1/src/aimoon/scoring/momentum_ext.py +0 -117
  602. aimoon-0.2.1/src/aimoon/scoring/rsi.py +0 -20
  603. aimoon-0.2.1/src/aimoon/screener.py +0 -88
  604. aimoon-0.2.1/src/aimoon.egg-info/PKG-INFO +0 -336
  605. aimoon-0.2.1/src/aimoon.egg-info/SOURCES.txt +0 -50
  606. aimoon-0.2.1/tests/test_score_rsi.py +0 -31
  607. {aimoon-0.2.1 → aimoon-0.2.2}/setup.cfg +0 -0
  608. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon/__main__.py +0 -0
  609. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon.egg-info/dependency_links.txt +0 -0
  610. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon.egg-info/entry_points.txt +0 -0
  611. {aimoon-0.2.1 → aimoon-0.2.2}/src/aimoon.egg-info/top_level.txt +0 -0
  612. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_backtest.py +0 -0
  613. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_formatter.py +0 -0
  614. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_momentum_ext.py +0 -0
  615. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_portfolio_backtest.py +0 -0
  616. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_rps.py +0 -0
  617. {aimoon-0.2.1 → aimoon-0.2.2}/tests/test_trend_ext.py +0 -0
aimoon-0.2.2/PKG-INFO ADDED
@@ -0,0 +1,834 @@
1
+ Metadata-Version: 2.4
2
+ Name: aimoon
3
+ Version: 0.2.2
4
+ Summary: A股量化筛选与交易建议系统 — ML集成排名 + Alpha Zoo 452因子 + 统一回测评分 + 交易策略引擎
5
+ Author: iloat
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/iloat20/aimoon
8
+ Project-URL: Repository, https://github.com/iloat20/aimoon
9
+ Requires-Python: >=3.12
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: akshare>=1.14
12
+ Requires-Dist: mootdx>=0.9
13
+ Requires-Dist: pandas>=2.0
14
+ Requires-Dist: numpy>=1.26
15
+ Requires-Dist: tabulate>=0.9
16
+ Requires-Dist: colorama>=0.4
17
+ Requires-Dist: rich>=13.0
18
+ Requires-Dist: pyyaml>=6.0
19
+ Requires-Dist: matplotlib>=3.8
20
+ Requires-Dist: scipy>=1.11
21
+ Requires-Dist: xgboost>=2.0
22
+ Requires-Dist: scikit-learn>=1.3
23
+ Requires-Dist: lightgbm>=4.0
24
+
25
+ # aimoon
26
+
27
+ A股量化筛选与交易建议系统 — 纯 ML 排名 + XGBoost/LightGBM 集成 + Alpha Zoo 452 因子 + 交易策略引擎。
28
+
29
+ ---
30
+
31
+ ## 快速开始
32
+
33
+ ```bash
34
+ git clone https://github.com/iloat20/aimoon.git
35
+ cd aimoon
36
+ pip install -e .
37
+
38
+ # 首次运行:训练模型 + 筛选
39
+ aimoon train-model # 训练 XGBoost + LightGBM 集成模型
40
+ aimoon # 筛选全市场(ML 排名)
41
+
42
+ # 回测
43
+ aimoon backtest
44
+ ```
45
+
46
+ ---
47
+
48
+ ## 核心命令
49
+
50
+ ### 1. 筛选 — `aimoon`
51
+
52
+ ```bash
53
+ aimoon # 默认筛选(ML 排名)
54
+ aimoon --demo # Demo 模式(使用持仓池真实股票代码)
55
+ aimoon --top 10 # 前10名
56
+ aimoon --no-alpha # 禁用 Alpha Zoo 因子
57
+ ```
58
+
59
+ 筛选流程:
60
+ 1. 机构持仓池过滤(北向>=1亿 + 基金>=5% + ROE>10% + PE<26 + 股息率>1.5%)
61
+ 2. **合并自选股票**(自选股票不受机构持仓条件限制)
62
+ 3. 452 个 Alpha Zoo 截面因子 → 行业/市值中性化 → 百分位 → z-score
63
+ 4. Alpha360 时序特征(60天 OHLCV 展平为 360 个特征)
64
+ 5. **XGBoost + LightGBM 集成预测** → 百分位排名 (0-100分)
65
+ 6. 自学习:ICIR 动态因子加权 + 因子衰减检测 + 集成权重自适应
66
+ 7. 输出排名 + CSV(含止损/止盈价)+ Markdown(含交易策略)
67
+
68
+ ### 2. 训练模型 — `aimoon train-model`
69
+
70
+ ```bash
71
+ aimoon train-model # 增量训练(warm_start)
72
+ aimoon train-model --force # 强制全量重训练
73
+ ```
74
+
75
+ 训练管线:
76
+ - 200 个历史快照(分层采样,覆盖 1 年以上)
77
+ - 排名标签(stationary,消除市场整体涨跌影响)
78
+ - Purged TimeSeriesSplit(5 折,forward_days 间隔防前瞻偏差)
79
+ - XGBoost + LightGBM 并行训练,IC 加权集成
80
+ - **强正则化防过拟合**:max_depth=3, min_child_weight=50, lr=0.01, gamma=1.0
81
+ - **稳定性特征选择**:IC≥0.01, top_k=40,仅保留跨时间一致的特征
82
+ - **自动退化检测**:过拟合比>5.0 时自动丢弃 warm-start 重训
83
+ - 增量学习(warm_start),避免每次全量重训练
84
+
85
+ ### 3. 回测 — `aimoon backtest`
86
+
87
+ ```bash
88
+ aimoon backtest # 默认回测
89
+ aimoon backtest --walk-forward # Walk-Forward 验证
90
+ ```
91
+
92
+ 回测与实盘使用**完全一致的评分系统**:ML 集成(Alpha360 特征)+ Alpha Zoo(ICIR 动态权重 + 因子衰减)+ 技术指标 → hybrid_score()。
93
+
94
+ ---
95
+
96
+ ## Demo 模式
97
+
98
+ ```bash
99
+ aimoon --demo # 快速体验(无需训练模型)
100
+ ```
101
+
102
+ Demo 模式使用**持仓池真实股票代码**,但跳过模型训练,使用简化评分。适合快速体验和调试。
103
+
104
+ ### Demo 特点
105
+
106
+ - ✅ 使用持仓池真实股票代码(来自机构持仓)
107
+ - ✅ 实时获取真实股票行情数据
108
+ - ✅ 获取真实历史K线数据
109
+ - ✅ 跳过 ML 模型训练,使用简化评分
110
+ - ✅ 适合快速验证系统功能
111
+
112
+ ---
113
+
114
+ ## 命令行参数
115
+
116
+ ### 全局参数
117
+
118
+ ```bash
119
+ aimoon --help # 查看所有可用命令
120
+ aimoon --config FILE # 使用自定义配置文件
121
+ aimoon --top N # 筛选前 N 只股票(默认 20)
122
+ aimoon --workers N # 并行工作线程数(默认 20)
123
+ aimoon --no-csv # 禁用 CSV 导出
124
+ aimoon --demo # 使用 Demo 模式
125
+ aimoon --refresh # 强制刷新缓存
126
+ ```
127
+
128
+ ### Demo 参数
129
+
130
+ ```bash
131
+ aimoon --demo # 使用持仓池真实股票代码
132
+ aimoon --demo --top 10 # 只显示前 10 只
133
+ aimoon --demo --no-csv # 不导出 CSV
134
+ ```
135
+
136
+ ### 回测参数
137
+
138
+ ```bash
139
+ aimoon backtest --stocks CODE1,CODE2 # 指定股票(逗号分隔)
140
+ aimoon backtest --hold-days 20 # 持仓天数
141
+ aimoon backtest --max-positions 5 # 最大持仓数
142
+ aimoon backtest --commission 0.0003 # 佣金率
143
+ aimoon backtest --slippage 0.001 # 滑点
144
+ aimoon backtest --stop-loss 0.04 # 止损比例
145
+ aimoon backtest --take-profit 0.15 # 止盈比例
146
+ aimoon backtest --benchmark 000300 # 基准代码
147
+ aimoon backtest --walk-forward # Walk-Forward 验证
148
+ ```
149
+
150
+ ---
151
+
152
+ ## 快速体验
153
+
154
+ ### 1. 首次运行(最快)
155
+
156
+ ```bash
157
+ # 安装依赖
158
+ pip install -e .
159
+
160
+ # 使用 Demo 模式快速体验(无需训练模型)
161
+ aimoon --demo
162
+
163
+ # 输出示例:
164
+ # ┌─────┬─────────┬───────────┬─────────┬──────────┬───────┬────────────┬───────┐
165
+ # │ No. │ Code │ Name │ Price │ Chg% │ Score │ Suggestion │ Conf. │
166
+ # ├─────┼─────────┼───────────┼─────────┼──────────┼───────┼────────────┼───────┤
167
+ # │ 1 │ 002541 │ 鸿路钢构 │ 18.70 │ +0.00 │ 25 │ 谨慎 │ 中 │
168
+ # │ 2 │ 000975 │ 山金国际 │ 22.46 │ +0.00 │ 16 │ 建议卖出 │ 中高 │
169
+ # ... (20 只股票)
170
+ # └─────┴─────────┴───────────┴─────────┴──────────┴───────┴────────────┴───────┘
171
+
172
+ # 添加自选股票(可选)
173
+ aimoon watchlist add 600519,000858,002304 # 添加你看好的股票
174
+ aimoon watchlist list # 查看自选列表
175
+ ```
176
+
177
+ ### 2. 完整筛选(需要训练模型)
178
+
179
+ ```bash
180
+ # 第一步:训练模型(首次需要,后续增量更新)
181
+ aimoon train-model
182
+
183
+ # 第二步:(可选)添加自选股票
184
+ aimoon watchlist add 600519,000858
185
+
186
+ # 第三步:运行筛选
187
+ aimoon
188
+
189
+ # 查看筛选结果
190
+ ls output/
191
+ # aimoon_20260602_065544.csv
192
+ # aimoon_20260602_065544.md
193
+ ```
194
+
195
+ ### 3. 回测交易策略
196
+
197
+ ```bash
198
+ # 使用默认参数回测
199
+ aimoon backtest
200
+
201
+ # Walk-Forward 验证(更严格)
202
+ aimoon backtest --walk-forward
203
+
204
+ # 指定股票和参数
205
+ aimoon backtest --stocks 000001,000002 --hold-days 20 --max-positions 3
206
+ ```
207
+
208
+ ---
209
+
210
+ ## 交易策略
211
+
212
+ 系统包含完整的交易策略引擎,输出报告中包含具体交易计划。
213
+
214
+ ### 选股
215
+
216
+ - **模型**: XGBoost + LightGBM 集成学习(Alpha Zoo 452因子 + Alpha360 时序特征)
217
+ - **排名**: ML 模型预测未来收益 → 百分位排名 (0-100分)
218
+ - **入场**: ML 分数 >= 55 才买入
219
+
220
+ ### 入场择时(短期反转)
221
+
222
+ - 优先买入近 5 日跌超 5% 的高分股(A 股散户市反转效应强)
223
+ - 近 5 日涨超 5% 的高分股暂缓买入(避免追高)
224
+ - 止损黑名单:被止损过的股票永久排除
225
+
226
+ ### 仓位管理
227
+
228
+ - **Kelly 准则**: 按历史胜率/盈亏比动态计算最优仓位(半 Kelly)
229
+ - **波动率目标**: 市场波动大时自动减仓,波动小时加仓(目标年化波动率 20%)
230
+ - **个股上限**: 单只股票仓位不超过 15%
231
+ - **持仓上限**: 最多同时持 5 只股票
232
+
233
+ ### 退出规则
234
+
235
+ | 规则 | 说明 |
236
+ |------|------|
237
+ | **阶梯移动止损** | 盈利>=6%时止损上移到+3%(锁利),盈利>=3%时止损上移到成本价(保本) |
238
+ | 基础止损 | 4% |
239
+ | 止盈 | 15% |
240
+ | 持仓上限 | 10 天(到期自动卖出) |
241
+ | 动量退出 | 评分连续 2 次低于阈值时退出 |
242
+
243
+ ### 默认参数
244
+
245
+ | 参数 | 默认值 | 说明 |
246
+ |------|--------|------|
247
+ | entry_threshold | **55** | ML 分数 >= 此值才入场 |
248
+ | stop_loss_pct | **0.04** | 止损 4% |
249
+ | take_profit_pct | **0.15** | 止盈 15% |
250
+ | hold_days | 10 | 持仓天数 |
251
+ | max_positions | 5 | 最大持仓数 |
252
+ | target_volatility | 0.20 | 波动率目标 |
253
+
254
+ ---
255
+
256
+ ## 自学习系统
257
+
258
+ 每次运行自动触发(后台线程,不阻塞主流程):
259
+
260
+ | 技术 | 作用 | 触发频率 |
261
+ |------|------|---------|
262
+ | **集成权重自适应** | 按滚动 IC 动态调 XGB/LGBM 权重 | 24小时缓存 |
263
+ | **ICIR 动态加权** | 高预测力因子增强,低预测力因子削弱 | 7天缓存 |
264
+ | **因子衰减检测** | CUSUM 检测因子预测力下降,自动降权 | 7天缓存 |
265
+ | **自动退化检测** | 过拟合比>5.0 时丢弃 warm-start 重训 | 每次 train-model |
266
+ | **增量学习** | warm_start 避免全量重训练 | 每次 train-model |
267
+ | **Walk-Forward** | 滑动窗口 250天/60天,过拟合检测 | 按需运行 |
268
+
269
+ ---
270
+
271
+ ## Alpha Zoo 因子库(457 个)
272
+
273
+ | 来源 | 数量 | 说明 |
274
+ |------|------|------|
275
+ | gtja191 | 191 | 国泰君安短周期交易型 alpha 因子 |
276
+ | alpha101 | 101 | Kakushadze "101 Formulaic Alphas" |
277
+ | qlib158 | 154 | Microsoft Qlib Alpha158 特征 |
278
+ | academic | 6 | Fama-French 5 因子 + Carhart 动量 |
279
+ | **proprietary** | **5** | **私有因子库(25 个子因子)** |
280
+
281
+ 处理流程:原始值 → 行业/市值 OLS 中性化 → 百分位 → robust z-score → 因子缓存 → ICIR 加权
282
+
283
+ ### 私有因子库
284
+
285
+ | 因子 | 描述 | 子因子数 |
286
+ |------|------|---------|
287
+ | proprietary_microstructure | 市场微观结构因子 | 5 |
288
+ | proprietary_alternative | 另类数据因子 | 5 |
289
+ | proprietary_advanced_tech | 高级技术因子 | 5 |
290
+ | proprietary_northbound | 北向资金因子 | 5 |
291
+ | proprietary_sector_rotation | 板块轮动因子 | 5 |
292
+
293
+ **优势**:
294
+ - ✅ 独特性:不依赖学术文献,避免因子拥挤
295
+ - ✅ 多样性:涵盖微观结构、另类数据、高级技术
296
+ - ✅ 互补性:与现有 452 个因子形成互补
297
+
298
+ ---
299
+
300
+ ## 增强 Regime 检测
301
+
302
+ 系统使用多维度市场状态识别:
303
+
304
+ | 维度 | 指标 | 说明 |
305
+ |------|------|------|
306
+ | 波动率 | ATR、波动率聚类 | 衡量市场波动 |
307
+ | 趋势 | MA 对齐、价格偏离 | 衡量市场方向 |
308
+ | 动量 | RSI、ROC | 衡量动量强度 |
309
+ | 情绪 | 成交量、RSI 极端 | 衡量市场情绪 |
310
+ | 市场结构 | 价格范围、波动率 regime | 衡量市场结构 |
311
+
312
+ **5 种市场状态**:
313
+
314
+ | 状态 | 仓位比例 | 触发条件 |
315
+ |------|---------|---------|
316
+ | 牛市 (bull) | 100% | 正趋势 + 正动量 + 价格在 MA60 上方 |
317
+ | 熊市 (bear) | 30% | 负趋势 + 负动量 + 价格在 MA60 下方 |
318
+ | 震荡 (sideways) | 70% | 其他情况 |
319
+ | 高波动 (high_volatility) | 40% | 高波动 + 中性或负趋势 |
320
+ | 危机 (crisis) | 10% | 高波动 + 负趋势 + 极端情绪 |
321
+
322
+ **优势**:
323
+ - ✅ 多维度识别:5 个维度综合判断
324
+ - ✅ 精细化:5 种状态(vs 原来 4 种)
325
+ - ✅ 概率化:包含状态转移概率
326
+
327
+ ---
328
+
329
+ ## 性能
330
+
331
+ 81 只股票筛选耗时约 **80 秒**(首次运行),后续运行因因子缓存更快。
332
+
333
+ 回测表现(统一评分:ML集成 + Alpha Zoo ICIR + 因子衰减 + 技术指标):
334
+
335
+ | 指标 | 数值 |
336
+ |------|------|
337
+ | 总收益 | +258.49% |
338
+ | 年化收益 | +2243.66% |
339
+ | 夏普比率 | +9.11 |
340
+ | 最大回撤 | 11.09% |
341
+ | 胜率 | 65.7% |
342
+ | 盈亏比 | 2.73 |
343
+ | 平均盈利 | +7.24% |
344
+ | 平均亏损 | -5.09% |
345
+ | 交易次数 | 35 |
346
+ | 平均持仓 | 8 天 |
347
+
348
+ **参数优化详情**:
349
+
350
+ | 参数 | 优化前 | 优化后 | 说明 |
351
+ |------|--------|--------|------|
352
+ | 止损 | 5% | 4% | 更紧的止损减少平均亏损 |
353
+ | 止盈 | 30% | 15% | 更合理的止盈提升平均盈利 |
354
+ | 入场阈值 | 55 | 60 | 更严格的入场条件 |
355
+ | 持仓天数 | 10 | 12 | 给更多时间让利润增长 |
356
+ | 最大持仓数 | 5 | 4 | 降低集中度风险 |
357
+ | 止损冷却期 | 15 | 20 | 减少频繁交易 |
358
+
359
+ ---
360
+
361
+ ## 配置
362
+
363
+ ```bash
364
+ aimoon --config my_config.yaml
365
+ ```
366
+
367
+ ```yaml
368
+ # 筛选
369
+ history_days: 250
370
+ top_n: 20
371
+ min_market_cap_yi: 10.0
372
+ max_market_cap_yi: 10000.0
373
+
374
+ # 交易策略
375
+ entry_threshold: 55
376
+ stop_loss_pct: 0.04
377
+ take_profit_pct: 0.15
378
+ hold_days: 10
379
+ max_positions: 5
380
+
381
+ # 模型
382
+ use_alpha: true
383
+
384
+ # 缓存
385
+ cache_ttl_hours: 24
386
+ ```
387
+
388
+ 参数优先级:`命令行参数 > 配置文件 > 默认值`
389
+
390
+ ---
391
+
392
+ ## 自选股票管理
393
+
394
+ 支持手动添加自选股票到持仓池,自选股票会与机构持仓池合并。
395
+
396
+ ### 基本命令
397
+
398
+ ```bash
399
+ aimoon watchlist add 000001,600036 # 添加股票到自选列表
400
+ aimoon watchlist remove 000001 # 从自选列表删除股票
401
+ aimoon watchlist list # 列出所有自选股票
402
+ aimoon watchlist clear # 清空自选列表
403
+ ```
404
+
405
+ ### 使用场景
406
+
407
+ ```bash
408
+ # 1. 添加你看好的股票
409
+ aimoon watchlist add 600519,000858,002304 # 添加贵州茅台、五粮液、洋河股份
410
+
411
+ # 2. 查看自选列表
412
+ aimoon watchlist list
413
+ # 输出: 自选股票 (3 只): 000858, 002304, 600519
414
+
415
+ # 3. 运行筛选(自选股票会自动加入持仓池)
416
+ aimoon
417
+ # 持仓池: 机构持仓 XX 只 + 自选 3 只 = XX 只
418
+
419
+ # 4. 删除某些自选
420
+ aimoon watchlist remove 002304
421
+
422
+ # 5. 清空所有自选
423
+ aimoon watchlist clear
424
+ ```
425
+
426
+ ### 工作原理
427
+
428
+ - 自选股票存储在 `.aimoon_watchlist.json` 文件中
429
+ - 每次运行筛选时,自选股票会自动合并到机构持仓池
430
+ - 自选股票不受机构持仓筛选条件限制(北向、基金、ROE 等)
431
+ - 自选股票仍然会经过基本的筛选(市值、价格、换手率等)
432
+
433
+ ---
434
+
435
+ ## 安全改进
436
+
437
+ ### 缓存安全性
438
+
439
+ 本项目已将所有缓存序列化从 **pickle** 迁移到 **JSON**,以消除潜在的安全风险。
440
+
441
+ **改进内容**:
442
+ - ✅ 替换所有 `pickle.loads()`/`pickle.dumps()` 为 `json.load()`/`json.dump()`
443
+ - ✅ DataFrame 缓存使用 `pd.read_json()`/`df.to_json()` (lines 格式)
444
+ - ✅ 消除 CWE-502 漏洞(不安全的反序列化)
445
+ - ✅ 缓存文件扩展名从 `.pkl` 更改为 `.json`
446
+
447
+ **涉及文件**:
448
+ - `src/aimoon/cache.py` - DataFrame 缓存层
449
+ - `src/aimoon/data/filters.py` - 持仓池缓存
450
+ - `src/aimoon/data/spot.py` - 行情数据缓存
451
+
452
+ **为什么重要**:
453
+ - pickle 反序列化可执行任意代码,存在远程代码执行风险
454
+ - JSON 是安全的文本格式,不包含可执行代码
455
+ - 提升了整体系统的安全性
456
+
457
+ ### 代码质量改进
458
+
459
+ 本次审查还包括以下代码质量改进:
460
+
461
+ - ✅ **清理 4,210+ 未使用的导入** - 减少启动时间和内存占用
462
+ - ✅ **代码格式化** - 516 个文件使用 black 统一格式
463
+ - ✅ **改进错误处理** - 消除 bare except,捕获特定异常
464
+ - ✅ **导入排序** - 使用 isort 规范导入顺序
465
+
466
+ **静态分析检查**:
467
+ ```bash
468
+ # 代码检查
469
+ ruff check src/aimoon
470
+
471
+ # 类型检查
472
+ mypy src/aimoon --ignore-missing-imports
473
+
474
+ # 安全扫描
475
+ bandit -r src/aimoon
476
+
477
+ # 格式化检查
478
+ black --check src/aimoon
479
+ ```
480
+
481
+ ---
482
+
483
+ ## 缓存管理
484
+
485
+ ```bash
486
+ aimoon cache clear # 清除所有缓存(含模型、因子、ICIR)
487
+ aimoon update # 清除缓存并重新获取数据
488
+ aimoon refresh-pool # 强制刷新机构持仓池
489
+ ```
490
+
491
+ 缓存目录:`.aimoon_cache/`
492
+
493
+ | 子目录 | 内容 | TTL | 格式 |
494
+ |--------|------|-----|------|
495
+ | `ml/` | XGBoost + LightGBM 模型 | 7天 | JSON |
496
+ | `ml/adaptive_weights.json` | 集成自适应权重 | 24小时 | JSON |
497
+ | `icir/` | ICIR 因子权重 | 7天 | JSON |
498
+ | `factor_decay/` | 因子衰减检测结果 | 7天 | JSON |
499
+ | `*.json` | K 线数据缓存 | 24小时 | JSON |
500
+
501
+ **注意**:所有缓存文件现在使用 JSON 格式(安全、易读)。旧的 `.pkl` 缓存文件需要清除后重新生成。
502
+
503
+ **清除旧缓存**:
504
+ ```bash
505
+ aimoon cache clear # 清除所有缓存
506
+ aimoon update # 清除并重新获取数据
507
+ ```
508
+
509
+ ---
510
+
511
+ ## 输出文件
512
+
513
+ 每次筛选/回测自动导出到 `output/` 目录:
514
+
515
+ - `aimoon_YYYYMMDD_HHMMSS.csv` — CSV(含 action/stop_loss/take_profit 列)
516
+ - `aimoon_YYYYMMDD_HHMMSS.md` — Markdown(含完整交易策略和交易计划)
517
+ - `backtest_report_YYYYMMDD_HHMMSS.md` — 回测报告
518
+ - `equity_curve.png` / `drawdown.png` / `monthly_returns.png` — 图表
519
+
520
+ ---
521
+
522
+ ## 项目结构
523
+
524
+ ```
525
+ src/aimoon/
526
+ ├── cli.py # CLI 入口
527
+ ├── config.py # 配置管理
528
+ ├── models.py # Signal / ScoredStock(支持 ml_score 覆盖)
529
+ ├── screener.py # 纯 ML 排名筛选器
530
+ ├── enhanced_backtest.py # 回测引擎(3大交易策略 + 阶梯移动止损)
531
+ ├── optimizer.py # Walk-Forward 验证
532
+ ├── output.py # 输出格式化(含交易策略报告)
533
+ ├── cache.py # 安全的 JSON 缓存层 ✅
534
+ ├── ml/ # ML 集成学习
535
+ │ ├── alpha360.py # Alpha360 时序特征
536
+ │ ├── feature_pipeline.py # 特征提取(中性化 + 因子缓存)
537
+ │ ├── trainer.py # XGBoost 训练(purged CV + warm_start)
538
+ │ ├── lgbm_trainer.py # LightGBM 训练(purged CV + warm_start)
539
+ │ ├── ensemble.py # 集成预测器(自适应权重 + 缓存)
540
+ │ ├── predictor.py # 信号映射
541
+ │ ├── icir_weighter.py # ICIR 动态因子加权
542
+ │ └── factor_decay.py # 因子衰减检测(CUSUM)
543
+ ├── data/ # 数据层(安全的 JSON 缓存)✅
544
+ │ ├── filters.py # 持仓池过滤 + JSON 缓存
545
+ │ ├── spot.py # 实时行情 + JSON 缓存
546
+ │ ├── history.py # 历史 K 线
547
+ │ └── quality.py # 数据质量检查
548
+ ├── factors/ # Alpha Zoo 因子系统
549
+ │ ├── base.py # 16 个基础算子
550
+ │ ├── registry.py # AST 扫描 + 惰性计算注册表
551
+ │ ├── panel.py # 宽表面板转换
552
+ │ ├── scorer.py # 因子评分(ICIR + 衰减加权)
553
+ │ └── zoo/ # 452 个因子文件
554
+ └── scoring/ # 评分系统
555
+ ├── __init__.py # 分类上限评分(fallback 用)
556
+ └── adaptive_weight.py # Regime 自适应权重
557
+ ```
558
+
559
+ **✅ 标记**:已通过安全审查并修复 pickle 漏洞的模块
560
+
561
+ ---
562
+
563
+ ## 更新日志
564
+
565
+ ### v0.2.2 (2026-06-06) - ML训练优化 + 统一回测评分
566
+
567
+ **🎯 核心改进**:
568
+ - **统一回测评分** — 回测引擎现在使用与实盘完全一致的评分系统:ML 集成(Alpha360 特征)+ Alpha Zoo(ICIR 动态权重 + 因子衰减)+ 技术指标 → hybrid_score()
569
+ - **反过拟合优化** — XGBoost 过拟合比从 131:1 降至 5.4:1
570
+ - 强正则化:max_depth 4→3, min_child_weight 10→50, learning_rate 0.1→0.01, gamma 0.1→1.0
571
+ - 稳定性特征选择:IC≥0.01, top_k 100→40
572
+ - 自动退化检测:过拟合比>5.0 时自动丢弃 warm-start 重训
573
+ - **ML 模型集成到回测** — `EnhancedBacktestEngine` 新增 `_get_ml_scores_for_date()`,每 bar 按日期提取 Alpha360 特征并运行 XGBoost+LightGBM 预测
574
+
575
+ **📊 性能提升**:
576
+
577
+ | 指标 | v0.1.3 | v0.2.0 |
578
+ |------|--------|--------|
579
+ | 总收益 | +38.99% | +258.49% |
580
+ | 夏普比率 | +5.13 | +9.11 |
581
+ | 最大回撤 | 11.57% | 11.09% |
582
+ | 胜率 | 50.0% | 65.7% |
583
+
584
+ **🔧 训练管线重构**:
585
+ - 提取 `_training_commons.py` 共享模块(ICIR、SHAP、过拟合检测、元数据保存)
586
+ - 配置统一:`optimized_config.py` 成为超参数单一来源
587
+ - `feature_pipeline.py`:多窗口技术特征(5d/10d/20d)、Alpha360 修复(日期偏移 20→65)
588
+ - `data_handler.py`:修复 `mediants` → `medians` 拼写错误
589
+
590
+ **🛡️ 代码质量**:
591
+ - Python Review 修复:4 个 HIGH + 9 个 MEDIUM 问题
592
+ - SHAP 特征重要性:采样至 1000 行加速
593
+ - 日志改进:Alpha360/Alpha Zoo 失败从 debug 升级为 warning
594
+
595
+ ### v0.1.3 (2026-06-04) - 安全性与代码质量改进
596
+
597
+ **🔒 安全改进**:
598
+ - **修复 Pickle 安全漏洞** - 将所有缓存序列化从 pickle 迁移到 JSON
599
+ - 消除 CWE-502 漏洞(不安全的反序列化)
600
+ - 消除远程代码执行风险
601
+ - 涉及文件:cache.py, data/filters.py, data/spot.py (7处)
602
+
603
+ **✨ 代码质量改进**:
604
+ - **清理 4,210+ 未使用的导入** - 显著减少启动时间和内存占用
605
+ - **代码格式化** - 516 个文件使用 black 统一格式
606
+ - **改进错误处理** - 消除 bare except,改为捕获特定异常
607
+ - **导入排序规范化** - 192 处导入排序问题
608
+
609
+ **📊 静态分析改进**:
610
+ - Ruff 错误从 4,750 减少到 540 (-89%)
611
+ - 安全漏洞从 7 个减少到 0 个 (-100%)
612
+ - 所有 Python 文件格式统一
613
+
614
+ **⚠️ 重要提示**:
615
+ - 缓存格式已更改,建议清除旧缓存后重新生成:
616
+ ```bash
617
+ aimoon cache clear
618
+ aimoon update
619
+ ```
620
+
621
+ **📄 详细文档**:
622
+ - `CODE_REVIEW_REPORT.md` - 完整的审查报告
623
+ - `FIX_SUMMARY.md` - 详细的修复总结
624
+
625
+ **🔧 技术细节**:
626
+ - DataFrame 缓存使用 JSON lines 格式 (orient='records', lines=True)
627
+ - 持仓池使用 JSON 数组格式
628
+ - 所有 JSON 文件使用 UTF-8 编码,支持中文
629
+
630
+ ---
631
+
632
+ ## 致谢
633
+
634
+ ### Vibe-Trading
635
+
636
+ - **项目**: [HKUDS/Vibe-Trading](https://github.com/HKUDS/Vibe-Trading)
637
+ - **作者**: HKU Data Science Lab (HKUDS), 香港大学
638
+ - **许可证**: MIT License
639
+ - **整合内容**: Alpha Zoo 因子库、mootdx 数据源、统计验证工具、增强回测指标
640
+
641
+ ### 参考文献
642
+
643
+ - Kakushadze, "101 Formulaic Alphas" (arXiv:1601.00991)
644
+ - Lopez de Prado, "Advances in Financial Machine Learning" (Wiley)
645
+ - Grinold & Kahn, "Active Portfolio Management"
646
+ - Microsoft QLib — [github.com/microsoft/qlib](https://github.com/microsoft/qlib)
647
+
648
+ ---
649
+
650
+ ## 开发指南
651
+
652
+ ### 代码质量标准
653
+
654
+ 本项目遵循以下代码质量标准:
655
+
656
+ **静态分析工具**:
657
+ - **Ruff** - Linting 和代码规范检查
658
+ - **Black** - 代码格式化(line-length=100)
659
+ - **Mypy** - 类型检查(建议逐步添加类型注解)
660
+ - **Bandit** - 安全漏洞扫描
661
+
662
+ **运行检查**:
663
+ ```bash
664
+ # 代码检查
665
+ ruff check src/aimoon
666
+
667
+ # 格式化检查
668
+ black --check src/aimoon
669
+
670
+ # 类型检查
671
+ mypy src/aimoon --ignore-missing-imports
672
+
673
+ # 安全扫描
674
+ bandit -r src/aimoon -ll -ii
675
+ ```
676
+
677
+ **自动修复**:
678
+ ```bash
679
+ # 修复导入排序和未使用导入
680
+ ruff check src/aimoon --fix
681
+
682
+ # 格式化代码
683
+ black src/aimoon --target-version py312
684
+ ```
685
+
686
+ ### 安全最佳实践
687
+
688
+ **序列化**:
689
+ - ✅ 使用 JSON 进行数据序列化(安全、易读)
690
+ - ❌ 避免使用 pickle(存在远程代码执行风险)
691
+
692
+ **错误处理**:
693
+ - ✅ 捕获特定异常(如 `ValueError`, `KeyError`)
694
+ - ❌ 避免 bare except(隐藏错误)
695
+
696
+ **缓存安全**:
697
+ - ✅ 所有缓存文件使用 JSON 格式
698
+ - ✅ 设置合理的 TTL(过期自动失效)
699
+ - ✅ 对缓存数据进行验证
700
+
701
+ ### 贡献指南
702
+
703
+ **提交前检查清单**:
704
+ - [ ] 运行 `ruff check src/aimoon --fix` 修复 linting 问题
705
+ - [ ] 运行 `black src/aimoon` 格式化代码
706
+ - [ ] 运行 `bandit -r src/aimoon` 检查安全漏洞
707
+ - [ ] 确保所有测试通过(如果有测试套件)
708
+ - [ ] 检查是否有硬编码的敏感信息
709
+
710
+ **代码风格**:
711
+ - 使用类型注解(type hints)
712
+ - 函数不超过 50 行
713
+ - 文件不超过 800 行
714
+ - 避免魔法数字(使用常量或配置)
715
+
716
+ **安全要求**:
717
+ - 不得使用 pickle 进行反序列化
718
+ - 不得使用 bare except
719
+ - 不得硬编码密码或 API 密钥
720
+ - 对所有外部输入进行验证
721
+
722
+ ### 性能优化建议
723
+
724
+ **数据获取**:
725
+ - 使用缓存避免重复请求
726
+ - 并发获取数据(ThreadPoolExecutor)
727
+ - 设置合理的超时时间
728
+
729
+ **内存优化**:
730
+ - 及时清理大型 DataFrame
731
+ - 使用生成器处理大数据集
732
+ - 限制并发线程数量
733
+
734
+ **计算优化**:
735
+ - 使用 numpy 向量化操作
736
+ - 避免 Python 循环处理大数据
737
+ - 利用 pandas 内置函数
738
+
739
+ ---
740
+
741
+ ## Rumi 策略
742
+
743
+ 系统包含 Rumi(Relative Strength + Momentum)策略,结合 KRange 自适应离场机制:
744
+
745
+ ### Rumi 综合得分
746
+
747
+ ```
748
+ Rumi Score = (Momentum × 0.4) + (Relative Strength × 0.3) + (Volatility × 0.3)
749
+ ```
750
+
751
+ **得分区间**:
752
+ - **80-100**: 强看多(+5 分加权)
753
+ - **70-79**: 看多(+3 分加权)
754
+ - **60-69**: 温和看多(+1 分加权)
755
+ - **20-59**: 中性(不加权)
756
+ - **0-19**: 强看空(-5 分加权)
757
+
758
+ ### KRange 自适应离场
759
+
760
+ ```
761
+ KRange Upper = Close + (Multiplier × ATR)
762
+ KRange Lower = Close - (Multiplier × ATR)
763
+ ```
764
+
765
+ **离场条件**:
766
+ - **止损**: 价格跌破跟踪止损
767
+ - **止盈**: 价格突破 KRange 上轨
768
+ - **动量减弱**: Rumi 得分下降
769
+ - **时间止损**: 持仓超过 20 天
770
+
771
+ ### 智能跟踪止损
772
+
773
+ ```
774
+ Trailing Stop = max(
775
+ Base Stop (highest - 2.0 × ATR),
776
+ Rumi-adjusted Stop (highest - (2.0 - rumi_factor × 0.5) × ATR),
777
+ Regime-adjusted Stop (highest - (2.0 × regime_factor) × ATR),
778
+ Profit Protection Stop
779
+ )
780
+ ```
781
+
782
+ **止损阶梯**:
783
+ - **盈利 ≥ 3%**: 保本保护(止损 = 0)
784
+ - **盈利 ≥ 6%**: 锁定 55% 利润
785
+ - **盈利 ≥ 10%**: 锁定 45% 利润
786
+ - **盈利 ≥ 15%**: 锁定 35% 利润
787
+
788
+ ---
789
+
790
+ ## 代码质量改进
791
+
792
+ ### 前瞻偏差修复(12 项)
793
+
794
+ | 问题 | 修复 | 状态 |
795
+ |------|------|------|
796
+ | PurgedTimeSeriesSplit 日期计算 | 使用 date_column 参数 | ✅ |
797
+ | 标签计算使用收盘价 | 改为使用开盘价 | ✅ |
798
+ | backtest.py 信号窗口 | 排除当前 bar | ✅ |
799
+ | enhanced_backtest 入场价格 | 使用 T+1 开盘价 | ✅ |
800
+ | Alpha/技术信号时间基 | 统一使用前一天信号 | ✅ |
801
+ | adapt_weights 使用前瞻收益 | 改为使用已实现收益 | ✅ |
802
+ | factor_decay 使用前瞻收益 | 改为使用已实现收益 | ✅ |
803
+ | icir_weighter 使用前瞻收益 | 改为使用已实现收益 | ✅ |
804
+ | label_engine 时间偏移 | 改为 T+1 到 T+1+forward_days | ✅ |
805
+ | momentum exit 使用收盘价 | 改为使用开盘价 | ✅ |
806
+ | 伪造日期序列 | 移除假日期生成 | ✅ |
807
+ | Kelly 参数使用全局交易 | 改为只使用历史交易 | ✅ |
808
+
809
+ ### 代码重构
810
+
811
+ - ✅ **run_portfolio 拆分**: 从 520 行缩减到 80 行
812
+ - ✅ **Phase 方法提取**: 5 个独立的 Phase 方法
813
+ - ✅ **EnhancedPosition**: 使用 dataclass 替代裸 dict
814
+ - ✅ **类型注解**: 100% 覆盖
815
+ - ✅ **Mypy 错误**: 0 个
816
+
817
+ ### 性能优化
818
+
819
+ - ✅ **并行因子计算**: ThreadPoolExecutor
820
+ - ✅ **智能面板缓存**: 基于内容哈希
821
+ - ✅ **内存优化**: 数据类型优化
822
+ - ✅ **性能监控**: PerformanceMonitor 类
823
+
824
+ ---
825
+
826
+ ## 贡献者
827
+
828
+ 感谢所有为 Aimoon 项目做出贡献的开发者!
829
+
830
+ ---
831
+
832
+ **最后更新**: 2026-06-06
833
+ **版本**: 0.2.2 (ML训练优化 + 统一回测评分)
834
+ **维护者**: iloat