GildedPleb / ergodic-drawdown

MIT License
0 stars 1 forks source link

Price Model Request #1

Open testing803 opened 2 months ago

testing803 commented 2 months ago

Hey there, great job on the tool you built! I've been building something like this on excel but this is way better.

Is it possible to use the Power Law Support Line as a model? I believe the regression will fall towards this over time without bubbles and it is more realistic than the median regression. I've calculated the 1% Quantile Regression in excel as =10^(-17.9289 + 5.9775 * LOG10(DATEDIF(DATE(2009,1,3), TODAY(), "d"))) . You'll notice the community is starting to theorize the support line is the real power law. Otherwise I think it's too aggressive in the simulation.

A second, less important suggestion, is on my spreadsheet I added the ability to add a cost of living increase/decrease in my spending. Say, if I start with 10k on the drawdown. I want to be able to increase my drawdown .5-1% a year or something in real terms so quality of life improves (or I need less). Then I can start very conservative and be more aggressive in time.

Just suggestions and I'd be happy to send you sufficient sats on Alby for your time if you can add these. Thanks and good luck!

GildedPleb commented 2 months ago

Thanks for thinking of this and writing the request!

  1. For the Power Law, I'm presently using:
  const powerLaw = (unixTimeMs: number, offsetYears = 0): number => {
  const scaleFactor = 10 ** -17.3;
  const unixStartTime = 1_230_940_800_000 - offsetYears * MS_PER_YEAR;
  const daysSinceStart = (unixTimeMs - unixStartTime) / MS_PER_DAY;
  return scaleFactor * daysSinceStart ** 5.83;

I could certainly add your version as well if you can get someone to second that it's sufficiently warranted (a comment here would suffice). I would second, but personally I think all these models are baloney, so I find it a mute point: an 8% return performs better than the current power law on time-frames greater than 200 years, and by extension, an X% annual growth rate outperforms all power law growth on long enough timelines (bitcoin is going to be around in 200 years, and purchasing power will remain infinity / 21M--which is to say, on long enough timelines, Power Laws are not aggressive enough 🤷 ). I included all the models based on fame and diversity, not accuracy and wisdom--which you might have and I most certainly lack. If you don't care about these meaningless machinations and want me to do it anyway, so be it! My rate is 100,000 sats/hour and it would take me an hour.

  1. That said, adding a walk which tapers vol over time (or a parameter that tapers walks in general) effectively removing bubble impact, is a fairly interesting feature request, premised on a sound assumption that I have not considered--vol should drop out of bitcoin. If I find the time, I'll look into it! Presently, if you set volatility to 0 with random walk, you can simulate this, but you are stuck at the current price as a % of model range.

  2. Drawdown: Technically, you can simulate something like this via the "Inflation" param. Say, if you only think inflation is 2%, you can set the param to 3% to simulate a 1% increase in "Quality Of Life" over inflation. Adding waypoint changes is also interesting, but perhaps OOS, again, all this peters out at certain future distances--if we are lucky, we wont have many years left pricing in dollars anyway!

testing803 commented 2 months ago

I edited my response a ton and had some contradicting thoughts, it was confusing. I'll condense them into something short and simple tomorrow.

testing803 commented 2 months ago

Good afternoon,

First, I think you would be interested in going more down the rabbit hole. The power law is not pricing model, it's is a full theory of how Bitcoin works, what Bitcoin is and what it means. https://giovannisantostasi.medium.com/the-bitcoin-power-law-theory-962dfaf99ee9

You can see @apsk32 @moneyordebt or look at why Charles Edwards' Hash Ribbons Indicator is so accurate after many years. It's because the Invisible Hand of the Bitcoin network is mechanical, AKA the Power Law Support is something fundamental to the system. Anything above it is speculation, bubbles, manias, and human behavior. The price will regress to the support line over time. Non Bitcoin supporting material is Geoffrey West's book Scale: Laws of The Universe, or anything Sacred Geometry in relation to scaling systems over orders of magnitude.

I found out a couple ways to clarify what I'm looking for. Happy to pay your required sats. Maybe in the future we can chat about the Power Law in exchange to add features if you find it useful. Happy to pay for these for now.

  1. Right now your model is the Power Law Regression Median, plus the top and bottom channels. It's easy to see when you select Random Walk. Very good. But if what I said above is correct we want to base our risk management off the 1% Quantile Regression AKA Power Law Support. This is more conservative, realistic, and better for risk management. I'm not sure how you can dampen volatility accurately here since the channels are equally distant always. You can visualize the market prices falling to support here... https://powerlawbtc.com/

  2. The Power Law Support Line and Quantile Regression 99%/1% channels automatically scale the volatility down slowly over time. See photo below for easy visualization of conversion. The formulas I would love to add are

1% QR =10^(-17.928912 + 5.977458 LOG10(Days_Since))
99% QR is =10^(-12.363330 + 4.699254
LOG10(Days_Since))

output(3)

  1. Clamp price to median. This is a great feature to add, it more or less solves what I'm looking for aside from making the model a Quantile Regression version. If you select Power Law model and random walk there are 3 lines. Top channel, median, and low. I want to clamp my model to the Min/Median. I prefer to do this on the Quantile Regression method so that it includes dampening volatility over time.

  2. Max Annual Spend - I don't need my spending to always increase forever. I would like my Quality of Life increase to a certain point and stop. My model has a limit on my spending. The reason for all of this is not only to see if my portfolio is likely to survive, but to think in Bitcoin terms how much I can leave for my family.

These are humble suggestions, happy to compensate you for the time adding these. Have a great day.

GildedPleb commented 2 months ago
  1. I've added the new model to the mix. Is there any preference on the preferred handling of when the min and max invert? Presently, for the new model it is set to default to support.

  2. I will not add a clamp to median as the logic is inconsistent with architecture--meaning, i would have to change far more than its worth for me. But if you can figure it out, PR's welcome!

  3. Probably wont add Max Annual Spend until the TODO list is cleared out, but may get to it.

If you wanna send a tip, by all means! But no worries about payment--adding the new model took 2 minutes.