feat: 研究Tab支持10年回测区间(v_mr 10y成绩可见)

- server.py: /api/research/backtest days映射补 5y(1825)/10y(3650),修复5y静默回退185天bug
- static/index.html: 时间区间下拉加近10年选项 + ptMap加10y
- 附带: mr_scanner v_mr实盘扫描器 + market_watch接入(2af2e934已含)
This commit is contained in:
xxm
2026-08-02 22:52:55 +08:00
parent 2af2e93408
commit 95ad45c096
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -556,7 +556,7 @@ def api_research_backtest():
market = request.args.get('market', 'all') # all | a | hk
capital = float(request.args.get('capital', 1000000))
end_date = '2026-07-24' # 数据完整截止日
days = {'1m': 30, '6m': 185, '1y': 365, '2y': 730}.get(period, 185)
days = {'1m': 30, '6m': 185, '1y': 365, '2y': 730, '5y': 1825, '10y': 3650}.get(period, 185)
start_date = (datetime.strptime(end_date, '%Y-%m-%d') - timedelta(days=days)).strftime('%Y-%m-%d')
try:
from strategy_lab import run_backtest, analyze_trade_list, save_analysis