mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-06 13:00:45 +08:00
ENH: Adds quantopian-quandl bundle as new default.
This data bundle will use the quantopian mirror of the quandl WIKI data instead of downloading from quandl directly. This dramatically improves the speed because we do not pay the rate limiting for quandl and we can send the data in the format zipline expects.
This commit is contained in:
@@ -12,9 +12,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This code is based on a unittest written by John Salvatier:
|
||||
# https://github.com/pymc-devs/pymc/blob/pymc3/tests/test_examples.py
|
||||
from functools import partial
|
||||
import tarfile
|
||||
|
||||
import matplotlib
|
||||
@@ -22,6 +20,7 @@ from nose_parameterized import parameterized
|
||||
import pandas as pd
|
||||
|
||||
from zipline import examples, run_algorithm
|
||||
from zipline.data.bundles import register, unregister
|
||||
from zipline.testing import test_resource_path
|
||||
from zipline.testing.fixtures import WithTmpDir, ZiplineTestCase
|
||||
from zipline.testing.predicates import assert_equal
|
||||
@@ -76,6 +75,9 @@ class ExamplesTests(WithTmpDir, ZiplineTestCase):
|
||||
def init_class_fixtures(cls):
|
||||
super(ExamplesTests, cls).init_class_fixtures()
|
||||
|
||||
register('test', lambda *args: None)
|
||||
cls.add_class_callback(partial(unregister, 'test'))
|
||||
|
||||
with tarfile.open(test_resource_path('example_data.tar.gz')) as tar:
|
||||
tar.extractall(cls.tmpdir.path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user