mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-13 12:00:16 +08:00
Refactored optimize factory. Enabled optimize unittests.
This commit is contained in:
@@ -7,7 +7,7 @@ import numpy as np
|
||||
|
||||
from zipline.core.devsimulator import AddressAllocator
|
||||
# TODO: refactor the factory to use generators
|
||||
# from zipline.optimize.factory import create_predictable_zipline
|
||||
from zipline.optimize.factory import create_predictable_zipline
|
||||
|
||||
DEFAULT_TIMEOUT = 15 # seconds
|
||||
EXTENDED_TIMEOUT = 90
|
||||
@@ -38,7 +38,7 @@ class TestUpDown(TestCase):
|
||||
def tearDown(self):
|
||||
teardown_logger(self)
|
||||
|
||||
@skip
|
||||
# @skip
|
||||
@timed(DEFAULT_TIMEOUT)
|
||||
def test_source_and_orders(self):
|
||||
"""verify that UpDownSource is having the correct
|
||||
@@ -94,7 +94,7 @@ class TestUpDown(TestCase):
|
||||
"Algorithm did not sell when price was going to increase."
|
||||
)
|
||||
|
||||
@skip
|
||||
# @skip
|
||||
def test_concavity_of_returns(self):
|
||||
"""verify concave relationship between free parameter and
|
||||
returns in certain region around the max. Moreover,
|
||||
@@ -136,7 +136,7 @@ class TestUpDown(TestCase):
|
||||
idx[0] -= 1
|
||||
idx[1] += 1
|
||||
|
||||
@skip
|
||||
# @skip
|
||||
def test_optimize(self):
|
||||
"""verify that gradient descent (Powell's method) can find
|
||||
the optimal free parameter under which the BuySellAlgorithm produces
|
||||
|
||||
Reference in New Issue
Block a user