strategies.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. [
  2. {
  3. "id": "strategy-1",
  4. "name": "BTC 等量对刷策略",
  5. "enabled": true,
  6. "type": "EQUAL_VOLUME",
  7. "symbol": "BTC",
  8. "accounts": ["account-1", "account-2"],
  9. "parameters": {
  10. "orderSize": 0.01,
  11. "priceSpread": 0.0001,
  12. "interval": 5000,
  13. "maxVolume": 1.0
  14. },
  15. "triggers": [
  16. {
  17. "type": "time",
  18. "schedule": "0 9 * * *",
  19. "enabled": true
  20. },
  21. {
  22. "type": "price_change",
  23. "threshold": 0.02,
  24. "enabled": false
  25. },
  26. {
  27. "type": "volume_spike",
  28. "threshold": 1.5,
  29. "enabled": false
  30. }
  31. ],
  32. "risk": {
  33. "maxPosition": 0.1,
  34. "stopLoss": 0.05,
  35. "maxDailyVolume": 10.0
  36. }
  37. },
  38. {
  39. "id": "strategy-2",
  40. "name": "BTC 做市策略",
  41. "enabled": false,
  42. "type": "MARKET_MAKING",
  43. "symbol": "BTC",
  44. "accounts": ["account-1", "account-2"],
  45. "parameters": {
  46. "bidSpread": 0.0005,
  47. "askSpread": 0.0005,
  48. "orderSize": 0.005,
  49. "refreshInterval": 10000,
  50. "maxOrders": 5
  51. },
  52. "triggers": [
  53. {
  54. "type": "time",
  55. "schedule": "0 */2 * * *",
  56. "enabled": true
  57. },
  58. {
  59. "type": "volatility",
  60. "threshold": 0.01,
  61. "enabled": true
  62. }
  63. ],
  64. "risk": {
  65. "maxPosition": 0.05,
  66. "stopLoss": 0.03,
  67. "maxDailyVolume": 5.0
  68. }
  69. },
  70. {
  71. "id": "strategy-3",
  72. "name": "BTC 趋势跟随策略",
  73. "enabled": false,
  74. "type": "TREND_FOLLOWING",
  75. "symbol": "BTC",
  76. "accounts": ["account-1", "account-2"],
  77. "parameters": {
  78. "maPeriod": 20,
  79. "orderSize": 0.02,
  80. "priceSpread": 0.0002,
  81. "trendThreshold": 0.001
  82. },
  83. "triggers": [
  84. {
  85. "type": "technical_signal",
  86. "indicator": "MA_CROSSOVER",
  87. "enabled": true
  88. },
  89. {
  90. "type": "momentum",
  91. "threshold": 0.005,
  92. "enabled": true
  93. }
  94. ],
  95. "risk": {
  96. "maxPosition": 0.2,
  97. "stopLoss": 0.08,
  98. "maxDailyVolume": 15.0
  99. }
  100. },
  101. {
  102. "id": "delta-neutral-strategy",
  103. "name": "Delta中性敞口持仓策略",
  104. "enabled": true,
  105. "type": "DELTA_NEUTRAL",
  106. "symbol": "BTC",
  107. "accounts": ["account-1", "account-2"],
  108. "parameters": {
  109. "targetDeltaRatio": 0.6,
  110. "hedgeRatio": 0.4,
  111. "basePositionSize": 0.1,
  112. "hedgeOrderSize": 0.01,
  113. "priceSpread": 0.0001,
  114. "rebalanceThreshold": 0.05,
  115. "maxHedgeVolume": 2.0,
  116. "hedgeInterval": 3000,
  117. "positionCheckInterval": 10000
  118. },
  119. "triggers": [
  120. {
  121. "type": "frequency",
  122. "interval": 30000,
  123. "enabled": true,
  124. "parameters": {
  125. "description": "每5分钟执行一次Delta中性策略检查",
  126. "startTime": "09:00",
  127. "endTime": "21:00",
  128. "timezone": "Asia/Shanghai"
  129. }
  130. },
  131. {
  132. "type": "delta_deviation",
  133. "threshold": 0.03,
  134. "enabled": true,
  135. "parameters": {
  136. "description": "Delta偏离超过3%时触发再平衡"
  137. }
  138. },
  139. {
  140. "type": "price_change",
  141. "threshold": 0.02,
  142. "enabled": true,
  143. "parameters": {
  144. "description": "价格变化超过2%时触发对冲"
  145. }
  146. },
  147. {
  148. "type": "volatility",
  149. "threshold": 0.015,
  150. "enabled": true,
  151. "parameters": {
  152. "description": "波动率超过1.5%时增加对冲频率"
  153. }
  154. }
  155. ],
  156. "risk": {
  157. "maxPosition": 0.2,
  158. "stopLoss": 0.08,
  159. "maxDailyVolume": 20.0,
  160. "maxDeltaExposure": 0.1,
  161. "maxHedgeLoss": 0.05
  162. }
  163. }
  164. ]