v1.2.0: 新增量化策略模块(6主流策略全市场回测+单股净值曲线/交易明细),策略: 双均线/MACD/RSI/布林带/动量/N日突破
This commit is contained in:
@@ -404,6 +404,7 @@ def build_vectors(news, stocks):
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--skip-vector", action="store_true", help="跳过向量索引重建")
|
||||
parser.add_argument("--no-strategies", action="store_true", help="跳过量化策略回测")
|
||||
args = parser.parse_args()
|
||||
|
||||
print(">>> 初始化数据库 ...")
|
||||
@@ -461,6 +462,14 @@ def main():
|
||||
else:
|
||||
print(" (跳过)")
|
||||
|
||||
print(">>> 量化策略全市场回测 ...")
|
||||
if not args.no_strategies:
|
||||
from engine.strategies import build_all, STRATEGIES
|
||||
cnt = build_all()
|
||||
print(f" 回测记录 {cnt} 条({len(STRATEGIES)} 策略 × 全市场)")
|
||||
else:
|
||||
print(" (跳过)")
|
||||
|
||||
from database import table_count
|
||||
print("=" * 50)
|
||||
print("数据库统计:")
|
||||
|
||||
Reference in New Issue
Block a user