mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-15 11:22:18 +08:00
BUG: Prevent algorithm init failure due to missing fill_delay.
Provide a default value for data_frequency, choosing 'daily', so that the fill_delay is set even when a data_frequency value is not in kwargs. This does open up a place for disjointedness if the sim_params that is passed to run does not match the data_frequency set during initialize.
This commit is contained in:
@@ -109,10 +109,7 @@ class TradingAlgorithm(object):
|
||||
self.slippage = VolumeShareSlippage()
|
||||
self.commission = PerShare()
|
||||
|
||||
if 'data_frequency' in kwargs:
|
||||
self.set_data_frequency(kwargs.pop('data_frequency'))
|
||||
else:
|
||||
self.data_frequency = None
|
||||
self.set_data_frequency(kwargs.pop('data_frequency', 'daily'))
|
||||
|
||||
# Override annualizer if set
|
||||
if 'annualizer' in kwargs:
|
||||
|
||||
Reference in New Issue
Block a user