+ 1
Something that immediately catches your eye:
Everything in the for loop from lines 9 through 18 must be outside the loop. Otherwise there is no point in this code at all.
Lines 42 and 45 are p_return, and should be p_returns
PS. and unfortunately you can't use pyplot in Code Playground