Is the default capital_base for zipline set at 10 million?

182 views
Skip to first unread message

Simon Chan

unread,
Aug 31, 2016, 3:38:03 PM8/31/16
to Zipline Python Opensource Backtester
I have been running backtests and I see that if I print out the 'capital_base' for my algorithms, it is always set at 10 million.

def handle_data(context, data):
print get_environment('capital_base')

Why is this the case and how do I change it to another number?


Rich Frank

unread,
Aug 31, 2016, 6:16:58 PM8/31/16
to Zipline Python Opensource Backtester
That's right - it's the default defined in zipline. You can use a different value with the --capital-base argument to zipline run:

$ zipline run --help
...
  --capital-base FLOAT            The starting capital for the simulation.
                                  [default: 10000000.0]


(It's a bit out of date, but see also http://www.zipline.io/beginner-tutorial.html#command-line-interface)

Simon Chan

unread,
Sep 1, 2016, 7:02:45 AM9/1/16
to Zipline Python Opensource Backtester
Thanks Richard. It worked.
Reply all
Reply to author
Forward
0 new messages