cnhkmcp 2.1.2__py3-none-any.whl → 2.1.4__py3-none-any.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 (101) hide show
  1. cnhkmcp/__init__.py +126 -125
  2. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/config.json +1 -1
  3. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/get_knowledgeBase_tool/ace_lib.py +4 -0
  4. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/001_10_Steps_to_Start_on_BRAIN_documentation.json +14 -0
  5. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/001_Intermediate_Pack_-_Improve_your_Alpha_2_2_documentation.json +174 -0
  6. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/001_Intermediate_Pack_-_Understand_Results_1_2_documentation.json +167 -0
  7. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/001_Introduction_to_Alphas_documentation.json +145 -0
  8. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/001_Introduction_to_BRAIN_Expression_Language_documentation.json +107 -0
  9. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/001_WorldQuant_Challenge_documentation.json +56 -0
  10. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/001__Read_this_First_-_Starter_Pack_documentation.json +404 -0
  11. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/002_How_to_choose_the_Simulation_Settings_documentation.json +268 -0
  12. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/002_Simulate_your_first_Alpha_documentation.json +88 -0
  13. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/002__Alpha_Examples_for_Beginners_documentation.json +254 -0
  14. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/002__Alpha_Examples_for_Bronze_Users_documentation.json +114 -0
  15. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/002__Alpha_Examples_for_Silver_Users_documentation.json +79 -0
  16. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/002__How_BRAIN_works_documentation.json +184 -0
  17. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/003_Clear_these_tests_before_submitting_an_Alpha_documentation.json +388 -0
  18. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/003_Parameters_in_the_Simulation_results_documentation.json +243 -0
  19. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/004_Group_Data_Fields_documentation.json +69 -0
  20. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/004_How_to_use_the_Data_Explorer_documentation.json +142 -0
  21. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/004_Model77_dataset_documentation.json +14 -0
  22. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/004_Sentiment1_dataset_documentation.json +14 -0
  23. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/004_Understanding_Data_in_BRAIN_Key_Concepts_and_Tips_documentation.json +182 -0
  24. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/004_Vector_Data_Fields_documentation.json +30 -0
  25. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Crowding_Risk-Neutralized_Alphas_documentation.json +64 -0
  26. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_D0_documentation.json +66 -0
  27. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Double_Neutralization_documentation.json +53 -0
  28. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Fast_D1_Documentation_documentation.json +304 -0
  29. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Investability_Constrained_Metrics_documentation.json +129 -0
  30. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Must-read_posts_How_to_improve_your_Alphas_documentation.json +14 -0
  31. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Neutralization_documentation.json +29 -0
  32. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_RAM_Risk-Neutralized_Alphas_documentation.json +64 -0
  33. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Risk_Neutralization_Default_setting_documentation.json +75 -0
  34. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Risk_Neutralized_Alphas_documentation.json +171 -0
  35. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/005_Statistical_Risk-Neutralized_Alphas_documentation.json +51 -0
  36. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/006_EUR_TOP2500_Universe_documentation.json +35 -0
  37. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/006_GLB_TOPDIV3000_Universe_documentation.json +48 -0
  38. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/006_Getting_Started_China_Research_for_Consultants_Gold_documentation.json +142 -0
  39. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/006_Getting_started_on_Illiquid_Universes_Gold_documentation.json +46 -0
  40. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/006_Getting_started_with_USA_TOPSP500_universe_Gold_documentation.json +62 -0
  41. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/006_Global_Alphas_Gold_documentation.json +66 -0
  42. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/006_India_Alphas_documentation.json +35 -0
  43. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Consultant_Dos_and_Don_ts_documentation.json +35 -0
  44. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Consultant_Features_documentation.json +239 -0
  45. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Consultant_Simulation_Features_documentation.json +149 -0
  46. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Consultant_Submission_Tests_documentation.json +363 -0
  47. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Finding_Consultant_Alphas_documentation.json +333 -0
  48. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Power_Pool_Alphas_documentation.json +14 -0
  49. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Research_Advisory_Program_documentation.json +35 -0
  50. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Starting_Guide_for_Research_Consultants_documentation.json +14 -0
  51. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Visualization_Tool_documentation.json +99 -0
  52. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007_Your_Advisor_-_Kunqi_Jiang_documentation.json +53 -0
  53. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007__Brain_Genius_documentation.json +288 -0
  54. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/007__Single_Dataset_Alphas_documentation.json +41 -0
  55. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/008_Advisory_Theme_Calendar_documentation.json +14 -0
  56. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/008_Multiplier_Rules_documentation.json +14 -0
  57. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/008_Overview_of_Themes_documentation.json +14 -0
  58. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/008_Theme_Calendar_documentation.json +14 -0
  59. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/009_Combo_Expression_documentation.json +272 -0
  60. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/009_Global_SuperAlphas_documentation.json +14 -0
  61. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/009_Helpful_Tips_documentation.json +58 -0
  62. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/009_Selection_Expression_documentation.json +1546 -0
  63. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/009_SuperAlpha_Operators_documentation.json +890 -0
  64. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/009_SuperAlpha_Results_documentation.json +83 -0
  65. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/009_What_is_a_SuperAlpha_documentation.json +261 -0
  66. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/010_BRAIN_API_documentation.json +515 -0
  67. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/010_Documentation_for_ACE_API_Library_Gold_documentation.json +27 -0
  68. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/010__Understanding_simulation_limits_documentation.json +210 -0
  69. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/arithmetic_operators.json +209 -0
  70. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/cross_sectional_operators.json +98 -0
  71. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/group_operators.json +121 -0
  72. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/logical_operators.json +145 -0
  73. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/reduce_operators.json +156 -0
  74. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/special_operators.json +35 -0
  75. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/time_series_operators.json +386 -0
  76. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/transformational_operators.json +61 -0
  77. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/knowledge/vector_operators.json +38 -0
  78. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/vector_db/_manifest.json +302 -0
  79. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/vector_db/_meta.json +1 -0
  80. cnhkmcp/untracked/AI/321/206/320/261/320/234/321/211/320/255/320/262/321/206/320/237/320/242/321/204/342/225/227/342/225/242/vector_db/chroma.sqlite3 +0 -0
  81. cnhkmcp/untracked/APP/Tranformer/Transformer.py +5 -1
  82. cnhkmcp/untracked/APP/Tranformer/ace_lib.py +4 -0
  83. cnhkmcp/untracked/APP/Tranformer/output/Alpha_candidates.json +6008 -1242
  84. cnhkmcp/untracked/APP/Tranformer/output/Alpha_generated_expressions_error.json +1 -1034
  85. cnhkmcp/untracked/APP/Tranformer/output/Alpha_generated_expressions_success.json +47310 -442
  86. cnhkmcp/untracked/APP/ace_lib.py +4 -0
  87. cnhkmcp/untracked/APP/give_me_idea/ace_lib.py +4 -0
  88. cnhkmcp/untracked/APP/hkSimulator/ace_lib.py +4 -0
  89. cnhkmcp/untracked/APP/simulator/wqb20260107015647.log +57 -0
  90. cnhkmcp/untracked/APP//321/207/342/225/235/320/250/321/205/320/230/320/226/321/204/342/225/225/320/220/321/211/320/221/320/243/321/206/320/261/320/265/ace_lib.py +4 -0
  91. cnhkmcp/untracked/APP//321/207/342/225/235/320/250/321/205/320/230/320/226/321/204/342/225/225/320/220/321/211/320/221/320/243/321/206/320/261/320/265/brain_alpha_inspector.py +2 -2
  92. cnhkmcp/untracked/APP//321/210/342/224/220/320/240/321/210/320/261/320/234/321/206/320/231/320/243/321/205/342/225/235/320/220/321/206/320/230/320/241.py +4 -0
  93. cnhkmcp/untracked/__init__.py +0 -0
  94. cnhkmcp/untracked/mcp/321/206/320/246/320/227/321/204/342/225/227/342/225/242/321/210/320/276/342/225/221/321/205/320/255/320/253/321/207/320/231/320/2302_/321/205/320/266/320/222/321/206/320/256/320/254/321/205/320/236/320/257/321/207/320/231/320/230/321/205/320/240/320/277/321/205/320/232/320/270/321/204/342/225/225/320/235/321/204/342/225/221/320/226/321/206/342/225/241/320/237/321/210/320/267/320/230/321/205/320/251/320/270/321/205/342/226/221/342/226/222/321/210/320/277/320/245/321/210/342/224/220/320/251/321/204/342/225/225/320/272/platform_functions.py +352 -166
  95. {cnhkmcp-2.1.2.dist-info → cnhkmcp-2.1.4.dist-info}/METADATA +1 -1
  96. cnhkmcp-2.1.4.dist-info/RECORD +190 -0
  97. cnhkmcp-2.1.2.dist-info/RECORD +0 -111
  98. {cnhkmcp-2.1.2.dist-info → cnhkmcp-2.1.4.dist-info}/WHEEL +0 -0
  99. {cnhkmcp-2.1.2.dist-info → cnhkmcp-2.1.4.dist-info}/entry_points.txt +0 -0
  100. {cnhkmcp-2.1.2.dist-info → cnhkmcp-2.1.4.dist-info}/licenses/LICENSE +0 -0
  101. {cnhkmcp-2.1.2.dist-info → cnhkmcp-2.1.4.dist-info}/top_level.txt +0 -0
