mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-11 09:28:22 +08:00
TST: Update to empyrical, increase test coverage
ENH: Resolve rebase conflict by using updated example_data.tar TST: Increase test coverage for risk portion of zipline
This commit is contained in:
@@ -873,10 +873,10 @@ def before_trading_start(context, data):
|
||||
|
||||
res2 = algo2.run(self.data_portal)
|
||||
|
||||
# FIXME I think we are getting Nans due to fixed benchmark,
|
||||
# so dropping them for now.
|
||||
res1 = res1.fillna(method='ffill')
|
||||
res2 = res2.fillna(method='ffill')
|
||||
# There are some np.NaN values in the first row because there is not
|
||||
# enough data to calculate the metric, e.g. beta.
|
||||
res1 = res1.fillna(value=0)
|
||||
res2 = res2.fillna(value=0)
|
||||
|
||||
np.testing.assert_array_equal(res1, res2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user