quantopian/zipline — pull request #9 by ehebert (2012-11-05 18:51:45+00:00)
Title: Locks down the ability to easily override the algo's portfolio.

Starting down the path of making the portfolio completely read-only
with respect to the handle_data in algo.

The portfolio should only be changed during the course of running
the algorithm by the simulator.

This doesn't do a 100% protection, i.e. an algo could use _portfolio,
or the set_attr property, but hoping this helps guides algo writing
to treat the portfolio as read-only.