Skip to content

Commit

Permalink
0.9.39 update
Browse files Browse the repository at this point in the history
  • Loading branch information
zengbin93 committed Dec 14, 2023
1 parent 3b3eb63 commit 64fd213
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion czsc/traders/weight_backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def __init__(self, dfw, digits=2, **kwargs) -> None:
self.fee_rate = kwargs.get('fee_rate', 0.0002)
self.dfw['weight'] = self.dfw['weight'].astype('float').round(digits)
self.symbols = list(self.dfw['symbol'].unique().tolist())
self.results = self.backtest(n_jobs=kwargs.get('n_jobs', int(cpu_count() / 2)))
default_n_jobs = min(cpu_count() // 2, len(self.symbols))
self.results = self.backtest(n_jobs=kwargs.get('n_jobs', default_n_jobs))

def get_symbol_daily(self, symbol):
"""获取某个合约的每日收益率
Expand Down

0 comments on commit 64fd213

Please sign in to comment.