Show HN: Inflation-adjusted stock charts – Total Real Returns (opens in a new tab)totalrealreturns.com
507 pointsI found it harder to explain the y-axis in words than it was to do the math, so please let me know if you think the "baguettes" explanation on the homepage helps.
I was up until 4am ET finishing some features on this, and then at 8:30am ET the BLS released the new CPI numbers through their API: https://download.bls.gov/pub/time.series/cu/ and I was able to manually re-run my daily cronjob with the new numbers, so it's up to date! If you catch any bugs, please let me know via the “Report a bug” link in the footer of every page.
Some FAANG examples: https://totalrealreturns.com/s/META
https://totalrealreturns.com/s/GOOGL
https://totalrealreturns.com/s/AMZN
https://totalrealreturns.com/s/AAPL
https://totalrealreturns.com/s/NFLX
Comparing three Vanguard treasury funds, showing vividly the impact of bond duration (short-term, intermediate-term, long-term) on both risk and reward: https://totalrealreturns.com/s/VFISX,VFITX,VUSTX
Comments (272) 48 threads
Earlier commentsEveryone has their own personal inflation rate, mine in 2021 was 1%. We will see how 2022 turns out, but I'm betting it will go up for me.
If you don’t mind me asking, why did you choose the Crystal programming language for this project?
In working on this project, I discovered two "superpowers" of Crystal:
This adds a new field the standard library HTTP::Server::Context https://github.com/crystal-lang/crystal/blob/1.5.0/src/http/... / https://crystal-lang.org/api/1.5.0/HTTP/Server/Context.html so I can specify a cache key near the beginning of a request handler, and later my response middleware picks it up to store the response body.The first was macros https://crystal-lang.org/reference/1.5/syntax_and_semantics/... which I used sparingly, but to great effect, when an ordinary method call wouldn't do.
The second was monkeypatching: specifically, it's super easy to reopen existing standard library classes and add a field I need, for example:
The common capital market comparison for these equity returns is against real risk-free returns. That benchmark is largely missing here.
All comments shown.
Couldn't load more comments. Check your connection and try again.