mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 13:35:43 +08:00
marked a todo for a calculation bug
This commit is contained in:
@@ -187,6 +187,8 @@ class RiskMetrics():
|
||||
return period_returns, returns
|
||||
|
||||
def calculate_volatility(self, daily_returns):
|
||||
# TODO: we should be using an annualized number for the
|
||||
# square root, not the days in the period.
|
||||
return np.std(daily_returns, ddof=1) * math.sqrt(self.trading_days)
|
||||
|
||||
def calculate_sharpe(self):
|
||||
|
||||
Reference in New Issue
Block a user