mirror of
https://ghfast.top/https://github.com/aeroxw/easy-tdx.git
synced 2026-09-12 16:54:17 +08:00
feat(backtest): v4.2 新增 FSL 分水岭指标策略(单标的/组合/寻优)
- MyTT.py: 新增 FSL(CLOSE, VOL, CAPITAL) 分水岭指标
- SWL = (EMA(C,5)*7 + EMA(C,10)*3) / 10
- SWS = DMA(EMA(C,12), MAX(1, 100*SUM(VOL,5)/(3*CAPITAL)))
MIN(A,1.0) 模拟通达信 DMA(X,A) 内部钳制 A<=1 的语义
- MyTT.pyi: 补 FSL 类型 stub(CI mypy 用 .pyi 校验)
- strategies/builtin.py: 注册 FslStrategy(SWL/SWS 金叉死叉)
capital 作为 Param 暴露流通股本输入
- strategies/presets.py: fsl 寻优网格(4 档 capital)
- tests: 注册表断言加 fsl,阈值 18→19
This commit is contained in:
@@ -59,7 +59,8 @@ def test_registry_has_builtin_strategies():
|
||||
assert "boll_breakout" in names
|
||||
assert "rsi_reversal" in names
|
||||
assert "kdj_cross" in names
|
||||
assert len(names) >= 18
|
||||
assert "fsl" in names
|
||||
assert len(names) >= 19
|
||||
|
||||
|
||||
def test_strategy_schema_serialization():
|
||||
|
||||
Reference in New Issue
Block a user