Skip to content

Commit

Permalink
0.9.42 update
Browse files Browse the repository at this point in the history
  • Loading branch information
zengbin93 committed Feb 4, 2024
1 parent 895d556 commit 494a329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ def test_daily_performance():
daily_returns = np.array([0.01, 0.02, -0.01, 0.03, 0.02, -0.02, 0.01, -0.01, 0.02, 0.01])
result = daily_performance(daily_returns)
assert result == {'年化': 2.016, '夏普': 5, '最大回撤': 0.02, '卡玛': 10, '日胜率': 0.7, '年化波动率': 0.2439,
'非零覆盖': 1.0, '盈亏平衡点': 0.7, '新高间隔': 4, '新高占比': 0.6}
'非零覆盖': 1.0, '盈亏平衡点': 0.7, '新高间隔': 5, '新高占比': 0.6}

result = daily_performance([0.01, 0.02, -0.01, 0.03, 0.02, -0.02, 0.01, -0.01, 0.02, 0.01])
assert result == {'年化': 2.016, '夏普': 5, '最大回撤': 0.02, '卡玛': 10, '日胜率': 0.7, '年化波动率': 0.2439,
'非零覆盖': 1.0, '盈亏平衡点': 0.7, '新高间隔': 4, '新高占比': 0.6}
'非零覆盖': 1.0, '盈亏平衡点': 0.7, '新高间隔': 5, '新高占比': 0.6}


def test_find_most_similarity():
Expand Down

0 comments on commit 494a329

Please sign in to comment.