 Navigating in the fog is difficult, but not impossible. Poland 2020.

# Is Financial Independence a product of fortune?

## Introduction

This is the second part of the work that attempts to find a recipe towards financial independence - a stage where you no longer need to work to support yourself.

In the ATTENTION previous article, we tried to formulate the problem of personal finance through a system of ordinary differential equations (ODE), which we later solved numerically using python. Given a set of input parameters, our numerical model was able to determine your financial condition - .

In this article, we bring it to the next stage. We add randomness to the equation to account for life’s unpredictability. This time, we want to find out to what degree your financial success is really in your hands?

We will begin this journey by revisiting the math and add some random contributions. Then, we move into simulating some hypothetical scenarios using the so-called Monte Carlo method. Finally, we will use our augmented model to predict your chances with the help of the world’s historical data.

Let’s dive in.

## Math revisited

The ATTENTION last model relied on a system two coupled differential equations, which we will reduce to just one for simplicity:

The equation models your total wealth by $x$, which is a time-dependent variable. Its left side is the derivative and the right side is composed of two contributing terms:

• $\Delta(t)$, which denotes a yearly balance: all income minus all expenses and taxes - simply how much is left after e.g. each year.
• $x\ln(\cdot)$, which denotes a combined force of investment and inflation that leads to compound interest. Note it’s proportionality to $x$ itself, also more on why the terms reside under a logarithm you can find in the ATTENTION earlier article.

Here, the three parameters represent: B

• $R$ - the expected average interest rate on your investment,
• $\xi$ - the average yearly inflation rate,
• $\beta \in [0, 1]$ - a fraction of your wealth you choose to invest, which we’ll call the commitment factor.

Together, the second term can be represented with one number $\ln \lambda$ and understood as an effective interest rate. Consequently, whenever $\lambda > 1$, you make money, and with $% $ you lose.

The equation itself is a linear first-order differential equation, which can be solved analytically. However, since we will be “randomizing” it later, we will stick to the numerical methods and integrate it using python.

#### Important remark

We use normalized values for $x$ and $\Delta$ to make the approach as generic as possible regarding any country, currency, or personal attitude. Therefore, $\Delta = 1$ can simply be interpreted as “you managed to save 100% of what you committed to”, which can, for example, translate to three months of a “financial pillow”.

This approach puts a person that earns 100k$and spends 50k$ equally positioned to another that makes 10k$and spends 5k$ in terms of financial independence. After all, financial independence is understood as a state under which $x > 0$ and the amount that gets generated is positive despite $\Delta \leq 0$. In other words, the growth at least compensates for the losses, and without a need for active work. Ergo, you can sit and eat forever.

### Deterministic solutions

To find a solution, we need to calculate:

which to do numerically is just one function. Here, we arbitrarily set $t_0 = 25$ and we model the balance function as

The first interval, we call an active time, as it represents the time, where most of us are actively employed and generating money. The second interval represents the retirement, with $x_p$ expressing balance during this time. To make things more difficult, we let $% $. Thus, with a reasonable pension scheme, we can assume $x_p = 0$, meaning you can spend 100% of your pension and it won’t affect your total wealth. Figure 1. Deterministic progression of x. Top-left: a sweep of the commitment factor, top-right: varying the initial conditions, bottom-left: effective interest rate sweep, bottom-right: active time sweep. In all cases, the balance function is set to 1 during the active time and -0.5 thereafter.

To test the influence of the different parameters, we show the progression of $x$ under a different set of conditions (fig. 1). As we can see, high investment commitment $\beta$, high expected interest rates $R$, and longer active times $T = t - t_0$ result in the solution to be found in the regime where growth generates more growth. Conversely, the initial condition $x_0 = x(t_0)$ does not affect growth at all - only the absolute amount of $x$.

### Success condition

As mentioned earlier, our condition for financial independence is satisfied when $x, \frac{dx}{dt} > 0$ while $\Delta \leq 0$. Another condition we should impose is that this stage is perpetual, meaning that once reached, there is no need to come back to a regular job.

However, once we have accounted for the randomness, the second condition would drive the point into a rather cumbersome analysis of the equation’s stability problem. To avoid that, and to account for a typical life scenario that is earning followed by spending, we will stick to representing the $\Delta$ as the following function

meaning that once you pass the retirement age, your yearly balance is expected to be -50% of your prior active time balance. We will, therefore, call it a success if once you get retired ($t > t_0 + T$), $x$ stays positive, and the derivative of $x$ gets positive on average.

## Adding life’s randomness

This is an interesting part. The “master” equation offers us a solution for a perfectly deterministic world. Truth is that neither your condition nor (especially) the market’s are. Naturally, we need to account for some randomness in the process, but do it in a way such that our model still makes sense.

