Full disclosure here: when I first started learning about how the modern financial system actually works, I thought I was going down some weird conspiracy rabbit hole.
But ye know what?
As an engineer who's trained to look for patterns and understand complex systems, what I discovered actually makes a lot of sense – even if it's pretty wild.
Ever wondered why your salary feels like it buys less and less each year, while the stock market and property prices keep going up?
Or why saving money in the bank feels like you're going backwards?
Well, buckle up, because I'm about to show you the framework that helped me make sense of it all.
This post forms part of a three part series where I discuss the everything code & the economic singularity and why this means you have until 2030 to make as much money as you can.
Understanding the Everything Code and how money printing affects asset prices is crucial if you want to achieve financial independence with Bitcoin and protect your wealth from currency debasement.
Why Should You Care About This?
Look, I get it.
When I first heard about "The Everything Code" from Raoul Pal, my eyes started glazing over. More financial jargon, right?
But here's the thing – understanding this concept completely changed how I think about money, investing, and protecting my family's future.
As someone who:
- Has been living as an expat engineer in the Middle East
- Watched property prices climb out of reach despite earning a "good" salary
- Tried to figure out how to protect wealth in a world of currency debasement
…I can tell you that this framework explains A LOT about what's happening in the world right now.
Learn more about my journey with money and investing here
What Exactly Is The Everything Code?
Right, let's break this down in simple terms (because if there's one thing engineers love, it's breaking complex systems into understandable pieces).
The Everything Code is a framework developed by Raoul Pal of Real Vision that explains how the global financial system has fundamentally changed since 2008.
It's essentially the operating system that runs the modern financial world.
From listening to Raoul talk about the everything code on YouTube many times, I think he has completely changed his investing strategy to focus only on assets that beat the hurdle rate to try and make as much money by 2030 as he can.
Its a very simple concept that basically explains the cyclic nature of the economy and how you can take advantage of it.
Here are the key components:
- Central Bank Liquidity: The primary driver of ALL markets – AKA the Money Printer.
- Currency Debasement: The continuous creation of new money.
- Asset Price Inflation: Why everything keeps getting more expensive.
- Debt Dynamics: How the system perpetuates itself & how the government can’t stop printing money.
The Traditional Model vs. The Everything Code
Let me show you how things used to work versus how they work now:
The Old Model (Pre-2008):
- Economic growth driven by:
- Population growth
- Productivity improvements
- Natural credit cycles
- Real economic activity
- Central banks played a smaller role
- Markets generally reflected economic reality
The New Model (Post-2008):
- Everything driven by central bank liquidity
- Traditional economic indicators matter less
- Asset prices disconnected from the real economy
- Debt levels matter more than ever
Want to understand more about why this shift happened? Check out my detailed explanation of fiat money here.
My Personal "Aha" Moment
I remember exactly when this all clicked for me. I was sitting in my apartment in Dubai, looking at property prices that seemed completely disconnected from local salaries.
Even with my tax-free expat engineering salary, which is pretty decent, properties kept moving further out of reach.
That's when I started diving into why governments keep printing money and discovered this framework from Raoul.
Suddenly, everything started making sense – why my savings weren't growing in real terms, why assets kept getting more expensive, and why traditional financial advice wasn't working anymore.
Why This Matters More Than Ever
According to the Bank for International Settlements, central bank balance sheets have exploded to unprecedented levels.
This isn't just some abstract concept – it's directly affecting your:
- Savings
- Investment returns
- Ability to buy property
- Future purchasing power
In the next section, we'll dive deep into how central bank liquidity actually works and why it's become the primary driver of… well, everything.
How Central Bank Liquidity Actually Works (And Why It Matters)
Right, let's dive into the meat of this thing.
And don't worry – I'm going to break this down in a way that makes sense even if you're not a financial wizard.
As an engineer, I love understanding how systems work, and this one's pretty fascinating (in a slightly terrifying way).
The Central Bank Money Printer (Not Actually a Printer)
First off, let me clear something up – when we talk about central banks "printing money," they're not actually running physical printing presses (well, mostly). What they're really doing is creating digital currency out of thin air.
Yeah, I know – wild. They don’t even need to bother printing it these days.
Here's how it works in practice:
- Central Bank Actions:
- Buy government bonds (quantitative easing)
- Provide loans to banks
- Set interest rates
- Control reserve requirements
- The Multiplier Effect:
- Banks can lend multiple times their reserves (since we went off the gold standard)
- Money supply expands dramatically
- Creates what economists call "broad money"
Learn more about this process in my detailed breakdown of money printing
The Liquidity Tsunami: Following the Money
Let me share a personal observation here.
When I first got into investing I couldn't understand why asset prices kept rising even though there were always fears of a recession and that the economy wasn't particularly strong.
So why were stock prices and house prices still rising? will it crash soon?
Then I learned about something called the Cantillon Effect – basically, newly created money doesn't affect all prices equally or at the same time.
Here's where the money typically flows first:
- Financial Markets
- Government bonds
- Stock market
- Corporate bonds
- Real Estate
- Luxury Assets
- General Economy
- Business expansion
- Wages (last in line!)
This explains why my engineering salary, despite being pretty good, seems to be running to stand still while asset prices shoot to the moon.
The Numbers Are Actually Insane
Let's look at some hard data (because us engineers love our numbers, right?):
According to the Federal Reserve's own data:
- The Fed's balance sheet grew from $870 billion in 2008
- To over $8.9 TRILLION at its peak
- That's a 10X increase!
And it's not just the Fed – check out what's happened with other central banks:
- European Central Bank
- Bank of Japan
- Bank of England
- They're all doing the same thing
Want to understand how this affects your investments?
Check out my analysis of investment hurdle rates
Why This Creates Asset Price Inflation
Here's where it gets really interesting (and slightly depressing).
Remember in my last post when I talked about how much your money has really devalued?
This is why.
Think about it like this:
"When you create more of something, each existing unit becomes worth less. But when that 'something' is money itself, the effects ripple through the entire economy in complex ways."
Here's what happens:
- More money in the system
- Money loses purchasing power
- People seek to protect wealth
- They buy assets
- Asset prices rise
- Repeat
The Wealth Effect (Or: Why Rich People Get Richer)
This is probably the most frustrating part of the system.
When asset prices rise due to liquidity, it primarily benefits people who already own assets.
This creates what I call the "wealth gap accelerator."
Who benefits the most?
- Asset owners (property, stocks, bonds)
- Business owners
- Those with access to cheap debt
Who gets hurt?
- Savers
- Fixed income earners (like most engineers!)
- Late adopters
So basically its a double whammy – your purcahsing power goes down as the money is being diluted and the price of assets goes up, making the one thing you need to buy to protect your wealth more and more unaffordable.
It’s like a fucked up chicken and egg scenario.
This is exactly why I've changed my whole approach to building wealth, moving from traditional FIRE to what I call SovFIRE.
Real-World Examples
Let me give you some concrete examples from my own experience:
- Property Markets:
- Dubai property prices up 40% in some areas despite macro economic challenges
- Similar patterns in other major cities
- Check out my analysis of real estate as an inflation hedge
- Stock Market:
- Companies buying back shares with cheap debt
- Valuations disconnected from earnings
- Tech stocks particularly affected
What This Means For Your Money
Right, so now you understand how the liquidity machine works, what should you actually DO about it?
In the next section, we'll dive into practical strategies for protecting your wealth in this environment.
But here's a quick preview of what we'll cover:
- Asset allocation strategies
- Protection against currency debasement
- How to position yourself to benefit from liquidity flows
- Common mistakes to avoid
Want to get preserve your wealth? Check out my guide to understanding sound money
Protecting Your Wealth in a Liquidity-Driven World
I wish someone had explained all this to me when I first started as an engineer.
Would have made investing a lot easier and also would have given me a strategy for building wealth many years ago.
I spent years following traditional financial advice that simply doesn't work in this new system. But hey, better late than never, right?
Let's talk about what you can actually do now that you understand how The Everything Code works.
And don't worry—I won't just tell you to "buy stocks" or give you generic financial advice.
The Traditional Playbook is Broken
First off, let me share a painful personal lesson. When I started my career, I did everything "right":
- Saved diligently in my bank account
- Put money in a pension
- Tried to be "responsible" with money
But here's the kicker—following this traditional playbook in our current system is like bringing a knife to a gunfight. As I've written about before, the rules have fundamentally changed.
Understanding Your Position in the Liquidity Game
Before diving into strategies, you need to understand where you sit in the current system.
Most of us are what I call "liquidity takers"—we're last in line when new money enters the system.
Here's how it typically flows:
- Central Banks → Financial Institutions
- Financial Institutions → Large Corporations
- Large Corporations → Asset Markets
- Finally → Regular People (that's us!)
Learn more about this hierarchy in my post about the real inflation rate
My Current Wealth Protection Strategy
Let me share what I'm actually doing with my own money.
Remember, this isn't financial advice—it's just my personal approach based on understanding The Everything Code:
1. Getting Out of Cash
I used to think having a big cash cushion was smart. But after seeing how the Gold Standard differs from our current system, I've changed my approach:
- Keep only essential emergency funds in cash
- View cash as a "hot potato" that loses value over time
- Think in terms of purchasing power, not nominal amounts
2. Focusing on Hard Assets
The key is owning things that can't be printed. Here's my current allocation approach:
- Income-Generating Real Assets
- Property (but be selective!)
- Productive businesses
- Cash-flowing investments
- Monetary Premium Assets
- Bitcoin (here's why I prefer it over other crypto)
- Precious metals (old school, but still relevant)
- Human Capital
- Skills development
- Side hustles
- Building my own brand
3. Leveraging Geographic Arbitrage
Being an expat has taught me a lot about taking advantage of geographic opportunities:
- Tax-efficient jurisdictions
- International investment options
- Multiple currency exposure
- Strategic residency planning
Want to learn more about expat strategies? Check out my guide here
Common Pitfalls to Avoid
Let me share some mistakes I've made (so you don't have to):
- The "Safe Savings" Trap
- Keeping too much in savings accounts
- Not understanding real inflation rates
- Trusting bank interest rates to keep up
- The Timing Trap
- Trying to time markets in a liquidity-driven system
- Not understanding market cycles
- Getting caught in what I call the "hurdle rate" trap
- The Diversification Mistake
- Thinking you're diversified when everything moves with liquidity
- Not understanding correlation in crisis situations
- Following outdated allocation models
Building Anti-Fragile Wealth
Here's what I'm focusing on now to build wealth that can withstand the current system:
1. Income Streams
- Multiple sources of income
- Location-independent work
- Using AI and technology to increase earnings
2. Asset Selection
- Focus on scarce assets
- Look for cash flow
- Understand liquidity flows
3. Risk Management
- Geographic diversification
- Currency diversification
- Avoiding counterparty risk
The Sovereign Individual Approach
This is where I'm headed with my SovFIRE concept:
- Financial Sovereignty
- Control over your assets
- Understanding the system
- Independence from traditional banking
- Geographic Sovereignty
- Multiple residency options
- International mobility
- Tax efficiency
- Personal Sovereignty
- Skills development
- Health and wellness
- Strong personal network
Action Steps You Can Take Today
Enough theory. Here's what you can start doing right now:
- Audit Your Current Position
- How much exposure do you have to cash?
- What assets do you own?
- Where are you vulnerable to currency debasement?
- Start Small, But Start Now
- Begin reducing cash positions
- Research hard assets
- Learn about international options
- Build Your Knowledge
- Follow key resources (I'll share my favorites below)
- Understand market cycles
- Stay informed about central bank actions
Want a deeper dive into getting started? Check out my guide to escaping the rat race
What's Coming Next in The Everything Code?
Right, now that we've covered the basics and practical strategies, let's look ahead.
And let me tell you – as an engineer who loves analyzing systems, what's coming next is both fascinating and slightly terrifying.
The System is Evolving (Again)
Remember how I mentioned the system changed dramatically in 2008?
Well, we're seeing signs of another major shift. Here's what's happening:
1. Central Bank Digital Currencies (CBDCs)
- Digital versions of national currencies
- More direct control over money supply
- Potential implications for personal sovereignty
2. The Great Reset Agenda
- Push for new economic frameworks
- Changes to traditional banking
- Focus on digital transformation
3. Currency Wars Heating Up
- Major economies competing through devaluation
- Rise of alternative payment systems
- Impact on global money printing
Why Traditional Safe Havens Might Not Work Anymore
This is something I've been thinking about a lot lately.
The traditional "safe" investments might not be as safe as we think:
Government Bonds
- Negative real yields
- Currency risk
- Political risk
Real Estate
- Highly leveraged markets
- Regulatory changes
- Demographic shifts affecting demand
Gold
- Storage issues
- Liquidity challenges
- Manipulation concerns
The Rise of Algorithmic Trading and AI
As someone who's deeply interested in how AI is changing everything, this part fascinates me. T
he markets are increasingly driven by:
1. High-Frequency Trading
- Algorithms making split-second decisions
- Market correlations increasing
- Human traders becoming less relevant
2. AI-Driven Market Analysis
- Pattern recognition at scale
- Predictive analytics
- Sentiment analysis
3. Automated Market Making
- DeFi protocols
- Liquidity pools
- New market structures
The MicroStrategy Playbook
Let's talk about something fascinating – what Michael Saylor and MicroStrategy are doing. They've created a new playbook for operating in The Everything Code.
I am not sure if its something most people can or should follow but its certainly an interesting model for corporations.
I can imagine int he next few years we start to see not just countries adding bitcoin to their strategic reserves but also corporations adding bitcoin to their balance sheets and storing their wealth in bitcoin as opposed to cash or bonds.
Preparing for Different Scenarios
Here's how I'm thinking about different possible futures (and as an engineer, I can't help but love scenario planning):
Scenario 1: Continued Liquidity Expansion
- Assets continue to inflate
- Wealth gap widens further
- Traditional savings devastated
- Why sound money matters more than ever
Scenario 2: System Reset
- CBDCs implemented
- New monetary rules
- Asset repricing
- How to position for sovereignty
Scenario 3: Return to Hard Money
- Bitcoin standard emerges
- Debt deflation
- Major market repricing
- Understanding the transition
Building an Antifragile Strategy
I've spent countless hours thinking about this (my wife would say too many). Here's my approach to handling these possibilities:
1. Skills Development
Technical Skills
- Learning new programming languages
- Understanding blockchain technology
- Leveraging AI for productivity
Business Skills
- Digital marketing
- Content creation
- Remote work capabilities
2. Network Building
Professional Network
- International engineering contacts
- Financial technology communities
- Industry thought leaders
Personal Network
- Expat communities
- Like-minded investors
- Local support systems
3. Asset Positioning
Digital Assets
- Bitcoin (primary focus)
- Selected altcoins
- Digital infrastructure
Physical Assets
- Strategic real estate
- Productive equipment
- Essential supplies
4. Geographic Diversification
Residency Options
- Multiple jurisdictions
- Tax-efficient locations
- Strategic citizenship planning
Business Locations
- International corporate structures
- Remote work setups
- Multi-jurisdiction presence
Here's the thing: I initially thought one backup plan was enough.
Now I understand you need multiple layers of redundancy—just like in engineering, where you build backup systems for your backup systems.
Want more details on future-proofing your wealth? Check out my comprehensive guide here on how I am planning to escape the rat race.
Remember, this isn't about becoming a doomsday prepper (though some preparation never hurts).
It's about being realistic about the coming changes in our financial system and positioning yourself accordingly.
Final Thoughts
The Everything Code isn't just about understanding the current system – it's about seeing where things are headed.
As someone who's spent years analyzing this stuff (probably too many hours, if I'm honest), I believe we're at a crucial turning point.
The key is to stay flexible, keep learning, and position yourself for multiple scenarios.
Remember, the goal isn't to predict the future perfectly – it's to be antifragile enough to thrive no matter what happens.
<!DOCTYPE html>
<html>
<head>
<style>
.calculator-container {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
max-width: 800px;
margin: 20px auto;
padding: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
border-radius: 8px;
background: white;
}
.intro-text {
margin-bottom: 20px;
line-height: 1.6;
color: #333;
}
.input-section {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 20px;
}
.input-group {
margin-bottom: 15px;
padding: 10px;
background: #f8f9fa;
border-radius: 6px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #333;
}
input[type="range"] {
width: 100%;
margin: 10px 0;
}
.value-display {
font-size: 0.9em;
color: #666;
margin-top: 5px;
}
#chart {
width: 100%;
height: 400px;
margin: 20px 0;
}
.results {
background: #f8f9fa;
padding: 15px;
border-radius: 6px;
margin-top: 20px;
}
.tooltip {
position: relative;
display: inline-block;
cursor: help;
margin-left: 5px;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 250px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 8px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -125px;
opacity: 0;
transition: opacity 0.3s;
font-size: 0.9em;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
.section-title {
color: #2c3e50;
margin: 20px 0 10px;
padding-bottom: 5px;
border-bottom: 2px solid #eee;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.7.0/chart.min.js"></script>
</head>
<body>
<div class="calculator-container">
<h2>The Real Hurdle Rate Calculator</h2>
<div class="intro-text">
Here's the thing about FIRE calculations - they usually only consider the official inflation rate. But what if I told you there's more to the story? This calculator shows how your investments perform against both official inflation AND the real hurdle rate (which includes money printing and currency debasement).
</div>
<div class="input-section">
<div>
<h3 class="section-title">Initial Setup</h3>
<div class="input-group">
<label for="initialInvestment">Initial Investment ($)
<span class="tooltip">ⓘ
<span class="tooltiptext">How much are you starting with?</span>
</span>
</label>
<input type="number" id="initialInvestment" value="100000" min="0" step="1000" class="number-input">
<div class="value-display">Starting Amount</div>
</div>
<div class="input-group">
<label for="monthlyContribution">Monthly Contribution ($)
<span class="tooltip">ⓘ
<span class="tooltiptext">How much can you add each month?</span>
</span>
</label>
<input type="number" id="monthlyContribution" value="1000" min="0" step="100" class="number-input">
<div class="value-display">Monthly Amount</div>
</div>
<style>
.number-input {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
margin-bottom: 5px;
}
.number-input:focus {
outline: none;
border-color: #4a90e2;
box-shadow: 0 0 5px rgba(74,144,226,0.3);
}
</style>
<div class="input-group">
<label for="yearlyContribution">Additional Yearly Contribution ($)
<span class="tooltip">ⓘ
<span class="tooltiptext">Any extra annual contributions like bonuses?</span>
</span>
</label>
<input type="range" id="yearlyContribution" min="0" max="50000" value="0" step="1000">
<div class="value-display">Amount: $<span id="yearlyContributionValue">0</span></div>
</div>
<div class="input-group">
<label for="timeHorizon">Time Horizon (Years)
<span class="tooltip">ⓘ
<span class="tooltiptext">How many years are you planning for?</span>
</span>
</label>
<input type="range" id="timeHorizon" min="5" max="40" value="30" step="1">
<div class="value-display">Years: <span id="timeHorizonValue">30</span></div>
</div>
<h3 class="section-title">Investment Returns</h3>
<div class="input-group">
<label for="stockReturn">Stock Market Return (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">Traditional stock market return before inflation. Historical average is around 8-10%</span>
</span>
</label>
<input type="range" id="stockReturn" min="0" max="20" value="8" step="0.5">
<div class="value-display">Return: <span id="stockReturnValue">8</span>%</div>
</div>
<div class="input-group">
<label for="bitcoinReturn">Bitcoin Return (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">Conservative estimate for Bitcoin returns. Historical returns have been much higher but let's be conservative here.</span>
</span>
</label>
<input type="range" id="bitcoinReturn" min="0" max="50" value="15" step="0.5">
<div class="value-display">Return: <span id="bitcoinReturnValue">15</span>%</div>
</div>
<div class="input-group">
<label for="bitcoinAllocation">Bitcoin Allocation (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">What percentage of your portfolio is in Bitcoin?</span>
</span>
</label>
<input type="range" id="bitcoinAllocation" min="0" max="100" value="10" step="5">
<div class="value-display">Allocation: <span id="btcValue">10</span>%</div>
</div>
</div>
<div>
<h3 class="section-title">The Real Hurdle Rate</h3>
<div class="input-group">
<label for="officialInflation">Official Inflation Rate (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">The inflation rate used in traditional FIRE calculators (usually around 2-3%)</span>
</span>
</label>
<input type="range" id="officialInflation" min="0" max="10" value="3" step="0.5">
<div class="value-display">Rate: <span id="officialInflationValue">3</span>%</div>
</div>
<div class="input-group">
<label for="moneyPrinting">Money Printing Impact (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">The hidden impact of currency devaluation through money printing</span>
</span>
</label>
<input type="range" id="moneyPrinting" min="0" max="15" value="5" step="0.5">
<div class="value-display">Rate: <span id="moneyPrintingValue">5</span>%</div>
</div>
</div>
</div>
<canvas id="chart"></canvas>
<div class="results">
<h3>After <span id="resultYears">30</span> Years, Your Investment Would Be Worth:</h3>
<div id="results-content">
<p>Against Official Inflation:</p>
<ul>
<li>Traditional Portfolio: $<span id="traditionalOfficialFinal">0</span></li>
<li>Bitcoin Mix Portfolio: $<span id="bitcoinOfficialFinal">0</span></li>
</ul>
<p>Against Real Hurdle Rate:</p>
<ul>
<li>Traditional Portfolio: $<span id="traditionalRealFinal">0</span></li>
<li>Bitcoin Mix Portfolio: $<span id="bitcoinRealFinal">0</span></li>
</ul>
</div>
</div>
</div>
<script>
let chart;
function calculatePortfolioValues() {
const initial = Number(document.getElementById('initialInvestment').value);
const monthlyContribution = Number(document.getElementById('monthlyContribution').value);
const yearlyContribution = Number(document.getElementById('yearlyContribution').value);
const timeHorizon = Number(document.getElementById('timeHorizon').value);
const btcAllocation = Number(document.getElementById('bitcoinAllocation').value) / 100;
const stockReturn = Number(document.getElementById('stockReturn').value) / 100;
const btcReturn = Number(document.getElementById('bitcoinReturn').value) / 100;
const officialInflation = Number(document.getElementById('officialInflation').value) / 100;
const moneyPrinting = Number(document.getElementById('moneyPrinting').value) / 100;
const realHurdleRate = officialInflation + moneyPrinting;
const traditionalOfficialData = [];
const traditionalRealData = [];
const bitcoinOfficialData = [];
const bitcoinRealData = [];
const labels = [];
let traditionalValue = initial;
let bitcoinMixValue = initial;
for (let year = 0; year <= timeHorizon; year++) {
// Add monthly and yearly contributions
traditionalValue += (monthlyContribution * 12) + (year > 0 ? yearlyContribution : 0);
bitcoinMixValue += (monthlyContribution * 12) + (year > 0 ? yearlyContribution : 0);
// Calculate portfolio returns
traditionalValue *= (1 + stockReturn);
const stocksPortion = (1 - btcAllocation) * bitcoinMixValue * (1 + stockReturn);
const bitcoinPortion = btcAllocation * bitcoinMixValue * (1 + btcReturn);
bitcoinMixValue = stocksPortion + bitcoinPortion;
// Calculate real values considering different rates
const traditionalOfficialReal = traditionalValue / Math.pow(1 + officialInflation, year);
const traditionalRealHurdle = traditionalValue / Math.pow(1 + realHurdleRate, year);
const bitcoinOfficialReal = bitcoinMixValue / Math.pow(1 + officialInflation, year);
const bitcoinRealHurdle = bitcoinMixValue / Math.pow(1 + realHurdleRate, year);
traditionalOfficialData.push(Math.round(traditionalOfficialReal));
traditionalRealData.push(Math.round(traditionalRealHurdle));
bitcoinOfficialData.push(Math.round(bitcoinOfficialReal));
bitcoinRealData.push(Math.round(bitcoinRealHurdle));
labels.push(year);
}
// Update results safely
try {
const resultElements = {
'traditionalOfficialFinal': traditionalOfficialData[traditionalOfficialData.length - 1],
'traditionalRealFinal': traditionalRealData[traditionalRealData.length - 1],
'bitcoinOfficialFinal': bitcoinOfficialData[bitcoinOfficialData.length - 1],
'bitcoinRealFinal': bitcoinRealData[bitcoinRealData.length - 1]
};
Object.entries(resultElements).forEach(([id, value]) => {
const element = document.getElementById(id);
if (element) {
element.textContent = value.toLocaleString();
}
});
} catch (error) {
console.error('Error updating results:', error);
}
return {
labels,
traditionalOfficialData,
traditionalRealData,
bitcoinOfficialData,
bitcoinRealData
};
}
function updateChart() {
const data = calculatePortfolioValues();
if (chart) {
chart.destroy();
}
const ctx = document.getElementById('chart').getContext('2d');
chart = new Chart(ctx, {
type: 'line',
data: {
labels: data.labels,
datasets: [
{
label: 'Traditional Portfolio (Official Inflation)',
data: data.traditionalOfficialData,
borderColor: 'rgb(75, 192, 192)',
tension: 0.1
},
{
label: 'Traditional Portfolio (Real Hurdle Rate)',
data: data.traditionalRealData,
borderColor: 'rgb(75, 192, 192)',
borderDash: [5, 5],
tension: 0.1
},
{
label: 'Bitcoin Mix Portfolio (Official Inflation)',
data: data.bitcoinOfficialData,
borderColor: '#f7931a', // Bitcoin orange
tension: 0.1
},
{
label: 'Bitcoin Mix Portfolio (Real Hurdle Rate)',
data: data.bitcoinRealData,
borderColor: '#f7931a', // Bitcoin orange
borderDash: [5, 5],
tension: 0.1
}
]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: 'Portfolio Value ($)'
}
},
x: {
title: {
display: true,
text: 'Years'
}
}
}
}
});
}
// Update value displays
function updateValue(inputId, displayId) {
const element = document.getElementById(displayId);
if (element) {
element.textContent = document.getElementById(inputId).value;
}
}
// Event listeners for all inputs
const inputs = ['initialInvestment', 'monthlyContribution', 'yearlyContribution',
'timeHorizon', 'stockReturn', 'bitcoinReturn', 'bitcoinAllocation',
'officialInflation', 'moneyPrinting'];
inputs.forEach(input => {
const element = document.getElementById(input);
if (element) {
element.addEventListener('input', () => {
updateValue(input, input + 'Value');
updateChart();
});
}
});
// Initial chart
updateChart();
</script>
</body>
</html>
<!DOCTYPE html> <html> <head> <style> .calculator-container { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; max-width: 800px; margin: 20px auto; padding: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border-radius: 8px; background: white; } .intro-text { margin-bottom: 20px; line-height: 1.6; color: #333; } .input-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 20px; } .input-group { margin-bottom: 15px; padding: 10px; background: #f8f9fa; border-radius: 6px; } label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; } input[type="range"] { width: 100%; margin: 10px 0; } .value-display { font-size: 0.9em; color: #666; margin-top: 5px; } #chart { width: 100%; height: 400px; margin: 20px 0; } .results { background: #f8f9fa; padding: 15px; border-radius: 6px; margin-top: 20px; } .tooltip { position: relative; display: inline-block; cursor: help; margin-left: 5px; } .tooltip .tooltiptext { visibility: hidden; width: 250px; background-color: #333; color: #fff; text-align: center; border-radius: 6px; padding: 8px; position: absolute; z-index: 1; bottom: 125%; left: 50%; margin-left: -125px; opacity: 0; transition: opacity 0.3s; font-size: 0.9em; } .tooltip:hover .tooltiptext { visibility: visible; opacity: 1; } .section-title { color: #2c3e50; margin: 20px 0 10px; padding-bottom: 5px; border-bottom: 2px solid #eee; } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.7.0/chart.min.js"></script> </head> <body> <div class="calculator-container"> <h2>The Real Hurdle Rate Calculator</h2> <div class="intro-text"> Here's the thing about FIRE calculations – they usually only consider the official inflation rate. But what if I told you there's more to the story? This calculator shows how your investments perform against both official inflation AND the real hurdle rate (which includes money printing and currency debasement). </div>
<div class="input-section">
<div>
<h3 class="section-title">Initial Setup</h3>
<div class="input-group">
<label for="initialInvestment">Initial Investment ($)
<span class="tooltip">ⓘ
<span class="tooltiptext">How much are you starting with?</span>
</span>
</label>
<input type="number" id="initialInvestment" value="100000" min="0" step="1000" class="number-input">
<div class="value-display">Starting Amount</div>
</div>
<div class="input-group">
<label for="monthlyContribution">Monthly Contribution ($)
<span class="tooltip">ⓘ
<span class="tooltiptext">How much can you add each month?</span>
</span>
</label>
<input type="number" id="monthlyContribution" value="1000" min="0" step="100" class="number-input">
<div class="value-display">Monthly Amount</div>
</div>
<style>
.number-input {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
margin-bottom: 5px;
}
.number-input:focus {
outline: none;
border-color: #4a90e2;
box-shadow: 0 0 5px rgba(74,144,226,0.3);
}
</style>
<div class="input-group">
<label for="yearlyContribution">Additional Yearly Contribution ($)
<span class="tooltip">ⓘ
<span class="tooltiptext">Any extra annual contributions like bonuses?</span>
</span>
</label>
<input type="range" id="yearlyContribution" min="0" max="50000" value="0" step="1000">
<div class="value-display">Amount: $<span id="yearlyContributionValue">0</span></div>
</div>
<div class="input-group">
<label for="timeHorizon">Time Horizon (Years)
<span class="tooltip">ⓘ
<span class="tooltiptext">How many years are you planning for?</span>
</span>
</label>
<input type="range" id="timeHorizon" min="5" max="40" value="30" step="1">
<div class="value-display">Years: <span id="timeHorizonValue">30</span></div>
</div>
<h3 class="section-title">Investment Returns</h3>
<div class="input-group">
<label for="stockReturn">Stock Market Return (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">Traditional stock market return before inflation. Historical average is around 8-10%</span>
</span>
</label>
<input type="range" id="stockReturn" min="0" max="20" value="8" step="0.5">
<div class="value-display">Return: <span id="stockReturnValue">8</span>%</div>
</div>
<div class="input-group">
<label for="bitcoinReturn">Bitcoin Return (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">Conservative estimate for Bitcoin returns. Historical returns have been much higher but let's be conservative here.</span>
</span>
</label>
<input type="range" id="bitcoinReturn" min="0" max="50" value="15" step="0.5">
<div class="value-display">Return: <span id="bitcoinReturnValue">15</span>%</div>
</div>
<div class="input-group">
<label for="bitcoinAllocation">Bitcoin Allocation (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">What percentage of your portfolio is in Bitcoin?</span>
</span>
</label>
<input type="range" id="bitcoinAllocation" min="0" max="100" value="10" step="5">
<div class="value-display">Allocation: <span id="btcValue">10</span>%</div>
</div>
</div>
<div>
<h3 class="section-title">The Real Hurdle Rate</h3>
<div class="input-group">
<label for="officialInflation">Official Inflation Rate (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">The inflation rate used in traditional FIRE calculators (usually around 2-3%)</span>
</span>
</label>
<input type="range" id="officialInflation" min="0" max="10" value="3" step="0.5">
<div class="value-display">Rate: <span id="officialInflationValue">3</span>%</div>
</div>
<div class="input-group">
<label for="moneyPrinting">Money Printing Impact (%)
<span class="tooltip">ⓘ
<span class="tooltiptext">The hidden impact of currency devaluation through money printing</span>
</span>
</label>
<input type="range" id="moneyPrinting" min="0" max="15" value="5" step="0.5">
<div class="value-display">Rate: <span id="moneyPrintingValue">5</span>%</div>
</div>
</div>
</div>
<canvas id="chart"></canvas>
<div class="results">
<h3>After <span id="resultYears">30</span> Years, Your Investment Would Be Worth:</h3>
<div id="results-content">
<p>Against Official Inflation:</p>
<ul>
<li>Traditional Portfolio: $<span id="traditionalOfficialFinal">0</span></li>
<li>Bitcoin Mix Portfolio: $<span id="bitcoinOfficialFinal">0</span></li>
</ul>
<p>Against Real Hurdle Rate:</p>
<ul>
<li>Traditional Portfolio: $<span id="traditionalRealFinal">0</span></li>
<li>Bitcoin Mix Portfolio: $<span id="bitcoinRealFinal">0</span></li>
</ul>
</div>
</div>
</div>
<script>
let chart;
function calculatePortfolioValues() {
const initial = Number(document.getElementById('initialInvestment').value);
const monthlyContribution = Number(document.getElementById('monthlyContribution').value);
const yearlyContribution = Number(document.getElementById('yearlyContribution').value);
const timeHorizon = Number(document.getElementById('timeHorizon').value);
const btcAllocation = Number(document.getElementById('bitcoinAllocation').value) / 100;
const stockReturn = Number(document.getElementById('stockReturn').value) / 100;
const btcReturn = Number(document.getElementById('bitcoinReturn').value) / 100;
const officialInflation = Number(document.getElementById('officialInflation').value) / 100;
const moneyPrinting = Number(document.getElementById('moneyPrinting').value) / 100;
const realHurdleRate = officialInflation + moneyPrinting;
const traditionalOfficialData = [];
const traditionalRealData = [];
const bitcoinOfficialData = [];
const bitcoinRealData = [];
const labels = [];
let traditionalValue = initial;
let bitcoinMixValue = initial;
for (let year = 0; year <= timeHorizon; year++) {
// Add monthly and yearly contributions
traditionalValue += (monthlyContribution * 12) + (year > 0 ? yearlyContribution : 0);
bitcoinMixValue += (monthlyContribution * 12) + (year > 0 ? yearlyContribution : 0);
// Calculate portfolio returns
traditionalValue *= (1 + stockReturn);
const stocksPortion = (1 - btcAllocation) * bitcoinMixValue * (1 + stockReturn);
const bitcoinPortion = btcAllocation * bitcoinMixValue * (1 + btcReturn);
bitcoinMixValue = stocksPortion + bitcoinPortion;
// Calculate real values considering different rates
const traditionalOfficialReal = traditionalValue / Math.pow(1 + officialInflation, year);
const traditionalRealHurdle = traditionalValue / Math.pow(1 + realHurdleRate, year);
const bitcoinOfficialReal = bitcoinMixValue / Math.pow(1 + officialInflation, year);
const bitcoinRealHurdle = bitcoinMixValue / Math.pow(1 + realHurdleRate, year);
traditionalOfficialData.push(Math.round(traditionalOfficialReal));
traditionalRealData.push(Math.round(traditionalRealHurdle));
bitcoinOfficialData.push(Math.round(bitcoinOfficialReal));
bitcoinRealData.push(Math.round(bitcoinRealHurdle));
labels.push(year);
}
// Update results safely
try {
const resultElements = {
'traditionalOfficialFinal': traditionalOfficialData[traditionalOfficialData.length - 1],
'traditionalRealFinal': traditionalRealData[traditionalRealData.length - 1],
'bitcoinOfficialFinal': bitcoinOfficialData[bitcoinOfficialData.length - 1],
'bitcoinRealFinal': bitcoinRealData[bitcoinRealData.length - 1]
};
Object.entries(resultElements).forEach(([id, value]) => {
const element = document.getElementById(id);
if (element) {
element.textContent = value.toLocaleString();
}
});
} catch (error) {
console.error('Error updating results:', error);
}
return {
labels,
traditionalOfficialData,
traditionalRealData,
bitcoinOfficialData,
bitcoinRealData
};
}
function updateChart() {
const data = calculatePortfolioValues();
if (chart) {
chart.destroy();
}
const ctx = document.getElementById('chart').getContext('2d');
chart = new Chart(ctx, {
type: 'line',
data: {
labels: data.labels,
datasets: [
{
label: 'Traditional Portfolio (Official Inflation)',
data: data.traditionalOfficialData,
borderColor: 'rgb(75, 192, 192)',
tension: 0.1
},
{
label: 'Traditional Portfolio (Real Hurdle Rate)',
data: data.traditionalRealData,
borderColor: 'rgb(75, 192, 192)',
borderDash: [5, 5],
tension: 0.1
},
{
label: 'Bitcoin Mix Portfolio (Official Inflation)',
data: data.bitcoinOfficialData,
borderColor: '#f7931a', // Bitcoin orange
tension: 0.1
},
{
label: 'Bitcoin Mix Portfolio (Real Hurdle Rate)',
data: data.bitcoinRealData,
borderColor: '#f7931a', // Bitcoin orange
borderDash: [5, 5],
tension: 0.1
}
]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: 'Portfolio Value ($)'
}
},
x: {
title: {
display: true,
text: 'Years'
}
}
}
}
});
}
// Update value displays
function updateValue(inputId, displayId) {
const element = document.getElementById(displayId);
if (element) {
element.textContent = document.getElementById(inputId).value;
}
}
// Event listeners for all inputs
const inputs = ['initialInvestment', 'monthlyContribution', 'yearlyContribution',
'timeHorizon', 'stockReturn', 'bitcoinReturn', 'bitcoinAllocation',
'officialInflation', 'moneyPrinting'];
inputs.forEach(input => {
const element = document.getElementById(input);
if (element) {
element.addEventListener('input', () => {
updateValue(input, input + 'Value');
updateChart();
});
}
});
// Initial chart
updateChart();
</script>
</body> </html>