Publications by Nico
Modeling the Coronavirus Disease 2019 (COVID-19) in the U.S.
Spreading around the United States with a incredible speed, the Corona Virus (COVID-19) became a huge problem, impacting even the global economy and the perspectives that we all have for the future. The Susceptible-Infected-Recovered (SIR) compartmental model of communicable disease outbreaks (see this wikipedia page for an more thorough treatmen...
21173 sym R (18228 sym/49 pcs) 12 img 9 tbl
Berkshire's Performance vs. the S&P 500
Data preparation The S&P 500 numbers are pre-tax whereas the Berkshire numbers are after-tax. Data source: Warren Buffett’s 2021 annual letter. year = 1965:2021 berkshire = c(49.5, -3.4, 13.3, 77.8, 19.4, -4.6, 80.5, 8.1, -2.5, -48.7, 2.5, 129.3, 46.8, 14.5, 102.5, 32.8, 31.8, 38.4, 69, -2.7, 93.7, 14.2, 4.6, 59.3,...
221 sym R (3553 sym/16 pcs) 3 img 9 tbl
Tidying Saudi Aramco Valuation
The tidy data principles are a cornerstone of financial data management and the data modeling workflow. The foundation for tidy data management is the tidyverse, a collection of R packages: purrr, dplyr, tidyr, tibble, ggplot2, readr, that work in harmony, are built for scalability, and are well documented in R for Data Science. Using this infras...
8403 sym R (14013 sym/18 pcs) 1 tbl
S&P500 Valuation Framework
1 Functions Tying the value of the S&P500 to its cashflows, growth and risk. 1.1 Packages library(knitr) library(kableExtra) library(dplyr) library(purrr) library(tidyr) library(lubridate) 1.2 Utils check.length.list.f <- function(x) length(x) > 1 check.nested.list.f <- function(l) { if (!is.list(l)) stop("Not a list.") !identical(unlist(l...
1156 sym R (9210 sym/8 pcs) 2 tbl
Internal Rate of Return (IRR) and the notorious Reinvestment Assumption
This series of posts was inspired by and/or modified in part from the methods for performance metrics for private equity investments by Karl Polen 1 IRR As a consequence of senility, I still feel I do not understand this debate on the various interpretations people might have regarding \(IRRs\) and the reinvestment of withdrawals in private equi...
22931 sym R (2410 sym/9 pcs) 3 img 2 tbl
Continued fraction approximation of OneSixtyTwoDocument
Baran did you know that the formula \(\varphi = 1 + 1/ \varphi\) can be expanded recursively to obtain a continued fraction approximation for \(1.62\). The convergents of these continued fractions are ratios of successive Fibonacci numbers (1/1, 1/2, 2/3, 3/5, 5/8, 8/13…). Continued fraction approximation of 1.62 onesixtytwo.continued.fractio...
325 sym R (409 sym/1 pcs) 1 img
Mathmanship
Baran to prove it lets ignore the hard parts so this approximation is amenable. Then we solve the simpler problem, then lets hope \(sin.f(1,234,567,890)\) is a reasonable approximation to \(1\). 1 angle reduction angle.reduction.f <- function(x_val){# x_val=given angle p_val = 3.14159265358979 p_half_val = p_val / 2 i = as.integer(x_val / ...
254 sym R (1657 sym/4 pcs) 1 img
DR - Water Utility Services
How to best allocate business responsibilities and risks and how to design tariff adjustment and other rules to achieve the desired allocation in a public-private-partnership. Under public provision the contracting authority has all the business responsibilities: it is responsible for managing the business, operating and maintaining the assets, i...
11459 sym R (45700 sym/4 pcs) 3 img
ATP Tennis Goat and the Djokovic–Nadal rivalry
1 ATP Tennis Goat Sports fans frequently argue over who is the greatest of all time or the \(GOAT\) of their sport. Elo ratings are one of the more objective ways to measure a player’s ability. The Elo rating gives us a number of a player’s strength over time in a way that accounts for the ability of the players they have won and lost to over...
1435 sym R (1005 sym/4 pcs) 2 img
Geometric Interpretation of the Discrete Fourier Transform
Some people say elegance is the only beauty that never fades, and when we invoke Euler’s formula to perform a simple substitution on the classical notation of the Discrete Fourier Transform (DFT) it is considerably less esoteric, and imminently more understandable given a familiarity with sine and cosine. DFT then becomes a simple - and simply ...
724 sym