Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Problem with cost_basis

Hello,
I just started with a very simple algo but get weird results with cost_basis: often the cost_basis seems way under the buying price (ex: Week of Oct 18, 2015) . Anybody knows why?
Also Why my flag nb_sold_at_loss has decimal? I only increment or decrement it by +/-1 ?
Thank you!