From 4c3554042e06d4ff420c81cb5b73483152e1d8fe Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Wed, 14 Nov 2012 18:25:57 -0500 Subject: [PATCH] Revert "Removes `created` member from risk metrics." This reverts commit 18587b0623e25e0c35bcc3e36fe85f54edfcb7ce. Reverting until we can support the removal in internal code. --- zipline/finance/risk.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zipline/finance/risk.py b/zipline/finance/risk.py index 51fdb865..29893018 100644 --- a/zipline/finance/risk.py +++ b/zipline/finance/risk.py @@ -57,6 +57,7 @@ import datetime import math import numpy as np import numpy.linalg as la +from zipline.utils.date_utils import epoch_now log = logbook.Logger('Risk') @@ -573,6 +574,7 @@ class RiskReport(object): self.algorithm_returns = algorithm_returns self.trading_environment = trading_environment + self.created = epoch_now() if len(self.algorithm_returns) == 0: start_date = self.trading_environment.period_start @@ -607,6 +609,7 @@ class RiskReport(object): 'three_month': [x.to_dict() for x in self.three_month_periods], 'six_month': [x.to_dict() for x in self.six_month_periods], 'twelve_month': [x.to_dict() for x in self.year_periods], + 'created': self.created } def periods_in_range(self, months_per, start, end):