From db8f73d5c6443a663e0c1a4f7b5663434aa486f9 Mon Sep 17 00:00:00 2001 From: Gourav Kumar Date: Sun, 11 Sep 2022 15:13:16 +0530 Subject: [PATCH] sortino tests are now passing --- tests/test_stats.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/test_stats.py b/tests/test_stats.py index 27be677..827447e 100644 --- a/tests/test_stats.py +++ b/tests/test_stats.py @@ -117,25 +117,25 @@ class TestSortino: ) assert round(sortino, 4) == -5.5233 - # sharpe_ratio = pft.sharpe_ratio( - # ts, - # risk_free_rate=0.052, - # from_date="2017-02-05", - # to_date="2021-12-31", - # return_period_unit="months", - # return_period_value=1, - # ) - # assert round(sharpe_ratio, 4) == 0.4898 + sortino = pft.sortino_ratio( + ts, + risk_free_rate=0.052, + from_date="2017-02-05", + to_date="2021-12-31", + return_period_unit="months", + return_period_value=1, + ) + assert round(sortino, 4) == -1.93 - # sharpe_ratio = pft.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 + sortino = pft.sortino_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(sortino, 4) == -3.9805 class TestBeta: