Refactored optimize factory. Enabled optimize unittests.

This commit is contained in:
Thomas Wiecki
2012-08-10 11:08:11 -04:00
parent c601991d93
commit 1576447c76
3 changed files with 9 additions and 10 deletions
+4 -4
View File
@@ -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