mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 20:28:00 +08:00
Update test_optimize with devel flag.
This commit is contained in:
@@ -3,9 +3,18 @@ Simulator hosts all the components necessary to execute a simluation.
|
||||
See :py:method""
|
||||
"""
|
||||
|
||||
import logbook
|
||||
import threading
|
||||
from zipline.core.simulatorref import SimulatorBase
|
||||
|
||||
log = logbook.Logger('Dev Simulator')
|
||||
|
||||
DEPRECATION_WARNING = """
|
||||
WARNING WARNING WARNING
|
||||
THE DEVSIMULATOR IS DEPRECATED, IT WILL NOT BEHAVE LIKE ANY OTHER
|
||||
SYSTEM USED IN TESTS OR IN PRODUCTION
|
||||
"""
|
||||
|
||||
class AddressAllocator(object):
|
||||
"""
|
||||
Produces a iterator of 10000 sockets to allocate as needed.
|
||||
@@ -38,6 +47,8 @@ class Simulator(SimulatorBase):
|
||||
self.subthreads = []
|
||||
self.running = False
|
||||
|
||||
log.warn(DEPRECATION_WARNING)
|
||||
|
||||
@property
|
||||
def get_id(self):
|
||||
return 'Simple Simulator'
|
||||
|
||||
@@ -128,6 +128,7 @@ def create_predictable_zipline(config, offset=0, simulate=True):
|
||||
config['trade_source'] = source
|
||||
config['environment'] = trading_environment
|
||||
config['simulation_style'] = SIMULATION_STYLE.FIXED_SLIPPAGE
|
||||
config['devel'] = True
|
||||
|
||||
zipline = SimulatedTrading.create_test_zipline(**config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user