<p>What the media means is heavily dependent on what media you are talking about, but the statistics agencies usually compute two price indices one year apart and compare these, thus they do not use daily compounding. This has pros, it smooths out wild fluctuations and even provides some seasonal adjustment.</p>
<hr />
<p>It is a known result that for <span class="math-container">$n \neq 1, x &gt; 0$</span> we have
<span class="math-container">$$
\left(1+\frac{x}{n} \right)^n \neq 1+x,
$$</span>
thus some adjustment needs to be made to the daily rate.</p>
<p>Seems like using
<span class="math-container">$$
x = \sqrt[365]{1.5} - 1
$$</span>
as a daily inflation rate will solve your problem, as
<span class="math-container">$$(1 + x)^{365} = 1.5.$$</span>
This way you can use daily compounding and the annual inflation measure remains unchanged.</p>
<hr />
<p>As to how to improve your simulation: this depends on a lot of details; what is your goal with the simulation, what are your capacities, etc. <br>
(To be clear, I do not wish to give advice on this in the comments. It seems like this should be a separate question, if it is at all on-topic for this SE.)</p>

CC BY-SA 4.0
2022-01-10T02:48:33.800Z
I follow the logic but I think the result is incorrect. $(1+(\log_{365} 1.5)−1))^{365} \approx 0 \neq 1.5$. 

I tried using $\sqrt[365]{1.5} - 1$ as daily rate, but the only result that matches is the final value, it does not "interpolate" for all intermediate values properly.
Ezequiel Castaño
CC BY-SA 4.0
2022-01-10T02:58:58.573Z
The simulation results are available [here](https://elc.github.io/python-compound-interest/) under "Inflation Simulation"
Ezequiel Castaño
CC BY-SA 4.0
2022-01-10T07:49:44.820Z
@EzequielCastaño You are correct about $\sqrt[365]{1.5}$ vs $\log_{365} 1.5$, my mistake!
Giskard
CC BY-SA 4.0
2022-01-10T20:11:17.977Z
I found a bug in my code and using the $\sqrt[365]{1 + r} - 1$ worked. However in the meantime I came up with an alternative solution which I think is incorrect (added to the question in the EDIT section), could you help me justify why it is incorrect from a more theoretical point?
Ezequiel Castaño
CC BY-SA 4.0
2022-01-10T20:29:12.957Z
@EzequielCastaño Hi! Please post new questions as new questions, don't edit new one questions into your old one. I don't really understand your new notation, so when you post a new question, I recommend you explain it in more detail.
Giskard
CC BY-SA 4.0
2022-01-10T20:38:18.350Z
Great, I posted a [new question](https://economics.stackexchange.com/q/50032/40138), removed the EDIT section to avoid confusion and marked this answer as the correct one, thank you Giskard
Ezequiel Castaño
CC BY-SA 4.0
2022-01-09T08:27:59.940Z
2022-01-10T07:49:13.457Z
2022-01-10T07:49:13.457Z
Giskard
<p>I am developing a &quot;inflation adjustment&quot; web app where an initial capital is adjusted based on some optimistic, realistic and pesimistic estimates using Monte Carlo Simulation.</p>
<p>The code is finished but the results don't match what I can see online regarding inflation adjustment.</p>
<p>Particularly I used <a href="https://www.calculatorsoup.com/calculators/financial/investment-inflation-calculator.php" rel="nofollow noreferrer">this calculator</a> with 1000 and 50% inflation and it shows 666.67 as a result after 1 year.</p>
<p>But if I compute <span class="math-container">$1000 / (1 + 0.5/365)^{365}$</span> the result is significantly less (<span class="math-container">$606.74$</span>).</p>
<p>The error seems to be that I use a daily compounded formula instead of annualy compounded but, isn't it the proper way since inflation happens &quot;on a daily basis&quot; rather than all prices increasing only once a year?</p>
<p>Which would be the more realistic way to simulate inflation?</p>
<p>Put it in other terms, when we see X% inflation rate, do (the media) mean the annual interpretation or the daily one?</p>
<p>PS: I am new to this Stack Exchange subchannel and I have computer science background (no so much economics).</p>

<inflation><nonexpert>
Inflation adjustment different than halving
Ezequiel Castaño
# Inflation adjustment different than halving

(Asked by: username_0 on 2022-01-09)

I am developing a "inflation adjustment" web app where an initial capital is adjusted based on some optimistic, realistic and pesimistic estimates using Monte Carlo Simulation.

The code is finished but the results don't match what I can see online regarding inflation adjustment.

Particularly I used [this calculator](https://www.calculatorsoup.com/calculators/financial/investment-inflation-calculator.php) with 1000 and 50% inflation and it shows 666.67 as a result after 1 year.

But if I compute $1000 / (1 + 0.5/365)^{365}$ the result is significantly less ($606.74$).

The error seems to be that I use a daily compounded formula instead of annualy compounded but, isn't it the proper way since inflation happens "on a daily basis" rather than all prices increasing only once a year?

Which would be the more realistic way to simulate inflation?

Put it in other terms, when we see X% inflation rate, do (the media) mean the annual interpretation or the daily one?

PS: I am new to this Stack Exchange subchannel and I have computer science background (no so much economics).

**Tags:** inflation, nonexpert


---

## 1 answers

### Answer by username_1 on 2022-01-09. Score: 3 | Accepted answer

What the media means is heavily dependent on what media you are talking about, but the statistics agencies usually compute two price indices one year apart and compare these, thus they do not use daily compounding. This has pros, it smooths out wild fluctuations and even provides some seasonal adjustment.

---

It is a known result that for $n \neq 1, x > 0$ we have
$$
\left(1+\frac{x}{n} \right)^n \neq 1+x,
$$
thus some adjustment needs to be made to the daily rate.

Seems like using
$$
x = \sqrt[365]{1.5} - 1
$$
as a daily inflation rate will solve your problem, as
$$(1 + x)^{365} = 1.5.$$
This way you can use daily compounding and the annual inflation measure remains unchanged.

---

As to how to improve your simulation: this depends on a lot of details; what is your goal with the simulation, what are your capacities, etc.   
(To be clear, I do not wish to give advice on this in the comments. It seems like this should be a separate question, if it is at all on-topic for this SE.)

> **Comments:**
> **username_0**: I follow the logic but I think the result is incorrect. $(1+(\log_{365} 1.5)−1))^{365} \approx 0 \neq 1.5$.   I tried using $\sqrt[365]{1.5} - 1$ as daily rate, but the only result that matches is the final value, it does not "interpolate" for all intermediate values properly.  
> **username_0**: The simulation results are available [here](https://elc.github.io/python-compound-interest/) under "Inflation Simulation"  
> **username_1**: @username_0 You are correct about $\sqrt[365]{1.5}$ vs $\log_{365} 1.5$, my mistake!  
> **username_0**: I found a bug in my code and using the $\sqrt[365]{1 + r} - 1$ worked. However in the meantime I came up with an alternative solution which I think is incorrect (added to the question in the EDIT section), could you help me justify why it is incorrect from a more theoretical point?  
> **username_1**: @username_0 Hi! Please post new questions as new questions, don't edit new one questions into your old one. I don't really understand your new notation, so when you post a new question, I recommend you explain it in more detail.  
> **username_0**: Great, I posted a [new question](https://economics.stackexchange.com/q/50032/40138), removed the EDIT section to avoid confusion and marked this answer as the correct one, thank you username_1  

---

