MAINT: Remove redundant create of numpy arrays.

Now that the cumulative risk module uses pd.Series instead of lists,
it is unnecessary to call `np.array` on the stored values.
This commit is contained in:
Eddie Hebert
2013-10-07 18:06:05 -04:00
parent 71f03e9537
commit 2badf7557b
+3 -4
View File
@@ -317,7 +317,7 @@ algorithm_returns ({algo_count}) in range {start} : {end} on {dt}"
if mar is None:
mar = self.treasury_period_return
return sortino_ratio(np.array(self.algorithm_returns),
return sortino_ratio(self.algorithm_returns,
self.algorithm_period_returns[self.latest_dt],
mar)
@@ -325,9 +325,8 @@ algorithm_returns ({algo_count}) in range {start} : {end} on {dt}"
"""
http://en.wikipedia.org/wiki/Information_ratio
"""
A = np.array
return information_ratio(A(self.algorithm_returns),
A(self.benchmark_returns))
return information_ratio(self.algorithm_returns,
self.benchmark_returns)
def calculate_alpha(self, dt):
"""