MAINT: Removed last_return_date from risk object.

Since we are also tracking this value with latest_dt, reading the
last_return_date from the returns is no longer needed.
This commit is contained in:
Eddie Hebert
2013-09-25 13:52:30 -04:00
parent a60d5c99a9
commit fcd62d538b
+1 -5
View File
@@ -116,10 +116,6 @@ class RiskMetricsCumulative(object):
def get_daily_index(self):
return self.trading_days
@property
def last_return_date(self):
return self.algorithm_returns.index[-1]
def update(self, dt, algorithm_returns, benchmark_returns):
# Keep track of latest dt for use in to_dict and other methods
# that report current state.
@@ -191,8 +187,8 @@ algorithm_returns ({algo_count}) in range {start} : {end} on {dt}"
Creates a dictionary representing the state of the risk report.
Returns a dict object of the form:
"""
period_label = self.last_return_date.strftime("%Y-%m")
dt = self.latest_dt
period_label = dt.strftime("%Y-%m")
rval = {
'trading_days': len(self.algorithm_returns.valid()),
'benchmark_volatility':