mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-05 20:13:53 +08:00
Merge pull request #59 from quantopian/fawce_alpha1
added a created date to the risk report.
This commit is contained in:
@@ -41,7 +41,7 @@ import datetime
|
||||
import math
|
||||
import numpy as np
|
||||
import numpy.linalg as la
|
||||
import zipline.protocol as zp
|
||||
from zipline.utils.date_utils import epoch_now
|
||||
|
||||
LOGGER = logging.getLogger('ZiplineLogger')
|
||||
|
||||
@@ -331,6 +331,7 @@ class RiskReport():
|
||||
self.algorithm_returns = algorithm_returns
|
||||
self.trading_environment = trading_environment
|
||||
self.exceeded_max_loss = exceeded_max_loss
|
||||
self.created = epoch_now()
|
||||
|
||||
if len(self.algorithm_returns) == 0:
|
||||
start_date = self.trading_environment.period_start
|
||||
@@ -364,7 +365,8 @@ class RiskReport():
|
||||
'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],
|
||||
'exceeded_max_loss' : self.exceeded_max_loss
|
||||
'exceeded_max_loss' : self.exceeded_max_loss,
|
||||
'created' : self.created
|
||||
}
|
||||
|
||||
def periodsInRange(self, months_per, start, end):
|
||||
|
||||
Reference in New Issue
Block a user