mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-13 12:00:16 +08:00
MAINT: Moved DailyReturn to protocol module to break circular references
and removed code that solved that same problem with conditional imports.
This commit is contained in:
committed by
Eddie Hebert
parent
f1ff9cee0d
commit
ebdb5429aa
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2012 Quantopian, Inc.
|
||||
# Copyright 2013 Quantopian, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -21,8 +21,9 @@ import pytz
|
||||
import numpy as np
|
||||
|
||||
import zipline.finance.risk as risk
|
||||
|
||||
import zipline.finance.trading as trading
|
||||
from zipline.protocol import DailyReturn
|
||||
|
||||
from test_risk import RETURNS
|
||||
|
||||
|
||||
@@ -52,7 +53,7 @@ class RiskCompareIterativeToBatch(unittest.TestCase):
|
||||
|
||||
cur_returns = []
|
||||
for i, ret in enumerate(RETURNS):
|
||||
todays_return_obj = trading.DailyReturn(
|
||||
todays_return_obj = DailyReturn(
|
||||
todays_date,
|
||||
ret
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user