mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-12 11:50:11 +08:00
Prevents entire data panel being collapsed when a stock stops trading.
The call to `Panel.dropna` after the fillna was deleting all values, if a stock stopped trading mid run and thus provided volume 0. i.e. if any sid had 0 non-null values the entire panel of frames would be truncated. It's possible to avoid the collapse via by adding the `how='all'` flag to `dropna`, however with the current tick based creation of the panel, the `dropna` with `how='all'` should be functionally equivalent to not dropping at all. The dropna has been dropped in favor of leaving the drop to algorithm code.
This commit is contained in:
@@ -493,10 +493,6 @@ class BatchTransform(EventWindow):
|
||||
# minute data because of illiquidity of one stock
|
||||
data = data.fillna(method='ffill')
|
||||
|
||||
# Drop any empty rows after the fill.
|
||||
# This will drop a leading row of N/A
|
||||
data = data.dropna(axis=1)
|
||||
|
||||
# Hold on to a reference to the data,
|
||||
# so that it's easier to find the current data when stepping
|
||||
# through with a debugger
|
||||
|
||||
Reference in New Issue
Block a user