From 22376926771180d74e2f2f975a73bde8fac3519d Mon Sep 17 00:00:00 2001 From: Gourav Kumar Date: Sun, 13 Mar 2022 22:52:41 +0530 Subject: [PATCH] Added more volatility tests --- tests/test_fincal2.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_fincal2.py b/tests/test_fincal2.py index d289229..4447792 100644 --- a/tests/test_fincal2.py +++ b/tests/test_fincal2.py @@ -168,3 +168,12 @@ class TestVolatility: assert round(sd, 6) == 0.023164 sd = ts.volatility(from_date="2017-10-01", to_date="2019-08-31", annualize_volatility=True) assert round(sd, 6) == 0.050559 + sd = ts.volatility(from_date="2017-02-01", frequency="M", return_period_unit="months") + assert round(sd, 6) == 0.050884 + sd = ts.volatility( + frequency="M", + return_period_unit="months", + return_period_value=3, + annualize_volatility=False, + ) + assert round(sd, 6) == 0.020547