From 439f404beda103a80d25a704dd481d1e7b5941bc Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Thu, 12 Feb 2015 16:42:52 +0100 Subject: [PATCH] MAINT Increase default volume from 1000 to 1e9 For more discussion see https://github.com/quantopian/zipline/pull/485. Basically, 1000 is just a number that was supposed to be high enough if no volume was available. It turns out that number is actually very low so now we are increasing it so that volume restrictions should no matter. 1e9 of shares ought to be enough for anybody ;). Thanks to @jlowin for pointing that out. --- zipline/sources/data_frame_source.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zipline/sources/data_frame_source.py b/zipline/sources/data_frame_source.py index c2574071..e574bd3d 100644 --- a/zipline/sources/data_frame_source.py +++ b/zipline/sources/data_frame_source.py @@ -73,7 +73,9 @@ class DataFrameSource(DataSource): 'dt': dt, 'sid': sid, 'price': price, - 'volume': 1000, + # Just chose something large + # if no volume available. + 'volume': 1e9, } yield event