calculate your future wealth

Coda your wealth planning

Integrate capital, inflation, ROI and allowances

Christiaan Huizer

--

I was asked by a friend to figure out how much money someone needs each month to live well. Private bankers, who should know this, are surprisingly unclear. They say ‘it depends’ and then give a confusing answer that lets them off the hook. I’m not a banker; I write programs for calculations and use data from past market performance (gold, stocks, etc.) to make predictions. For example, I recently wrote about the CPI, which is one of the inflation indicators used in this analysis.

Before building the solution in Coda, I checked if an AI could handle it. It could, and the results were acceptable, aside from minor rounding errors. This begs the question: why invest time in Coda and develop a complex setup when an AI can deliver similar results?

I see several compelling reasons, beyond the enjoyment of coding in Coda:

  • The output in Coda is consistently accurate and reliable, which is crucial when dealing with financial data. While AI is impressive, its reliability in this specific context is not yet fully established.
  • The Coda document requires minimal prior knowledge or understanding. Users need to input data into text boxes and adjust sliders to define inflation and returns.
  • Coda allows us to store the results of our calculations, providing a comprehensive overview of the tested assumptions. This is beneficial not only for the user but also for private bankers who might share the document. It offers valuable starting points for discussions based on the applied assumptions.

Our set up

We collect the necessary variables using text boxes and sliders. Clicking a button generates fills out two tables. The first table shows allowances, interest, and remaining capital for each year. Clicking again refreshes the table with new results. The second table summarizes the first, letting you compare different scenarios over time. This helps private bankers understand client expectations.

The variables

The screenshot displays input variables and their corresponding control names. Text boxes are designated with the prefix _tb, and sliders with _sl. All control names follow the convention of starting with an underscore, followed by a two-letter control type abbreviation, an underscore, and a concise description of the control's purpose.

The basics

We initiate the process by defining key variables using the Let() function, which is a more concise equivalent of WithName(). To ensure accurate calculations, input values are cleaned by stripping away any non-numeric characters using Split() and Join(). This accommodates user inputs with formatting (e.g., currency symbols or thousands separators). The loop counter 'i' starts at zero, reflecting the current year as the starting point

After defining the initial variables, we calculate the annual allowance, factoring in inflation. The monthly allowance is annualized, and the inflation rate is compounded annually using the Power() function.

To create a row for each year, we use the ForEach() function which gets only closed after the AddRow() function got closed. We've renamed it 'i' for simplicity. This function automatically generates a row for every year from the current year onwards.

The table in the image below calculates retirement projections year-by-year. The initial row represents the current year (2025), with subsequent rows extending the forecast. The ‘remaining capital’ is dynamically updated using the ‘set remaining capital via Button’ functionality. This button employs a filter to determine the starting capital for each year: if it’s the first year (no prior year data and therefor blank), it uses the ‘start capital’; otherwise, it calculates the new ‘remaining capital’ by adding the ‘yearly interest’ and subtracting the ‘yearly allowance’ from the previous year’s ‘remaining capital’. This iterative calculation ensures each year’s projection is based on the preceding year’s figures. The table’s inherent chronological order eliminates the need for manual sorting.

the main set up

A modify row function completes the execution and prints the remaining capital row per row. This doc shows the setup, and I hope it inspires you to explore Coda for financial planning.

In general, Coda is a better choice than traditional spreadsheets, especially when it comes to managing complex data relationships. While it’s still possible to make mistakes, Coda’s structure makes it less likely.

It’s true that Coda has a more limited set of built-in financial functions, and it may require learning some Coda-specific techniques. In general, the benefits outweigh the learning curve. You’ll be rewarded with a robust, error-free setup that your colleagues and clients will appreciate. That said, one final note.

While this setup isn’t overly complex, it did take time to refine and make user-friendly. My goal was to make this information freely accessible, and with some effort, anyone could rebuild or even improve upon it.

However, in the process, I’ve realized again that Coda’s logic can be confusing, especially for those unfamiliar with it. I’ve observed this firsthand, and it creates friction that limits the tool’s usability. User experience is key, and I must be honest — while the calculations work, the potential for confusion is a drawback.

This has led me to re-evaluate my focus on Coda. After many blogs and much effort, I’m finding myself drawn to explore new areas and possibilities. I deeply appreciate everyone who has followed along and learned from my work. While I may still share Coda-related insights occasionally, I’m eager to broaden my horizons and see where this new path leads. Thank you for your understanding, and I hope our paths continue to cross in the future!

Christiaan
Ghent — Belgium
https://x.com/CodaExpert
Support my work

--

--

No responses yet

Write a response