zipline-live / zipline

Zipline-Live, a Pythonic Algorithmic Trading Library
http://www.zipline-live.io/
Apache License 2.0
394 stars 65 forks source link

--state-file: what is this? #58

Closed TawehBeysolowII closed 6 years ago

TawehBeysolowII commented 6 years ago

Hello,

I was just curious as to what a state-file is and how do we create one if we do not have it? I am trying to live paper trade from the command line to test code for our production systems. I cannot find any documentation on the state file, however, and this is the only command that is causing an error thus far. Thank you!

tibkiss commented 6 years ago

state-file is a file where the context variable's context is stored. You can specify an arbitrary file in a writable directory as state file, then zipline-live will store the context state after initialize and every handle_data call. Next day if you restart your algo it will pick up the state from that file.

Sorry for the undocumented feature, we indeed need to update the webpage and tutorial to avoid further confusion about this feature.

TawehBeysolowII commented 6 years ago

Tibkiss, thanki you for your prompt reply! As one last question, will the terminal display any logging information when its executing trades?

tibkiss commented 6 years ago

if you set the log level to debug it will. as you joined slack I recommend to continue this discussion there.