What tech stack are you using? The speed is impressive.
BACKEND: It's about 3000 lines of Crystal code https://crystal-lang.org/ -- it's been an absolute dream to program in. Ruby-like syntax, statically compiled performance. Nice standard library. Would recommend :) Performance == caching Local ephemeral filesystem for shortest-term caching. Redis for shared medium-term caching and locking. S3-compatible object storage for longest-term caching (for raw data feeds pulled…
Show HN: Inflation-adjusted stock charts – Total Real Returns
131–140 of 279 posts
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#132Wish it had the 70s, or ideally, the whole 20th century. The 80s-2010s has been a period of unusually low inflation and consistent market returns, buoyed by the end of the Cold War and entry of the developing world into the world economy. There's a good chance that we revert to the mean going forwards and see much more geopolitical instability and resource constraints.
So, what does a young person do these days? First few years out of college were just "max out 401k contributions into some target fund" + build emergency fund, but now that I've amassed more cash than what an emergency fund requires, what does one do? Originally, my plan was to use it for a house down-payment, but with the mortgage rates having nearly doubled in the last 6 months, that's kind of out of the question a…
Pick a few things you can put your money into, which you have confidence won't lose value given a long enough time horizon. For me, this is SPY (highest alpha but needs 10 years to recover). The traditional 60/40 SPY/TLT mix is great. Currency funds also good. VTI & chill is good. Right now the Euro has Dollar parity (ECB isn't fighting inflation aggressively and won't start reducing its balance sheet for a while), maybe throw some of that into the mix.
Sell covered calls to reduce your cost basis.
Don't spend cash. Invest cash, borrow against it at favorable interest rates, and make purchases with the borrowed money. SBLOC, portfolio margin (>100k) can unlock some cheap (75bp above prime) cash.
If I could send a message to myself 20 years ago it would be the above.
All of my words are nonsense, nothing in this comment shall be construed as professional or financial advice. I've been excessively stupid with money far longer than I should.
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#133Having all lines normalized so they start from a common point at x = 0 would be helpful. That would allow reading the total returns as percentage of the initial (1987) investment and compare them. Similarly in the drawdown chart, if it starts at 1987, it makes no sense to start the dollar at -81%. If I am looking at a chart from 1987 to 2022, I want to see how the dollar did compared to other assets in that time peri…
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#134If the goal is to demonstrate relative performance over time, wouldn't it be useful to use a normalization such that all lines either start at the same point (e.g. simulating investing X amount) or ending at the same point (showing requirement to get to X final amount)?
I think that's a reasonable idea and I may try including that option in the future. Right now, the start point is quite arbitrary: it's the first date where we have data for all the symbols requested. And date ranges dramatically affect any sort of relative performance comparison. So in the current code I decided to just normalize to today's nominal-dollar value so that the end values are relatable. What would the id…
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#135Earlier quoted context omitted.
> Originally, my plan was to use it for a house down-payment, but with the mortgage rates having nearly doubled in the last 6 months, that's kind of out of the question at this point (especially having moved to a higher property value area to be closer to friends and family). Higher interest rates lead to lower home prices, which should make it easier to make a down payment. Interest rates may double, but mortgage pa…
That's what my plan is. Just waiting/hoping housing prices drop within the next year or two. Been waiting a while now though so who knows if they'll actually come down
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#136Earlier quoted context omitted.
You're thinking of the inflation adjustment the wrong way around. A dollar earned in 1980, if, saved until today, buys less than it would have then.
Yes, your second sentence makes sense to me. I guess I imagined the inflation-adjusted value of X to be defined at time t to be something like: value(X, t) / value(USD, t). So, when I substitute USD for X, I get constant 1.
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#137Thanks for sharing compumike! Very cool!! 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:
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:
# BEGIN MONKEYPATCH
class HTTP::Server::Context
property response_body_cache_key : String? = nil
end
# END MONKEYPATCH
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.Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#138I don't understand the details on how inflation is measured here, but I expected the US Dollar curve to be a constant 1, after the normalization. However, it seems to go down. What does that mean? That the dollar loses value faster than "money is printed"?
real_price($ASSET, t) = nominal_price($ASSET, t) * (price_level($NOW) / price_level(t))
Where price_level(t) is the CPI-U series (with interpolation).If t = $NOW, at the right side of the chart, then the fraction goes to 1, so that
real_price($ASSET, $NOW) = nominal_price($ASSET, $NOW)
(Though many comments are requesting alternative normalization schemes!)For cash (USDOLLAR), nominal_price(USDOLLAR, t) = 1 for all t -- the nominal price of a dollar bill is always 1. So https://totalrealreturns.com/s/USDOLLAR is plotting a curve that looks like 1/price_level(t). (Actually it's 1*price_level(now)/price_level(t), because of the normalization above.) And you can download price_level(t) from https://download.bls.gov/pub/time.series/cu/.
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#139Earlier quoted context omitted.
So, what does a young person do these days? First few years out of college were just "max out 401k contributions into some target fund" + build emergency fund, but now that I've amassed more cash than what an emergency fund requires, what does one do? Originally, my plan was to use it for a house down-payment, but with the mortgage rates having nearly doubled in the last 6 months, that's kind of out of the question a…
Don't buy a house until the real estate market crashes. Then buy. I bought a fixer-upper in 2008 for 200k; sold it for 425k 5 years later. Recently it sold for 650k (we still get redfin notifications.) In the meantime I bought a house for 625k (nice house with some rough edges) and sold it 18 months ago in covid real estate madness for 950k. We certainly put money into both houses over time, but we'd never have been…
Re: Show HN: Inflation-adjusted stock charts – Total Real Returns
#140Earlier quoted context omitted.
No, you really can not: https://habr-com.translate.goog/ru/post/675802/?_x_tr_sl=ru&...
Well, you're both right and wrong. He's right You CAN, but your linked article is also 100% correct, GBTC / trusts are absolutely NOT etf's. There are however etfs for crypto in other districts (I hold for example ethx.b, a canadian ETF that tracks ETH within my RRSP).