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:
Richard Frank
2013-03-01 16:05:39 -05:00
committed by Eddie Hebert
parent f1ff9cee0d
commit ebdb5429aa
7 changed files with 40 additions and 41 deletions
+2 -3
View File
@@ -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.
@@ -23,6 +23,7 @@ from collections import OrderedDict
from treasuries import get_treasury_data
from benchmarks import get_benchmark_returns
from zipline.protocol import DailyReturn
from zipline.utils.date_utils import tuple_to_date
from operator import attrgetter
@@ -91,8 +92,6 @@ def get_benchmark_filename(symbol):
def load_market_data(bm_symbol='^GSPC'):
from zipline.finance.trading import DailyReturn
try:
fp_bm = get_datafile(get_benchmark_filename(bm_symbol), "rb")
except IOError: