File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2121try :
2222 from zipline .assets import Equity , Future
2323 ZIPLINE = True
24- except :
24+ except ImportError as error :
2525 ZIPLINE = False
26- warnings .warn ('Module "zipline.assets" not found; mutltipliers will not be applied to position notionals.' )
26+ warnings .warn (
27+ 'Module "zipline.assets" not found; mutltipliers will not be applied' +
28+ 'to position notionals.'
29+ )
2730
2831
2932def get_percent_alloc (values ):
@@ -144,7 +147,7 @@ def extract_pos(positions, cash):
144147 for asset in values .columns :
145148 if type (asset ) in [Equity , Future ]:
146149 values [asset ] = values [asset ] * asset .price_multiplier
147-
150+
148151 values = values .join (cash ).fillna (0 )
149152
150153 # NOTE: Set name of DataFrame.columns to sid, to match the behavior
You can’t perform that action at this time.
0 commit comments