Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
What is the Benchmark SPY ?

Hello, please I´m trying to understand the meaning of Benchmark SPY and beta to Equity ? SPY is an acronym ? Well it´s not clear to me. Maybe it´s a basic question but I searched the docs and couldn´t understand what is it. Could be something like balance and equity ?
Thanks you for any help.

4 responses

Good question! I'm sure others have wondered the same thing.

"SPY" is a "Standard and Poor's Depositary Receipt", or SPDR, that roughly tracks the S&P 500 index before expenses. It trades as an ETF on the NYSE Arca exchange. SPY was the first ETF ever listed in the US in January 1993 when it was introduced by State Street Global Advisors. There's more history here and and a complete prospectus here.

SPY makes a convenient benchmark to compare one's algo to as well as a proxy for 'the market' in general. That is why it's often used as a benchmark as well as the 'target' for beta calculations. It also has a couple of other features which make it desirable as a benchmark or comparison. First, it has never had a stock split. Its price is adjusted quarterly for dividends but has not been for splits. Also, it has always had the ticker symbol "SPY" all the way back to 1993 when it was introduced. This makes it easy to track without worrying about the inception date or the ticker 'as of' date. It's always been "SPY".

So, basically SPY is often used as a proxy whenever one wants to gauge the S&P 500 index.

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,

Thanks for the answer.

Does quantopian/zipline algorithm reinvest dividends when calculating value for SPY benchmark performance?

The reason why I'm asking is when dividends are reinvested SP500TR (calculate performance with dividends reinvested), SP500TR return is 17% higher over last 5 years comparing with SPY.

In simple term, when comparing an alogo vs SPY benchmark without dividends reinvesment and the algo outperform SPY by 15% over 5 years, in reality it is more profitable to stay invested in SP500 index tracker and reinvest dividends, than to use the algo for trading.

Please find below link to comparison:

https://finance.yahoo.com/quote/%5ESP500TR/chart?p=%5ESP500TR#eyJpbnRlcnZhbCI6IndlZWsiLCJwZXJpb2RpY2l0eSI6MSwiY2FuZGxlV2lkdGgiOjMuNzE2NDc1MDk1Nzg1NDQwNCwidm9sdW1lVW5kZXJsYXkiOnRydWUsImFkaiI6dHJ1ZSwiY3Jvc3NoYWlyIjp0cnVlLCJjaGFydFR5cGUiOiJsaW5lIiwiZXh0ZW5kZWQiOmZhbHNlLCJtYXJrZXRTZXNzaW9ucyI6e30sImFnZ3JlZ2F0aW9uVHlwZSI6Im9obGMiLCJjaGFydFNjYWxlIjoibGluZWFyIiwic3R1ZGllcyI6eyJ2b2wgdW5kciI6eyJ0eXBlIjoidm9sIHVuZHIiLCJpbnB1dHMiOnsiaWQiOiJ2b2wgdW5kciIsImRpc3BsYXkiOiJ2b2wgdW5kciJ9LCJvdXRwdXRzIjp7IlVwIFZvbHVtZSI6IiMwMGIwNjEiLCJEb3duIFZvbHVtZSI6IiNGRjMzM0EifSwicGFuZWwiOiJjaGFydCIsInBhcmFtZXRlcnMiOnsid2lkdGhGYWN0b3IiOjAuNDUsImNoYXJ0TmFtZSI6ImNoYXJ0In19fSwicGFuZWxzIjp7ImNoYXJ0Ijp7InBlcmNlbnQiOjEsImRpc3BsYXkiOiJeU1A1MDBUUiIsImNoYXJ0TmFtZSI6ImNoYXJ0IiwidG9wIjowfX0sInNldFNwYW4iOnsibXVsdGlwbGllciI6NSwiYmFzZSI6InllYXIiLCJwZXJpb2RpY2l0eSI6eyJwZXJpb2QiOjEsImludGVydmFsIjoid2VlayJ9fSwibGluZVdpZHRoIjoyLCJzdHJpcGVkQmF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RhZ2UiOjAuNywib3BhY2l0eSI6MSwiaGlnaGxpZ2h0YWJsZSI6dHJ1ZSwidHlwZSI6ImxpbmUiLCJzdHlsZSI6InN0eF9saW5lX2NoYXJ0In19XX0%3D

Quantopian (ie the zipline backtest engine) assumes dividends are collected and then reinvested when calculating the benchmark performance. See the attached simple example. The algo constantly reinvests any excess cash (eg from dividends). Note the algo performance exactly equals the benchmark performance.

Very good point about Yahoo Charts. The SPY value is understated since it doesn't include dividends. The Quantopian backtest total returns, over the timeframe 3/15/2015 - 2/17/2020, almost exactly equals SP500TR as indicated by the Yahoo chart. Both about 78%.

Dan, thanks for the comparison, Well done!