zipline

Stock Universe and “IB reports a holding … adding to Quantopian Blotter”

IB Adding

When running against an Interactive Brokers (IB) paper (or real money) account, Quantopian has a cool feature where it scans the current holdings and populates context.portfolio with current holdings.  You see a log message like “IB reports a holding … adding to Quantopian Blotter”.

 

A side effect of this is also expansion of your stock universe that is passed to handle_data or your scheduled functions.  If your IB account has existing stocks that are outside of the universe you specified in your initialize segment (eg, using context.secs = [symbol(‘IBM’),symbol(‘HPQ’)] or via Quantopian Pipeline , and you have automated sell logic based on examining context.portfolio.positions, you could sell holdings by mistake.

 

Read more for how to plan for this

Quantopian zipline trading algorithm parameter optimization with Spearmint Bayesian Optimizer - Part 5 Conclusions and Next Steps

In this series, we used the open source spearmint optimizer to select optimal tuning parameters for a quantopian zipline trading algorithm.
Read more for conclusions and next steps.

Quantopian zipline trading algorithm parameter optimization with Spearmint Bayesian Optimizer - Part 4

At the end of part 3, we were ready to start the spearmint experiment to optimize the tuning parameters of our toy Bollinger Band Algorithm.

 

Read more to see the results.

Quantopian zipline trading algorithm parameter optimization with Spearmint Bayesian Optimizer - Part 3

In part 3, we configure spearmint to optimize our toy Bollinger Bands trading algorithm.

 

Click to read more .

Pages

Subscribe to RSS - zipline