risk.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. # 博弈式风险管理体系配置
  2. # 反脆弱仓位管理
  3. position_sizing:
  4. # 基础凯利公式
  5. kelly:
  6. fraction: 0.5 # 半凯利(保守)
  7. max_position: 1.0 # 最大仓位
  8. min_position: 0.0 # 最小仓位
  9. # 凸性调节
  10. convexity:
  11. enabled: true
  12. gamma: 0.2 # 凸性系数
  13. positive_boost: 0.1 # 正凸性提升
  14. negative_penalty: 0.15 # 负凸性惩罚
  15. # 生态适应系数
  16. regime_adjustment:
  17. spring: 1.0
  18. summer: 1.2
  19. autumn: 0.8
  20. winter: 0.5
  21. # 单品种限制
  22. single_symbol:
  23. max_weight: 0.30 # 最大30%
  24. # 风险预算系统
  25. risk_budget:
  26. # 预算分配
  27. allocation:
  28. monthly_pct: 0.05 # 月度风险预算(账户价值5%)
  29. cooling_period_days: 3 # 冷却期(交易日)
  30. # 触发阈值
  31. thresholds:
  32. warning: 0.10 # 预警(预算消耗10%)
  33. cooling: 0.20 # 冷却触发(预算消耗20%)
  34. stop: 0.50 # 停止交易(预算消耗50%)
  35. # 计算方式
  36. calculation:
  37. method: "actual_loss" # "actual_loss", "var_based"
  38. lookback_trades: 20 # 回看交易次数
  39. # 动态对冲矩阵
  40. hedging:
  41. # 系统性风险对冲
  42. systematic:
  43. enabled: true
  44. beta_threshold: 1.2
  45. hedge_instruments:
  46. - put_option # 买入Put
  47. - index_future # 股指期货
  48. hedge_ratio: 0.5 # 对冲比例
  49. # 波动率对冲
  50. volatility:
  51. enabled: true
  52. iv_rank_threshold: 80
  53. instruments:
  54. - vix_etf # VIX ETF
  55. - long_straddle # 买入跨式
  56. allocation: 0.05 # 占账户5%
  57. # 流动性对冲
  58. liquidity:
  59. enabled: true
  60. health_threshold: 30
  61. safe_assets:
  62. - money_market # 货币基金
  63. - treasury_etf # 国债ETF
  64. max_allocation: 0.30 # 最大30%
  65. # 行业集中对冲
  66. concentration:
  67. enabled: true
  68. single_sector_max: 0.40 # 单一行业最大40%
  69. hedge_method: "sector_etf" # "sector_etf", "pair_trading"
  70. # 压力测试引擎
  71. stress_test:
  72. # 历史场景
  73. historical_scenarios:
  74. - name: "2008_financial_crisis"
  75. period: ["2008-09-01", "2008-12-31"]
  76. shock_magnitude: -0.40
  77. - name: "2015_ah_share_crash"
  78. period: ["2015-06-01", "2015-08-31"]
  79. shock_magnitude: -0.35
  80. - name: "2020_covid_crash"
  81. period: ["2020-02-01", "2020-03-31"]
  82. shock_magnitude: -0.30
  83. - name: "2022_bear_market"
  84. period: ["2022-01-01", "2022-10-31"]
  85. shock_magnitude: -0.25
  86. # 蒙特卡洛参数
  87. monte_carlo:
  88. n_simulations: 1000
  89. time_horizon_days: 20
  90. confidence_level: 0.99
  91. # 触发条件
  92. triggers:
  93. var_limit: 0.15 # VaR限制15%
  94. auto_reduce: true # 自动减仓
  95. # 组合级硬止损
  96. hard_limits:
  97. # 回撤止损
  98. drawdown:
  99. max_drawdown: 0.15 # 最大回撤15%
  100. action: "liquidate_all" # "liquidate_all", "reduce_50"
  101. cooldown_days: 5 # 冷静期
  102. # 单日止损
  103. daily_loss:
  104. max_daily_loss: 0.05 # 单日最大亏损5%
  105. action: "reduce_50"
  106. pause_new_positions: true # 暂停新开仓
  107. # 连续亏损
  108. consecutive_losses:
  109. max_count: 5 # 最大连续亏损次数
  110. action: "reduce_50"
  111. # 风险监控
  112. monitoring:
  113. # 实时监控频率
  114. realtime_interval_seconds: 30
  115. # 风险指标
  116. metrics:
  117. - var_95 # 95% VaR
  118. - cvar_95 # 95% CVaR
  119. - beta # 组合Beta
  120. - correlation # 智能体间相关性
  121. - concentration # 集中度
  122. # 告警阈值
  123. alerts:
  124. var_threshold: 0.10
  125. correlation_threshold: 0.7
  126. concentration_threshold: 0.40