Skip to content

Commit

Permalink
0.9.58 update
Browse files Browse the repository at this point in the history
  • Loading branch information
zengbin93 committed Aug 29, 2024
1 parent 57c80b4 commit 474e74b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions czsc/traders/weight_backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ def backtest(self, n_jobs=1):
alpha = self.alpha.copy()
stats["与基准相关性"] = round(alpha["策略"].corr(alpha["基准"]), 4)
alpha_short = alpha[alpha["基准"] < 0].copy()
stats['与基准空头相关性'] = round(alpha_short["策略"].corr(alpha_short["基准"]), 4)
stats['品种数量'] = len(symbols)
stats["与基准空头相关性"] = round(alpha_short["策略"].corr(alpha_short["基准"]), 4)
stats["品种数量"] = len(symbols)

res["绩效评价"] = stats
return res
Expand Down

0 comments on commit 474e74b

Please sign in to comment.