Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuangn committed Nov 5, 2024
1 parent 555ad71 commit 6df6ad3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backtest/bar_analysis/daily_backtest_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def simple_strategy(self, strategy_param, is_plot=False):

# 自己计算所有绩效,都是每日挣取的bp数,或者多少元
indicator_df['daily_return'] = indicator_df['nv'] / indicator_df['pre_close'] # 日收益率
from .empyrical.stats import max_drawdown, annual_return
from ..empyrical.stats import max_drawdown, annual_return

# 净值
indicator_df['net_value'] = (1 + indicator_df['daily_return']).cumprod(axis=0)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6df6ad3

Please sign in to comment.