Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
where can i get Total returns from fundamentals?

Hi people, i have been looking for total returns in fundamentals but i cant find them.

Could anybody give me a help in to find Stock Total returns from pipeline api or whatever?

What i need, is to build a simple screener with several total returns period of a stock. Simple.

Total return =[( Close today-Close period start) + Period Dividens ]/ Close period starts

Thanks in advance.

4 responses

The built in Returns method will give 'total returns'. Prices on Quantopian are split AND dividend adjusted so the Returns result will include any dividends with an ex-div date within the returns window.

# The following will be the 1 year return including dividends  
total_returns = Returns(window_length=252)

Good luck.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Hi Dan,

Hi Dan,

Thanks for your support.

I really appreciate your attention.

Please see attached a very sinple notebook in order to show SPY returns in several period

Runing this simple code with returns, i can see that results are not the same than morningates or ameritrade websites.

These are the links in order to check.

http://performance.morningstar.com/funds/etf/total-returns.action?t=SPY Note: (Please click on monthly tab)

https://research.tdameritrade.com/grid/public/etfs/profile/performanceBuffer.asp?symbol=SPY&fromPage=performanceBuffer&display=&fromSearch=true

These links shows exactly the same returns metrics for SPY but for any reason i cant see the same in Returns from quantopian.

Also, the close price from "USEquitypricing.close.latest" match with June 05, not for June 08 close. Today is June 09.

My apologies if it has a very basic answer.

Thanks again for your support!

The difference may be in the close prices which are being used to calculate return. Quantopian uses the last traded price while others probably use the End-Of-Day (EOD) price. Check out this post for more info on that. In any case the difference seems quite small 12.71% on Quantopian vs 12.81% on the others. Note that the others are as of 5/31/2020 so check the pipeline 'returns_1y' on 6-1-2020 (the following day) for a comparison.

Hi Dan!

You are correct that was the point. I must to use the close price of the day after comparison.

This thread is solved!

Thanks a lot!

Ramon.