From 95e9bfd51cee5380f3880c409c8e81c53e1a4f03 Mon Sep 17 00:00:00 2001 From: Gourav Kumar Date: Mon, 16 May 2022 22:29:18 +0530 Subject: [PATCH] More Sharpe tests --- tests/test_stats.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_stats.py b/tests/test_stats.py index e178474..7c7af42 100644 --- a/tests/test_stats.py +++ b/tests/test_stats.py @@ -72,3 +72,13 @@ class TestSharpe: return_period_value=1, ) 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