Monads are Omnipresent in Rust
Monads, as they occur in functional programming, seem crazy and difficult to understand to me. Above all explanations and references to the mathematical subfield of category theory are confusing to me. In this post, I’m trying to explain a concept that I haven’t penetrated very deeply myself, in an introductory, application-oriented and superficial way, so that you can become the head nerd at the next party of imperative nerds. This is a translation of the original German article in a collaboration between man and machine. ...
Simulating Worst-Case Scenarios for Passive Capital Income
After a period of deprivation and frugality, Luise has entered a phase of greater financial freedom. All her funds are in an ETF portfolio that averages a 7% return in the long term. Unfortunately, the 7% return is not constant and fluctuates significantly. Luise plans to withdraw a certain amount every month, either through dividends or by selling shares. Before I continue with a financial-themed story, I want to clarify that I’m not a financial expert. I’m just an individual who is interested in personal retirement planning and other financial topics, accumulating some solid half-knowledge along the way, and occasionally relying on my more or less sound common sense. From time to time I create or extend a calculator. ...
Back-of-the-envelope Simulation of Stock Prices
When calculating financial goals, it’s often assumed, like on the informative website Finanzfluss, that there’s a fixed annual return. In the suggested return range of around 5% to 7% per year, I dare to challenge the expectation of consistent returns without the fluctuations of stock investments. Therefore, I’ve briefly explored simulating stock prices and implemented a savings plan calculator based on this concept. The focus of this article is on the simulation aspect. However, please note that I haven’t consulted any books or experts – I’m just here for fun. ...
Geographic Re-Balancing of Stock ETFs
Various channels claim that rebalancing your stock portfolio increases your return on investment. In this article, I will present the analysis of historical data on geographic allocations of the popular indices MSCI World and MSCI Emerging Markets. 2 remarks before we start: This article was translated from German to English in collaboration between man and machine *To be honest, I was a little disappointed by the translation performance of translate.google.com. Even though I am talking finance in this article, I’m not a finance expert at all. I’m just a private individual who is interested in their own pension scheme and other financial topics. So I accumulate solid half-knowledge and rely on my more or less common sense and program a calculator1,2 every now and then. Let a world portfolio be given Suppose a person, let’s call her Elisa, wants to benefit from the global capital market for her retirement. Her effort should be as limited as possible. Now Elisa hears that ETFs can be used to easily benefit from profits of public companies all around the world. An index called MSCI ACWI and ETFs that try to replicate this seem suitable to Elisa at first glance. However, Elisa notes that the MSCI ACWI includes more than 50% shares in US companies. Represent the US really half the global economy? Following the criterion of market capitalization used here, definitively. There are other criteria for tracking the global economy, see, e.g., Justetf. A popular alternative to 100% ACWI includes the MSCI World Index at 70% and the MSCI Emerging Markets Index at 30%. ...
New Blog with Hugo
My old wordpress blog has quit the service. Without consultation. Suddenly I could no longer log into the administration area under ninety.de. The first best debugging tips from the net turned out to be a waste of time. I denounced this while kicking Wordpress into the garbage can instead of asking ChatGpt*the cocky chat bot of the not-so-new startup OpenAI, which is a topic for another time for help. The greed for more simplicity and security was awakened. Thankfully, ChatGpt*Transparency regarding the use of ChatGpts and other AI text generators may be expected from this blog. pointed me to the popularity of static page generators for blogging. The question remained, which is the best static page generator? MkDocs? Hugo? Gatsby? ChatGpt was not particularly opinionated on this. My list of requirements read as follows: ...
Parsing Operators in Rust
The Advent of Code is just around the corner. This is an advent calendar of programming tasks, the solution of which can serve as a pastime for the fun of joy. After successfully processing a task, you receive a virtual golden star. My first participation was in 2020. At the time, I thought I’d try to do this directly in the Rust programming language, which I hadn’t used before. By the way, this article is not only intended to shed light on an interesting Advent of Code task, but also to highlight the flexibility of my Rust library Exmex, which is discussed below as part of the solution. ...
Sequences of partial reductions in Elm
In my previous article I derived the calculation for passive income from invested assets and demonstrated a small calculator. It struck me that there was a slight delay in the case of high annual numbers. The cause of the delay lies in my implementation of the formula $$ \sum_{k = 1}^{m-1} \frac {1} {\prod_ {t = 1} ^ {k} w_t}. $$ As described in more detail in the article mentioned above, $ w_t $ denotes the relative market value in the month $ t $ and $ m $ the total number of months. ...
Passive income from stock market investments
How can you generate passive income from return on stock market investments or dividends*Dividends are of course also a kind of investment income. I just wanted to mention them again because they play a special role in this article. and when does that make sense? In addition to explanations and anecdotes, I also present mathematical formulas to answer this question🥳*That's a smiley celebrating the existence of math in this article.. ...
First steps towards dynamic web apps in Elm
Some time ago I was able to listen to the episode We’re Teaching Functional Programming Wrong of the podcast Corecursive. Richard Feldman tells of a purely functional language with which you can actually create dynamic web pages. It is not even necessary to understand what a Monad is. Since I consider object-oriented programming to be overrated*The talk [Free your Functions](https://www.youtube.com/watch?v=WLDT1lDOsb4) by Klaus Iglberger highlights some practical aspects my point of view., I had a closer look at this approach. In this post I will report on my first steps, hurdles and progress in Elm and focus on aspects that were unfamiliar to me having an imperative background. ...
Reincarnation
I’m just bringing my public diary back to life. I write in German and cooperate with machines to translate articles to English.