mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 00:31:27 +08:00
LOG: Log the dt and amount when each capital change executes
This commit is contained in:
@@ -153,10 +153,10 @@ class AlgorithmSimulator(object):
|
||||
|
||||
if midnight_dt in algo.capital_changes:
|
||||
# process any capital changes that came overnight
|
||||
perf_tracker.process_capital_changes(
|
||||
algo.capital_changes[midnight_dt],
|
||||
is_interday=True
|
||||
)
|
||||
change = algo.capital_changes[midnight_dt]
|
||||
log.info('Processing capital change of %s at %s' %
|
||||
(change, midnight_dt))
|
||||
perf_tracker.process_capital_changes(change, is_interday=True)
|
||||
|
||||
# Get the positions before updating the date so that prices are
|
||||
# fetched for trading close instead of midnight
|
||||
@@ -218,8 +218,11 @@ class AlgorithmSimulator(object):
|
||||
|
||||
# process any capital changes that came between the last
|
||||
# and current minutes
|
||||
change = algo.capital_changes[dt]
|
||||
log.info('Processing capital change of %s at %s' %
|
||||
(change, dt))
|
||||
algo.perf_tracker.process_capital_changes(
|
||||
algo.capital_changes[dt],
|
||||
change,
|
||||
is_interday=False
|
||||
)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user