mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 04:08:28 +08:00
MAINT: Removes references to trading.environment
This commit is contained in:
@@ -203,11 +203,6 @@ class FFCAlgorithmTestCase(TestCase):
|
||||
# Do the same checks in before_trading_start
|
||||
before_trading_start = handle_data
|
||||
|
||||
# Create fresh trading environment as the algo.run()
|
||||
# method will attempt to write data to disk, and could
|
||||
# violate SQL constraints.
|
||||
trading.environment = trading.TradingEnvironment()
|
||||
|
||||
algo = TradingAlgorithm(
|
||||
initialize=initialize,
|
||||
handle_data=handle_data,
|
||||
|
||||
@@ -208,9 +208,6 @@ class AlgorithmGeneratorTestCase(TestCase):
|
||||
Ensure the pipeline of generators are in sync, at least as far as
|
||||
their current dates.
|
||||
"""
|
||||
# Ensure we are pointing to the TradingEnvironment for this class
|
||||
trading.environment = AlgorithmGeneratorTestCase.env
|
||||
|
||||
sim_params = factory.create_simulation_parameters(
|
||||
start=datetime(2008, 1, 1, tzinfo=pytz.utc),
|
||||
end=datetime(2008, 1, 5, tzinfo=pytz.utc),
|
||||
|
||||
@@ -232,7 +232,6 @@ cdef class Future(Asset):
|
||||
def __cinit__(self,
|
||||
int sid, # sid is required
|
||||
object symbol="",
|
||||
object root_symbol_id = "",
|
||||
object root_symbol="",
|
||||
object asset_name="",
|
||||
object start_date=None,
|
||||
@@ -248,10 +247,6 @@ cdef class Future(Asset):
|
||||
self.expiration_date = expiration_date
|
||||
self.contract_multiplier = contract_multiplier
|
||||
|
||||
# Assign the expiration as the end_date if end_date is not explicit
|
||||
if self.end_date is None:
|
||||
self.end_date = expiration_date
|
||||
|
||||
def __str__(self):
|
||||
if self.symbol:
|
||||
return 'Future(%d [%s])' % (self.sid, self.symbol)
|
||||
|
||||
Reference in New Issue
Block a user