Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How is the back Return calculated?

Hi everyone, considering SPY as the benchmark I am trying to calculate by myself the back return value but I can't get the same number as Quantopian...
My calculations are:
I hold the position from 2011-09-29 to 2014-02-19'
First day(buy): Stock price: 117.08
Last day(sell): Stock price: 183.8
Back Return= (183.8/117.08)-1=56.99%

But the benchmark return's using Quantopian with the same dates is 64.95%

Why is there such a difference? Am I missing something?

Thank you in advance,

2 responses

Quantopian adds dividends to calculate return. During the time period 2011-09-29 to 2014-02-19 SPY paid out roughly $9 in dividends. Therefore the return is ($183.80 + $9) / $117.08 ~ 64%.

Thank you very much Dan! Do you know how to access those dividends in Python?

Thanks again