quantopian/zipline — pull request #278 by richafrank (2014-03-04 22:42:35+00:00)
Title: BUG: Fix cost basis calculation

Cost basis calculation now takes direction of txn into account.

Closing a long position or covering a short shouldn't affect the cost basis.