Added more volatility tests
This commit is contained in:
parent
1758df0124
commit
2237692677
@ -168,3 +168,12 @@ class TestVolatility:
|
|||||||
assert round(sd, 6) == 0.023164
|
assert round(sd, 6) == 0.023164
|
||||||
sd = ts.volatility(from_date="2017-10-01", to_date="2019-08-31", annualize_volatility=True)
|
sd = ts.volatility(from_date="2017-10-01", to_date="2019-08-31", annualize_volatility=True)
|
||||||
assert round(sd, 6) == 0.050559
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user