Why the S&P500? Why not the more "Canadian" TSX?
The S&P500 is a global, diverse, and comprehensive benchmark. Even though S&P500 companies are listed in the United States, most operate around the world including Canada. Some analysts estimate that more than half of the S&P500 revenues are derived outside of the United States. The TSX on the other hand is heavily skewed towards energey and banking sectors. Most "indexers" invariably compare their returns to the S&P500 and not the TSX. Thus the site focuses purely on the S&P500. Given enough interst *hint: Donations :)*, I might add more indexes later.
What are your data sources? How does the system work? How is the return calculated
This website downloads data nightly from Yahoo! Finance
, specifically focusing on the S&P500 Total Return Index
. It maintains a TFSA Investment Schedule
, updated every year from the figures publicly available from the Canada Revenue Agency's TFSA website
Every night the most recent closing value of the index is downloaded and new "return files" are generated per year since 2009. Each of these return files contains the return a maxed out TFSA has made since that year's January 1st. It aso contains contains the total daily valuation of the TFSA for every day since January 1st of that year, if it had started following the S&P500TR index and maxing out contributions every subsequent year. These files are in JSON notation and contain an annualized rate of return "ROR" as well as daily valuation of the TFSA on a given date. The 2009 file
, is the largest file since it starts on the very first day the TFSA program started. The 2015 file
only starts at January 1st 2015 and shows results upto the current day. You can download these files from this server by replacing XX with the proper year in "TFSA_20XX.json".
Finally, there is an API that looks at the investment schedule and the year you started the matching/maxing the TFSA investment schedule to calculate your total Rate of Return. It uses a binary search algorithm to continiously "guess" your rate of return until the results of following the investment schedule upto today on that guess become accurate to the nearest dollar. The API is available on this website as "/TFSA.aspx?startyear=YYYY&finalamount=AAAA". Just replace YYYY and AAAA and the system will return the JSON file you require.
Why did you make this site?
I am a progammer at heart and wanted to learn new web development technologies. I am also an investor and always wanted to look at my TFSA returns in a more logical and cohesive fashion.
Can you make a similar website for ROTH IRAs?
The rules for ROTH IRAs (US equivilent of a TFSA) are far more complicated and there already exist many services online to do so.
Can you add more features?
Yes if there is interest. Contact me for details (donations are encouraging too!).
How do I get in touch?
Via email: ahmed dot ataullah at gmail dot com(replace the dot with "." and at with "@")