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

Is there anyway to calculate total return for a stock between two time periods? I am new to Quantopian and trying to test a dual momentum theory that looks at total return. But, it looks like the only way to get total return on Quantopian is to hold the stock for the given time period. But, what I want is to do is use total return over the previous year as a signal for which stocks to buy. (Basically, test dual momentum strategy)

3 responses

I think Malcom is referencing the difficulty of computing total return and not just change in price. AFAIK the dividend information isn't available through an exposed interface so I believe it's not possible?

Yes. I am interested in total return (i.e. including dividends). I know, Yahoo Finance calculates their adjusted close factoring dividends. But, Quantopian does not (for valid reasons).

Marlcolm, did you ever find a solution you were happy with?