Tested ingestion of minute data with a single market

This commit is contained in:
fredfortier
2017-10-13 21:00:47 -04:00
parent 93f4d31399
commit c52653c84e
5 changed files with 93 additions and 33 deletions
+10 -3
View File
@@ -1,16 +1,18 @@
import sys, traceback
from catalyst.errors import ZiplineError
def silent_except_hook(exctype, excvalue, exctraceback):
if exctype in [ PricingDataBeforeTradingError, PricingDataNotLoadedError,
SymbolNotFoundOnExchange, ]:
if exctype in [PricingDataBeforeTradingError, PricingDataNotLoadedError,
SymbolNotFoundOnExchange, ]:
fn = traceback.extract_tb(exctraceback)[-1][0]
ln = traceback.extract_tb(exctraceback)[-1][1]
print "Error traceback: {1} (line {2})\n" \
"{0.__name__}: {3}".format(exctype, fn, ln, excvalue)
"{0.__name__}: {3}".format(exctype, fn, ln, excvalue)
else:
sys.__excepthook__(exctype, excvalue, exctraceback)
sys.excepthook = silent_except_hook
@@ -168,6 +170,11 @@ class BundleNotFoundError(ZiplineError):
'See catalyst documentation for details.').strip()
class EmptyValuesInBundleError(ZiplineError):
msg = ('Found empty values in bundle {path} between '
'{start} and {end}.').strip()
class PricingDataBeforeTradingError(ZiplineError):
msg = ('Pricing data for trading pairs {symbols} on exchange {exchange} '
'starts on {first_trading_day}, but you are either trying to trade or '