For this reason, we will replace the equation’s parameters with parametrized distributions. Then, we will use the so-called Monte Carlo method to find out where it leads us to. Once we collect the outcome through multiple iterations, we can use statistics to discuss the result.

### Parametrization

The contributing factors can be divided into human-dependent and market-dependent. The human-dependent factors are $\Delta$ and $\beta$ as only these two can be influenced by your decisions. The contrary, $R$, and $\xi$ are more of the world’s condition, which unless you are one of the Masonry, you have no influence on ;)

Mathematically, we can account for randomness to the balance function by injecting gaussian noise in the following way:

Where $\Delta$ is defined as earlier, and $\mathcal{N}$ is a zero-centered Gaussian noise of a specific variance.

Similarly, $R$ and $\xi$ can be modeled using a Gaussian noise as:

### For beta we have beta

Modeling of $\beta$ is more complicated though. As $0 \geq \beta \geq 1$, we cannot use the normal distribution, but we can replace it with the so-called Beta distribution. The distribution does not only support the constrain but also gives us two parameters (we name them as $a$ and $b$ to avoid overloading),

which can greatly “paint” human attitude towards investment in general.

### Implementation

With this sort of weaponry, we can construct a “life-simulating” class.

Here, all parameters were set to resemble a real-life scenario, but the historical data based results are presented at the end.

It is also important to mention that self.beta is assumed to be time-independent. Consequently, we can interpret it as a situation that once a person is born (an object is instantiated), the investment commitment is chosen and stays the same. As we will use the Monte Carlo method, we should expect enough randomness across the population (after many runs).

Next, we need to integrate the new stochastic differential equation numerically. Since scipy.integrate.odeint performed poorly, we created our routine sdeint that matched the interface of odeint.

Finally, the simulation code can be wrapped in the following function. Figure 2. Results of integrating of the randomized equation. Here, the same sigma was assigned to both investment rate and inflation rate standard deviation. In all cases, we let it run 50 times.

### Monte Carlo

Now, we let it run for 1000 times, increasing the expected $R$. Besides, we randomize the active time $T$ to fully randomize the population. Figure 3. shows the results. Figure 3. Monte Carlo simulations of the fully randomized equation. The balance function's active time is set to a random integer number from 15 to 40 years.

As we can see, whenever $% $ it is virtually impossible to get into financial independence. This is because $% $ and after integrating the solution experiences an exponential decay and the equation remains stable. However, increasing $\mu_R$ does not guarantee success either, due to the influence of the active time $T$ and the commitment factor $\beta$. Even for an artificially high $\mu_R$, a large fraction of runs fails due to the reasons mentioned above.

Fortunately, both $\beta$ and $T$ are factors that depend on everyone’s personal choices. Therefore, if we freeze these to while letting $R$ and $\xi$ remain random, we should be able to estimate your chances of success at least to a certain extent.

## Your chances against the historical data

To get a feeling for what it is like to combat the market, we need to plug in some reasonable values of $\mu_R, \sigma_R, \mu_\xi$ and $\sigma_\xi$. Assuming that “the history repeats itself”, we can argue that we can simulate the future using historical data. To get the values for inflation, we use the historical (1914-2020) data for the US from here. Similarly, to estimate the market’s behavior in terms of the mean and the variance, we use the S&P 500 data from 1928-2020.

According to the data, we have $\xi = 3.24 \pm 4.98 \%$ and $R = 7.67 \pm 19.95 \%$.

Next, we sweep $T$ and $\beta$, while using the values we just computed.

### Final result Figure 4. Final result of the 1000 runs for each (T, beta)-pair with historical market data. The results were expressed in %.

Figure 4. shows the final result of the Monte Carlo simulation for each $(T, \beta)$-pair. As we can see, any $% $ practically exclude you from ever becoming financially independent. Truth is that if you dream of securing a bright future for yourself, you need to learn to invest - whatever that means to you. This can mean anything from being a regular trader to a skilled entreprenour - you need to learn to multiply what you have.

The second most important factor is your active time. This one, however, should be seen more as an “opportunity” window during which you can accumulate wealth. The longer it is, the higher the chances you will gain enough of the “fuel” to get your financial ship to fly.

However, even with 100% commitment and 40 years of hardship, the odds seem to play against you! Fortunately, you should remember that we used an oversimplified model for the $\Delta(t)$ function. In reality, if you manage to translate what you learned into a higher salary and stay away from the temptation to overspend, your wealth will accumulate faster. Furthermore, nobody said you will be left to market “caprice”. Unless your only investment strategy is to safely allocate your money to some fund, you will probably learn to navigate and sail even during storms.

With that in mind, please find these results only as a way to encourage you to try, as they are not the ultimate recipe, but rather an attempt to figure out what matters. Good luck!

PS. If you want to play with the code and simulate for yourself, you can find the code on Github.