mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-12 11:50:11 +08:00
MAINT: Skip more rows to match change in treasury data format
I'm not sure what the raw csv pulled from the federal reserve looked like before, but when trying to download fresh treasure data (data not stored in `./zipline`), there is an error that says "Time Period not in list". After checking the raw csv now, it looks like there are 5 header rows rather than just 1, so skipping those rows removes that error.
This commit is contained in:
@@ -25,6 +25,8 @@ from zipline.testing import test_resource_path
|
||||
from zipline.testing.fixtures import WithTmpDir, ZiplineTestCase
|
||||
from zipline.testing.predicates import assert_equal
|
||||
from zipline.utils.cache import dataframe_cache
|
||||
from zipline.utils.paths import ensure_file
|
||||
|
||||
|
||||
# Otherwise the next line sometimes complains about being run too late.
|
||||
_multiprocess_can_split_ = False
|
||||
@@ -53,6 +55,10 @@ class ExamplesTests(WithTmpDir, ZiplineTestCase):
|
||||
serialization='pickle',
|
||||
)
|
||||
|
||||
market_data = ('SPY_benchmark.csv', 'treasury_curves.csv')
|
||||
for data in market_data:
|
||||
ensure_file(cls.tmpdir.getpath('example_data/root/data/' + data))
|
||||
|
||||
@parameterized.expand(sorted(examples.EXAMPLE_MODULES))
|
||||
def test_example(self, example_name):
|
||||
actual_perf = examples.run_example(
|
||||
|
||||
Reference in New Issue
Block a user