More Sharpe tests

This commit is contained in:
Gourav Kumar 2022-05-16 22:29:18 +05:30
parent 5512a647ad
commit 95e9bfd51c

View File

@ -72,3 +72,13 @@ class TestSharpe:
return_period_value=1, return_period_value=1,
) )
assert round(sharpe_ratio, 4) == 0.4898 assert round(sharpe_ratio, 4) == 0.4898
sharpe_ratio = fc.sharpe_ratio(
ts,
risk_free_rate=0.052,
from_date="2018-01-01",
to_date="2021-12-31",
return_period_unit="months",
return_period_value=12,
)
assert round(sharpe_ratio, 4) == 0.3199