Merge pull request #1812 from quantopian/google-finance-for-benchmarking

BUG/MAINT: Switch over to Google for benchmarking
This commit is contained in:
Freddie Vargus
2017-06-05 12:09:55 -04:00
committed by GitHub
12 changed files with 6196 additions and 6921 deletions
Binary file not shown.
+3
View File
@@ -5,6 +5,7 @@ import shutil
import tarfile
import click
import matplotlib
import numpy as np
import pandas as pd
@@ -14,6 +15,8 @@ from zipline.testing import test_resource_path, tmp_dir
from zipline.utils.cache import dataframe_cache
matplotlib.use('Agg')
INPUT_DATA_START_DATE = pd.Timestamp('2004-01-02')
INPUT_DATA_END_DATE = pd.Timestamp('2014-12-31')
INPUT_DATA_SYMBOLS = (
+1 -1
View File
@@ -385,7 +385,7 @@ class TestRisk(WithTradingEnvironment, ZiplineTestCase):
def test_partial_month(self):
start_session = self.trading_calendar.minute_to_session_label(
pd.Timestamp("1991-01-01", tz='UTC')
pd.Timestamp("1993-02-01", tz='UTC')
)
# 1992 and 1996 were leap years
+8 -6
View File
@@ -21,11 +21,12 @@ import pandas as pd
from zipline import examples
from zipline.data.bundles import register, unregister
from zipline.testing import test_resource_path, copy_market_data
from zipline.testing.fixtures import WithTmpDir, ZiplineTestCase, \
WithTradingEnvironment
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
@@ -54,10 +55,11 @@ class ExamplesTests(WithTmpDir, ZiplineTestCase):
serialization='pickle',
)
copy_market_data(WithTradingEnvironment.MARKET_DATA_DIR,
cls.tmpdir.getpath('example_data/root'))
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(examples.EXAMPLE_MODULES)
@parameterized.expand(sorted(examples.EXAMPLE_MODULES))
def test_example(self, example_name):
actual_perf = examples.run_example(
example_name,