cnhkmcp/__init__.py CHANGED
@@ -1,125 +1,126 @@
1
- """
2
- CNHK MCP Server - A comprehensive Model Context Protocol server for quantitative trading platform integration.
3
- """
4
-
5
- from .untracked.platform_functions import (
6
- BrainApiClient,
7
- authenticate,
8
- create_simulation,
9
- get_simulation_status,
10
- wait_for_simulation,
11
- get_alpha_details,
12
- get_datasets,
13
- get_datafields,
14
- get_alpha_pnl,
15
- get_user_alphas,
16
- submit_alpha,
17
- get_events,
18
- get_leaderboard,
19
- batch_process_alphas,
20
- analyze_alpha_performance,
21
- get_operators,
22
- run_selection,
23
- get_user_profile,
24
- get_tutorials,
25
- get_messages_summary,
26
- get_messages,
27
- get_alpha_record_sets,
28
- check_production_correlation,
29
- check_self_correlation,
30
- get_submission_check,
31
- set_alpha_properties,
32
- get_user_activities,
33
- get_pyramid_multipliers,
34
- get_pyramid_alphas,
35
- get_user_competitions,
36
- get_competition_details,
37
- get_competition_agreement,
38
- get_instrument_options,
39
- performance_comparison,
40
- combine_test_results,
41
- generate_alpha_links,
42
- get_tutorial_page,
43
- get_tutorial_badge_status
44
- )
45
-
46
- from .untracked.forum_functions import (
47
- ForumClient,
48
- get_glossary_terms,
49
- search_forum_posts,
50
- read_full_forum_post
51
- )
52
-
53
- __version__ = "1.4.8"
54
- __author__ = "CNHK"
55
- __email__ = "cnhk@example.com"
56
-
57
- __all__ = [
58
- # Main API client
59
- "BrainApiClient",
60
-
61
- # Authentication
62
- "authenticate",
63
-
64
- # Simulation management
65
- "create_simulation",
66
- "get_simulation_status",
67
- "wait_for_simulation",
68
-
69
- # Alpha management
70
- "get_alpha_details",
71
- "submit_alpha",
72
- "get_user_alphas",
73
- "get_alpha_pnl",
74
- "get_alpha_record_sets",
75
- "set_alpha_properties",
76
- "check_production_correlation",
77
- "check_self_correlation",
78
- "get_submission_check",
79
-
80
- # Data access
81
- "get_datasets",
82
- "get_datafields",
83
- "get_operators",
84
- "run_selection",
85
- "get_instrument_options",
86
-
87
- # Performance analysis
88
- "analyze_alpha_performance",
89
- "performance_comparison",
90
- "combine_test_results",
91
-
92
- # User management
93
- "get_user_profile",
94
- "get_user_activities",
95
- "get_user_competitions",
96
-
97
- # Competition and events
98
- "get_events",
99
- "get_leaderboard",
100
- "get_competition_details",
101
- "get_competition_agreement",
102
-
103
- # Pyramid system
104
- "get_pyramid_multipliers",
105
- "get_pyramid_alphas",
106
-
107
- # Tutorials and documentation
108
- "get_tutorials",
109
- "get_tutorial_page",
110
- "get_tutorial_badge_status",
111
-
112
- # Messages
113
- "get_messages_summary",
114
- "get_messages",
115
-
116
- # Utilities
117
- "batch_process_alphas",
118
- "generate_alpha_links",
119
-
120
- # Forum functionality
121
- "ForumClient",
122
- "get_glossary_terms",
123
- "search_forum_posts",
124
- "read_full_forum_post"
125
- ]
1
+ """
2
+ CNHK MCP Server - A comprehensive Model Context Protocol server for quantitative trading platform integration.
3
+ """
4
+
5
+ from .untracked.platform_functions import (
6
+ BrainApiClient,
7
+ authenticate,
8
+ create_simulation,
9
+ get_simulation_status,
10
+ wait_for_simulation,
11
+ get_alpha_details,
12
+ get_datasets,
13
+ get_datafields,
14
+ get_alpha_pnl,
15
+ get_user_alphas,
16
+ submit_alpha,
17
+ get_events,
18
+ get_leaderboard,
19
+ batch_process_alphas,
20
+ analyze_alpha_performance,
21
+ get_operators,
22
+ run_selection,
23
+ get_user_profile,
24
+ get_tutorials,
25
+ get_messages_summary,
26
+ get_messages,
27
+ get_alpha_record_sets,
28
+ check_production_correlation,
29
+ check_self_correlation,
30
+ get_submission_check,
31
+ set_alpha_properties,
32
+ get_user_activities,
33
+ get_pyramid_multipliers,
34
+ get_pyramid_alphas,
35
+ get_user_competitions,
36
+ get_competition_details,
37
+ get_competition_agreement,
38
+ get_instrument_options,
39
+ performance_comparison,
40
+ combine_test_results,
41
+ generate_alpha_links,
42
+ get_tutorial_page,
43
+ get_tutorial_badge_status
44
+ )
45
+
46
+ from .untracked.forum_functions import (
47
+ ForumClient,
48
+ get_glossary_terms,
49
+ search_forum_posts,
50
+ read_full_forum_post
51
+ )
52
+
53
+ __version__ = "2.1.4"
54
+ __author__ = "CNHK"
55
+ __email__ = "cnhk@example.com"
56
+
57
+ __all__ = [
58
+ # Main API client
59
+ "BrainApiClient",
60
+
61
+ # Authentication
62
+ "authenticate",
63
+
64
+ # Simulation management
65
+ "create_simulation",
66
+ "get_simulation_status",
67
+ "wait_for_simulation",
68
+
69
+ # Alpha management
70
+ "get_alpha_details",
71
+ "submit_alpha",
72
+ "get_user_alphas",
73
+ "get_alpha_pnl",
74
+ "get_alpha_record_sets",
75
+ "set_alpha_properties",
76
+ "check_production_correlation",
77
+ "check_self_correlation",
78
+ "get_submission_check",
79
+
80
+ # Data access
81
+ "get_datasets",
82
+ "get_datafields",
83
+ "get_operators",
84
+ "run_selection",
85
+ "get_instrument_options",
86
+
87
+ # Performance analysis
88
+ "analyze_alpha_performance",
89
+ "performance_comparison",
90
+ "combine_test_results",
91
+
92
+ # User management
93
+ "get_user_profile",
94
+ "get_user_activities",
95
+ "get_user_competitions",
96
+
97
+ # Competition and events
98
+ "get_events",
99
+ "get_leaderboard",
100
+ "get_competition_details",
101
+ "get_competition_agreement",
102
+
103
+ # Pyramid system
104
+ "get_pyramid_multipliers",
105
+ "get_pyramid_alphas",
106
+
107
+ # Tutorials and documentation
108
+ "get_tutorials",
109
+ "get_tutorial_page",
110
+ "get_tutorial_badge_status",
111
+
112
+ # Messages
113
+ "get_messages_summary",
114
+ "get_messages",
115
+
116
+ # Utilities
117
+ "batch_process_alphas",
118
+ "generate_alpha_links",
119
+
120
+ # Forum functionality
121
+ "ForumClient",
122
+ "get_glossary_terms",
123
+ "search_forum_posts",
124
+ "read_full_forum_post"
125
+ ]
126
+
@@ -1,5 +1,5 @@
1
1
  {
2
- "api_key": "",
2
+ "api_key": "sk-lCfgrezCmn15J4VNkQb4n7pHYH2lKDQ82lj5Ehu6tOWoecPc",
3
3
  "base_url": "https://api.moonshot.cn/v1",
4
4
  "model": "kimi-latest",
5
5
  "system_prompt": "You are a WorldQuant BRAIN platform expert and Consultant. Your goal is to assist users with Alpha development, BRAIN API usage, and maximizing consultant income.\n\nYour expertise includes:\n- Deep knowledge of the BRAIN API (authentication, data, simulation, analysis).\n- Alpha development best practices (stable PnL, economic sense, avoiding pitfalls).\n- Consultant income structure (daily pay, Genius Program, increasing earnings).\n\nGuidelines:\n- Always refer to the BRAIN_Consultant_Starter_Handbook.md for guidance.\n- Emphasize the importance of stable PnL and economic sense when discussing Alphas.\n- Follow the handbook's workflow for API usage.\n- Explain income components clearly when asked.\n- IMPORTANT: You cannot directly interact with the platform. You must guide the user step-by-step on what actions to take (e.g., 'Copy this code', 'Go to the Simulation page').\n- Always suggest the specific next operation the user should perform.\n\nKey Concepts:\n1. Pyramid:\n - Definition: Combination of Region + Delay + Data Category. 'Lit' when 3+ Alphas are submitted in that combo.\n - Purpose: Measures diversity; affects promotions and QualityFactor.\n - Tips: Target underfilled pyramids; use grouping fields; track via MCP.\n\n2. Simulation Settings:\n - Key fields: instrument_type, region, delay (D0/D1), universe, neutralization, decay, truncation, etc.\n - Best Practices: Preprocess (winsorize -> zscore) -> Neutralize. Validate exposures.\n - Neutralization: Use regression_neut or group_neutralize. Consider CROWDING or RAM options.\n - Universes: Choose based on investability (e.g., TOP3000, TOPSP500).\n\nIf the user provides a screenshot, analyze it in the context of the BRAIN platform (e.g., Alpha code, simulation results, error messages). Answer in Chinese."
@@ -1243,6 +1243,10 @@ def get_datafields(
1243
1243
  for x in range(0, count, 50):
1244
1244
  for _ in range(max_try):
1245
1245
  datafields = s.get(url_template.format(x=x))
1246
+ while datafields.status_code == 429:
1247
+ print("status_code 429, sleep 3 seconds")
1248
+ time.sleep(3)
1249
+ datafields = s.get(url_template.format(x=x))
1246
1250
  if "results" in datafields.json():
1247
1251
  break
1248
1252
  time.sleep(5)
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "10-steps-start-brain-platform",
3
+ "title": "10 Steps to Start on BRAIN",
4
+ "lastModified": "2025-03-12T05:07:54.001684-04:00",
5
+ "content": [
6
+ {
7
+ "type": "TEXT",
8
+ "value": "<p><b>10 Steps to Start on BRAIN</b></p><ol><li>Watch the <a href=\"https://platform.worldquantbrain.com/learn/courses/introduction-alphas\">“Introduction to Alphas”</a> training series</li><li>Read the <a href=\"https://platform.worldquantbrain.com/learn/documentation#:~:text=Documentation-,Discover%20BRAIN,-4%20Articles\">starter pack series</a> under “Discover BRAIN” section</li><li>Simulate three simple formulas using the data field: close and the operator: rank</li><li>Understand the simulation settings, starting with <a href=\"https://platform.worldquantbrain.com/learn/documentation/create-alphas/simulation-settings\">delay and neutralization</a> .</li><li>Click the Example button on the bottom left of the <a href=\"https://platform.worldquantbrain.com/simulate\">Simulate</a> page for examples. Try to improve these expressions using the Hint and then submit</li><li>Understand the <a href=\"https://platform.worldquantbrain.com/learn/documentation/interpret-results/parameters-simulation-results\">Simulation Results</a> and submission tests.</li><li>Simulate Alphas discussed in the \"Create Alphas\" sections <a href=\"https://platform.worldquantbrain.com/learn/documentation/create-alphas/running-your-first-alpha\">Run your First Alpha</a> and <a href=\"https://platform.worldquantbrain.com/learn/documentation/create-alphas/another-sample-alpha\">Another Sample Alpha</a>. Pay attention to the settings.</li><li>Check the <a href=\"https://platform.worldquantbrain.com/events\">Events</a> page to attend training webinars.</li><li>Read the <a href=\"https://support.worldquantbrain.com/hc/en-us/search?filter_by=community&amp;query=%5Bbrain+tips&amp;utf8=%E2%9C%93\">BRAIN TIPS series</a> and the <a href=\"https://support.worldquantbrain.com/hc/en-us/search?content_tags=01GVTJQR8518KQMHP1JMCZ4Y99&amp;utf8=%E2%9C%93\">Beginner</a> posts in FAQs/ Forums</li><li>Try to create Alphas using available <a href=\"https://platform.worldquantbrain.com/data/data-sets/pv1\">Price volume</a> data fields or and, <a href=\"https://platform.worldquantbrain.com/learn/data-and-operators/operators\">Operators</a></li></ol><p></p><p></p>",
9
+ "id": "9a93f80b-cd7e-4c54-8c1f-ce8365c6eb20"
10
+ }
11
+ ],
12
+ "sequence": 29,
13
+ "category": "Getting Started"
14
+ }
@@ -0,0 +1,174 @@
1
+ {
2
+ "id": "intermediate-pack-part-2",
3
+ "title": "Intermediate Pack - Improve your Alpha [2/2]",
4
+ "lastModified": "2025-03-12T05:10:08.846145-04:00",
5
+ "content": [
6
+ {
7
+ "type": "HEADING",
8
+ "value": {
9
+ "level": "1",
10
+ "content": "Use Different Operators"
11
+ },
12
+ "id": "54427cb7-0cde-4bf4-bcf7-34a3cfd937e4"
13
+ },
14
+ {
15
+ "type": "TEXT",
16
+ "value": "<p>Remember the cross-sectional operators and time-series operators from the <a href=\"$tutorialpage/discover-brain/read-first-starter-pack\">Starter pack</a>? You can use them here. Secondly, you can try out different data fields. We recommend exploring the price volume dataset, model dataset and fundamental dataset. Lastly, you can tinker with different simulation settings. These tips should help improve the performance of your second Alpha.</p><p><b>Divide (/)</b></p><p>We can divide data fields with other data fields.</p><p>Imagine market data being a matrix, with each row representing one date and each column representing one stock. For example, the matrix for close price data of stocks in universe US TOP3000 would look like this:</p>",
17
+ "id": "64f1ecaf-05a0-411d-af64-899183c320a6"
18
+ },
19
+ {
20
+ "type": "IMAGE",
21
+ "value": {
22
+ "title": "pic3.png",
23
+ "width": 771,
24
+ "height": 152,
25
+ "fileSize": 39951,
26
+ "url": "https://api.worldquantbrain.com/content/images/zyZvfOxlAnwgdTTZ-B7UB9AVFc0=/241/original/pic3.png"
27
+ },
28
+ "id": "37bc8ee8-5d3e-49c8-a8c2-8f5d0081b676"
29
+ },
30
+ {
31
+ "type": "TEXT",
32
+ "value": "<p></p><p>And the matrix for open data of above stocks would look like this:</p><p></p>",
33
+ "id": "c680c7c0-f1af-4a52-b66e-7a2f40023419"
34
+ },
35
+ {
36
+ "type": "IMAGE",
37
+ "value": {
38
+ "title": "pic4.png",
39
+ "width": 771,
40
+ "height": 152,
41
+ "fileSize": 39898,
42
+ "url": "https://api.worldquantbrain.com/content/images/b_PTsgVo_U8vN0mZVDsXNWvw0Kk=/242/original/pic4.png"
43
+ },
44
+ "id": "8ad864b0-5015-4261-b7cf-4571cd682232"
45
+ },
46
+ {
47
+ "type": "TEXT",
48
+ "value": "<p>Say you enter an Alpha expression like <b><i>close/open</i></b> in the Simulate page found in the Alphas dropdown tab. When you click Simulate, BRAIN will evaluate the Alpha expression against the matrix of market data for each date and each stock.</p><p></p><p><b>Rank(x)</b></p><p>Description: the Rank operator ranks the value of the input data x for the given stock among all instruments, and returns float numbers equally distributed between 0.0 and 1.0</p><p>Alpha expression: <b><i>rank(sales/assets)</i></b>. If company B has a higher asset turnover ratio (sales/assets) than company A, stock B may outperform stock A. The rank operator helps to limit the extreme values of that ratio.</p><p>For example:</p>",
49
+ "id": "636fb046-195d-414d-9748-6089e8c864a9"
50
+ },
51
+ {
52
+ "type": "IMAGE",
53
+ "value": {
54
+ "title": "pic5.png",
55
+ "width": 771,
56
+ "height": 84,
57
+ "fileSize": 15942,
58
+ "url": "https://api.worldquantbrain.com/content/images/5DyPSU56mesHoyLmobTGUGtGF6Q=/222/original/pic5.png"
59
+ },
60
+ "id": "d610082a-b347-4de4-9b3a-cd1352584e7c"
61
+ },
62
+ {
63
+ "type": "TEXT",
64
+ "value": "<p>The numbers imply that if you have $126, you must use $100 to go long stock E (~80% of your total capital). So, your strategy would depend crucially on how the last stock performs. But, isn’t that too risky? Applying the rank function to the alpha expression <b><i>rank(sales/assets)</i></b>, you get:</p>",
65
+ "id": "93e27c28-c79c-49bc-9727-d5b8d7473138"
66
+ },
67
+ {
68
+ "type": "IMAGE",
69
+ "value": {
70
+ "title": "pic18.png",
71
+ "width": 771,
72
+ "height": 84,
73
+ "fileSize": 18443,
74
+ "url": "https://api.worldquantbrain.com/content/images/YrFJODUY_L-Tzube67j_76TriVk=/223/original/pic18.png"
75
+ },
76
+ "id": "c0607c73-dc92-4000-98fc-01413bf1e241"
77
+ },
78
+ {
79
+ "type": "TEXT",
80
+ "value": "<p>This time you see that the stock with the largest weight occupies only 40% of your portfolio.</p><p><b>Ts_rank &amp; Ts_delta Operator</b></p>",
81
+ "id": "fbab6eba-f8a1-4951-b040-92f6f497c60a"
82
+ },
83
+ {
84
+ "type": "IMAGE",
85
+ "value": {
86
+ "title": "pic6.png",
87
+ "width": 771,
88
+ "height": 368,
89
+ "fileSize": 181983,
90
+ "url": "https://api.worldquantbrain.com/content/images/ZaDUxf6tcA4QYK2CTUc0QBCpGr0=/224/original/pic6.png"
91
+ },
92
+ "id": "d2865565-8c65-4b21-ad59-00f517fa3f2e"
93
+ },
94
+ {
95
+ "type": "TEXT",
96
+ "value": "<p></p><p>Visual Illustration of Ts_rank Operator:</p>",
97
+ "id": "f72356fa-38d0-4210-9344-0714a80b8dab"
98
+ },
99
+ {
100
+ "type": "IMAGE",
101
+ "value": {
102
+ "title": "pic7.png",
103
+ "width": 771,
104
+ "height": 502,
105
+ "fileSize": 96245,
106
+ "url": "https://api.worldquantbrain.com/content/images/jN-BbRAavK12pOvzlkizS2DfCms=/225/original/pic7.png"
107
+ },
108
+ "id": "751f28b4-6ee2-40ca-be1a-d93915c8ecfc"
109
+ },
110
+ {
111
+ "type": "HEADING",
112
+ "value": {
113
+ "level": "1",
114
+ "content": "Change Simulation Settings"
115
+ },
116
+ "id": "83727ba4-4027-4614-b958-43f4d41b3286"
117
+ },
118
+ {
119
+ "type": "TEXT",
120
+ "value": "<p>In your first Alpha simulation, you left the simulation settings on default. Changing certain simulation settings may help you improve your Alpha results. We will go through Region, Universe, Neutralization, Decay and Truncation. The other settings will be covered in a later guide.</p>",
121
+ "id": "bd4132a8-e82d-49b9-b22f-e23a31eb9b1b"
122
+ },
123
+ {
124
+ "type": "IMAGE",
125
+ "value": {
126
+ "title": "pic8.png",
127
+ "width": 771,
128
+ "height": 453,
129
+ "fileSize": 57056,
130
+ "url": "https://api.worldquantbrain.com/content/images/WhHMxH-cWr_2qPP6vrblhP9QRPA=/226/original/pic8.png"
131
+ },
132
+ "id": "4d8cf368-10ef-4b0c-8be3-81b5dbed6e32"
133
+ },
134
+ {
135
+ "type": "TEXT",
136
+ "value": "<p><b>Region</b></p><p>Region refers to the market in which the Alpha will simulate trades, for example, the U.S. equity market or Chinese equity market.</p><p><b>Universe</b></p><p>Universe is a set of trading instruments ranked by their liquidity. For example, “US: TOP3000” represents the top 3,000 most liquid stocks in the U.S. market.</p><p><b>Decay</b></p><p>Decay is used for averaging the Alpha signal within a specified time window. The settings perform linear decay on the Alpha. Tip: Decay can be used to reduce turnover, but decay values that are too large will attenuate the signal.</p><p></p>",
137
+ "id": "3a14c39c-991a-48eb-8394-a90fff967c65"
138
+ },
139
+ {
140
+ "type": "IMAGE",
141
+ "value": {
142
+ "title": "pic9 (1).png",
143
+ "width": 677,
144
+ "height": 48,
145
+ "fileSize": 5531,
146
+ "url": "https://api.worldquantbrain.com/content/images/68s3CAL6Jmp2VQi-0-8SI4zVQFM=/217/original/pic9_1.png"
147
+ },
148
+ "id": "ca4d0b19-2dd8-4e0e-ad00-806cc386f994"
149
+ },
150
+ {
151
+ "type": "TEXT",
152
+ "value": "<p><b>Truncation</b></p><p>Truncation sets the maximum weight for each stock in the overall portfolio. It aims to guard against excessive exposure to movements in individual stocks. The recommended setting is between 0.05 and 0.1 (entailing 5-10%).</p><p><b>Neutralization</b></p><p>Market risks and industry specific risks are prevalent risks within equities. However, these risks can be reduced by creating long-short neutral portfolios using a concept called neutralization. After neutralizing the portfolios to market or industry specific groups, no net position is taken with respect to that group, i.e. allotting the same amount of dollars in long (buying) and short (selling) positions. That way, you are less exposed to risk, whether the entire market goes up or down.</p><p>When Neutralization = “Market/Industry/Sub-industry” it does the following operation: <i>Alpha = Alpha – mean(Alpha)</i> where Alpha is the vector of weights.</p>",
153
+ "id": "03cb2eb3-1d97-4069-b934-1beec8f22afc"
154
+ },
155
+ {
156
+ "type": "IMAGE",
157
+ "value": {
158
+ "title": "pic10.png",
159
+ "width": 771,
160
+ "height": 105,
161
+ "fileSize": 21736,
162
+ "url": "https://api.worldquantbrain.com/content/images/oe90T3rIXhTei2CRLQ83P4y2m0o=/227/original/pic10.png"
163
+ },
164
+ "id": "6971c126-fa53-4a02-9358-ce4fae976d2f"
165
+ },
166
+ {
167
+ "type": "TEXT",
168
+ "value": "<p>If the hypothetical book size is 20 million, we would end up investing $10 million in long positions and $10 million in short positions. Thus, no net position is taken with respect to the market. In other words, the long exposure cancels out the short exposure completely, making this hypothetical strategy market neutral.</p><p>The three different neutralization methods determine which groups are used for neutralizing Alpha values. The correct choice of neutralization depends on the logic or formula used by the Alpha. The results should indicate which neutralization will be most effective.</p>",
169
+ "id": "16919564-398f-4d20-b791-3887fd254515"
170
+ }
171
+ ],
172
+ "sequence": 5,
173
+ "category": "Getting Started"
174
+ }
@@ -0,0 +1,167 @@
1
+ {
2
+ "id": "intermediate-pack-part-1",
3
+ "title": "Intermediate Pack - Understand Results [1/2]",
4
+ "lastModified": "2025-09-08T05:22:10.878298-04:00",
5
+ "content": [
6
+ {
7
+ "type": "TEXT",
8
+ "value": "<p>This Intermediate guide aims to further your understanding of the Alphas you have simulated. The documentation will provide you with an in-depth understanding of commonly used operators and get you up to speed to improve your ability to create a high-performing Alpha.</p>",
9
+ "id": "c75deabb-4eca-41f1-97eb-dc0f19e078c3"
10
+ },
11
+ {
12
+ "type": "HEADING",
13
+ "value": {
14
+ "level": "1",
15
+ "content": "Understanding Your Results"
16
+ },
17
+ "id": "c8f2dd55-d0ec-4328-adff-a093e0eb975b"
18
+ },
19
+ {
20
+ "type": "TEXT",
21
+ "value": "<p></p><p><b>Cumulative PnL Chart</b></p>",
22
+ "id": "1cb8d31e-5349-43be-b7a3-c5b0633a0dee"
23
+ },
24
+ {
25
+ "type": "IMAGE",
26
+ "value": {
27
+ "title": "Cumulative PnL Chart",
28
+ "width": 978,
29
+ "height": 870,
30
+ "fileSize": 116115,
31
+ "url": "https://api.worldquantbrain.com/content/images/GwEgi_phuPYB7VPoAsMSdEiuEcA=/424/original/Intermediate_Results_1_Graphs.png"
32
+ },
33
+ "id": "68018bb4-f0fc-46dc-a42f-2412ec767f87"
34
+ },
35
+ {
36
+ "type": "TEXT",
37
+ "value": "<p>If you’ve followed the examples in the Starter pack, chances are you’ve ended up with the first 2 graphs. What both graphs have in common is that they have multiple periods of significant losses, producing a graph with high fluctuations. This means that your simulated portfolio could lose a large percentage of its value in one day, and that wouldn’t be ideal. Rather, a good Alpha should produce a steadily rising PnL chart (3rd graph) with few fluctuations and no major drawdown.</p><p><b>In-sample (IS) Summary</b></p><p>In-sample simulation uses data over a 5-year timeframe, and tests out how well your Alpha performs in the historical period. After the simulation, you will see the IS Summary row with 6 metrics: Sharpe, Turnover, Fitness, Returns, Drawdown, and Margin.</p>",
38
+ "id": "4ee97111-7208-40b1-a5b4-7ca54e44e177"
39
+ },
40
+ {
41
+ "type": "IMAGE",
42
+ "value": {
43
+ "title": "pic_155.png",
44
+ "width": 771,
45
+ "height": 121,
46
+ "fileSize": 39119,
47
+ "url": "https://api.worldquantbrain.com/content/images/KKvc6QqVmU1sEaOO6Wg6MsnBDc0=/243/original/pic_155.png"
48
+ },
49
+ "id": "ed503420-517b-4555-8a7b-f709cc062400"
50
+ },
51
+ {
52
+ "type": "TEXT",
53
+ "value": "<p><b>Sharpe</b></p><p>This ratio measures the excess return (or risk premium) per unit of deviation of returns of an Alpha. It takes the mean of the PnL divided by the standard deviation of the PnL. The higher the Sharpe Ratio or Information Ratio (IR), the more consistent the Alpha’s returns are potentially likely to be, and consistency is an ideal trait. The passing requirement for Sharpe on BRAIN is to be above 1.25.</p>",
54
+ "id": "4c5a57df-a066-41c0-acdb-024f48785d08"
55
+ },
56
+ {
57
+ "type": "EQUATION",
58
+ "value": "Sharpe =\\sqrt{252} * \\left(\\frac{Mean(PnL)}{Stdev(PnL)}\\right)",
59
+ "id": "15e0c3a5-2b64-4f13-aeae-0cbec6c4f1ed"
60
+ },
61
+ {
62
+ "type": "TEXT",
63
+ "value": "<p></p><p><b>Turnover</b></p><p>Turnover of an Alpha is metric that measures the simulated daily trading activity, i.e., how often the Alpha trades. It can be defined as the ratio of value traded to book size. The higher the turnover, the more often a trade occurs. Since trading incurs transaction costs, reducing turnover is generally an ideal trait. The passing requirement for turnover on BRAIN is to be between 1% and 70%.</p>",
64
+ "id": "5e9c6c2a-a2e2-4d99-9738-a851f5f237b1"
65
+ },
66
+ {
67
+ "type": "EQUATION",
68
+ "value": "Turnover= \\frac{Dollar Trading Value}{Booksize}",
69
+ "id": "ab857630-8460-424c-9a73-f1f49df7f90a"
70
+ },
71
+ {
72
+ "type": "TEXT",
73
+ "value": "<p></p><p><b>Fitness</b></p><p>Fitness of an Alpha is a function of Returns, Turnover &amp; Sharpe. Fitness is defined as:</p>",
74
+ "id": "61cd8c36-fd6e-4e36-99df-701572d80a7b"
75
+ },
76
+ {
77
+ "type": "EQUATION",
78
+ "value": "Fitness =Sharpe * \\sqrt{\\frac{abs(Returns)}{max(Turnover,0.125)}}",
79
+ "id": "56981411-da5f-46b5-96fd-70e30c093f40"
80
+ },
81
+ {
82
+ "type": "TEXT",
83
+ "value": "<p></p><p>Good Alphas generally have high fitness. You can seek to improve the performance of your Alphas by increasing Sharpe (or returns) and reducing turnover. The passing requirement for fitness on BRAIN is to be greater than 1.0.</p><p><b>Returns</b></p><p>Returns is the amount made or lost by the Alpha during a defined period and is expressed in percentages. BRAIN defines returns as:</p>",
84
+ "id": "706cd07e-1ff9-49bc-bbf1-b9e5b9d8f59f"
85
+ },
86
+ {
87
+ "type": "EQUATION",
88
+ "value": "Annual Return = \\frac{Annualized PnL}{0.5 * Book Size}",
89
+ "id": "679fca89-d850-4796-8308-fff5b5641dcf"
90
+ },
91
+ {
92
+ "type": "TEXT",
93
+ "value": "<p><b>Drawdown</b></p><p>Drawdown of an Alpha is the largest reduction in simulated PnL during a given period, expressed as a percentage. It is calculated as follows:</p>",
94
+ "id": "d9b12c61-df74-42fc-8671-d1b8c584e804"
95
+ },
96
+ {
97
+ "type": "EQUATION",
98
+ "value": "Drawdown = \\frac {Dollar Amount Of Largest Peak To Trough Gap In PnL}{0.5 * Book Size}",
99
+ "id": "27f97417-6827-4651-a111-85ebb6c72644"
100
+ },
101
+ {
102
+ "type": "TEXT",
103
+ "value": "<p></p><p><b>Margin</b></p><p>Margin is the simulated profit per dollar traded of an Alpha; calculated as:</p>",
104
+ "id": "30b92ca1-e80e-4f6d-8de0-16aaf35749cd"
105
+ },
106
+ {
107
+ "type": "EQUATION",
108
+ "value": "Margin = \\frac{PnL}{Total Dollars Traded}",
109
+ "id": "56405fdc-cc08-4b0f-872b-e4d8f64cfbbb"
110
+ },
111
+ {
112
+ "type": "HEADING",
113
+ "value": {
114
+ "level": "1",
115
+ "content": "Passing IS Stage and Troubleshooting"
116
+ },
117
+ "id": "e70bff92-8742-43ee-9f1d-7cffbe3ee246"
118
+ },
119
+ {
120
+ "type": "IMAGE",
121
+ "value": {
122
+ "title": "pic2.png",
123
+ "width": 771,
124
+ "height": 311,
125
+ "fileSize": 57002,
126
+ "url": "https://api.worldquantbrain.com/content/images/lzw_pauL0IDC-LmLZSajF_zIzpA=/240/original/pic2.png"
127
+ },
128
+ "id": "cd7c1086-2a90-4977-a065-7f2e2af3e396"
129
+ },
130
+ {
131
+ "type": "TEXT",
132
+ "value": "<p></p><ul><li>One of the most common challenges users face is Low Sharpe, and users commonly see that their Sharpe ratio is below the specified cutoff. How do you get a higher Sharpe? We suggest that you can either increase you Alpha return or reduce your volatility. Read more <a href=\"https://support.worldquantbrain.com/hc/en-us/community/posts/8123350778391-How-do-you-get-a-higher-Sharpe-\">here</a>.</li><li>Another challenge is the weight test that measures the capital concentration in each stock. You might see these error messages in your IS tests: “Maximum weight on an instrument is greater than 10%” OR “Weight is too strongly concentrated” OR “Too few instruments are assigned weight.” Common fixes to this include: Adding range-normalized functions such as rank, setting truncation at 0.1, and using ts_backfill. Read more <a href=\"https://support.worldquantbrain.com/hc/en-us/community/posts/8419305084823--BRAIN-TIPS-Weight-Coverage-common-issues-and-advice\">here</a>.</li><li>Another difficulty is that the Sub-universe Sharpe is not above cutoff. This means that the Sharpe in the sub-universe must be higher than at least one threshold. There are 2 thresholds that scale down Sharpe with sub-universe size.</li></ul>",
133
+ "id": "d0a996d1-937b-4ac5-b34c-23c9640cc1aa"
134
+ },
135
+ {
136
+ "type": "IMAGE",
137
+ "value": {
138
+ "title": "threshold main.PNG",
139
+ "width": 445,
140
+ "height": 109,
141
+ "fileSize": 8563,
142
+ "url": "https://api.worldquantbrain.com/content/images/9_dK9gcR2tOpkDKpj8bImpzlH0Q=/195/original/threshold_main.PNG"
143
+ },
144
+ "id": "3762f573-01e5-474e-ac59-497ee09d6060"
145
+ },
146
+ {
147
+ "type": "TEXT",
148
+ "value": "<p></p><p>Thus, you can try to improve the Sub-Universe Sharpe by increasing the Universe of instruments (i.e. selecting Top3000).</p>",
149
+ "id": "e5b4444c-9089-48b8-b3de-2a5b678c86d7"
150
+ },
151
+ {
152
+ "type": "HEADING",
153
+ "value": {
154
+ "level": "1",
155
+ "content": "Common Error Messages"
156
+ },
157
+ "id": "2f95b268-20b6-4af5-b437-a1b9b863f265"
158
+ },
159
+ {
160
+ "type": "TEXT",
161
+ "value": "<p></p><p><b>Syntax error in expression.</b></p><p>Check your spelling of the data fields and operators and ensure that your expression is logical. The tokens (operators and keywords) allowed in your Alpha expression can be found in the <a href=\"https://platform.worldquantbrain.com/data\">Available Market Data</a> and <a href=\"https://platform.worldquantbrain.com/learn/data-and-operators/operators\">Available Operators</a> pages. Alpha expressions also accept integers and floating point numbers.</p><p><b>Incompatible unit for input at index 0, expected \"Unit[]\", found \"Unit[CSPrice:1]\"</b></p><p>Unit warnings are provided for reference in simple cases and do not prevent submission. Usually, this warning appears when data fields having two different units are added or multiplied. E.g. if you add \"close\" to \"cap\". \"close\" has units of price but \"cap\" has units of price*shares. You can safely ignore these warnings if you're sure the Alpha correctly handles data units.</p>",
162
+ "id": "a30353f5-f89a-44e8-bbff-5975e5243522"
163
+ }
164
+ ],
165
+ "sequence": 4,
166
+ "category": "Getting Started"
167
+ }