Explorations – Randomness from Gonçalo https://goncalovf.com Mon, 17 Jul 2023 08:06:41 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.1 https://goncalovf.com/wp-content/uploads/2020/06/cropped-site-logo-32x32.png Explorations – Randomness from Gonçalo https://goncalovf.com 32 32 PPRs, when are they worth investing in? https://goncalovf.com/pprs-when-are-they-worth-investing-in/ Mon, 17 Jul 2023 08:05:27 +0000 https://goncalovf.com/?p=126 PPRs, or Planos Poupança Reforma, are retirement plans specific to Portugal. You can invest in them as long as you have a personal fiscal identity in Portugal (called a NIF) or, in other words, as long as you have residency in Portugal.

We can see PPRs as wrappers for financial assets. Investors could buy those assets directly, or decide to buy a PPR that holds them. In both cases, investors are putting their money in the assets themselves, but in ways that differ in tax treatment and costs.

This article is not intended to explain PPRs’ intricacies — that’s already well covered in other online resources. Instead, it serves to point people to resources I’m building to be able to assess if and when a PPR is worth investing in. For now, those resources are:

I’ll continue to improve these resources and possibly add new ones to the list.

]]>
Buy vs Rent — a calculator https://goncalovf.com/buy-vs-rent-calculator/ Sun, 30 Jan 2022 09:47:00 +0000 https://goncalovf.com/?p=104 Is it Better to Rent or to Buy you home?

Often, I hear that “renting is always bad for your finances because you’re essentially giving money away to the landlord, which could otherwise be used to build home equity.”

For many people, this thinking is wrong. The unintuitive truth is that renting is often cheaper than buying. Or, if it is indeed more expensive, it’s less so than people think.

To clarify the real costs of ownership and renting, and make them comparable, I built the calculators linked below. They are both in Google Sheets so that you can inspect the calculations being made and change them as you see fit. Feel free to share as well!

Both are heavily based on the calculator created by The New York Times.

]]>
ERD of an investment robo-advisor app https://goncalovf.com/erd-robo-advisor/ Tue, 04 May 2021 15:22:00 +0000 https://goncalovf.com/?p=69 I’m a fan of learning-by-doing, so to learn about database design, I built an ERD for a hypothetical investment robo-advising app, like Betterment‘s or Wealthfront‘s.

(click on the image to enlarge it)

Of course, a robo-advising app should be incredibly complex, so this ERD should only cover a small part of its functionality. But in my opinion, it was already a good exercise to think about some design choices. For example:

  • How to logically structure an app into distinct components, which can help to better organize development work.
  • Which attributes should be kept simple (existing explicitly) or derived (calculated through other attributes), and how to make this decision taking into account the importance of performance and of reducing the risk of anomalies.
  • What’s the right balance between normalization and performance.
  • How to design tables for logging/auditing.
  • The difference between 1:1, 1:N, and N:N relationships, and how to represent them.
  • The difference between entities and weak entities.

I built this ERD with draw.io. If you want to extend it, download the source code and import it to draw.io.

]]>
Visualization on how students associate courses when applying to colleges https://goncalovf.com/vis-students-associate-courses/ Thu, 20 Sep 2018 18:38:00 +0000 https://goncalovf.com/?p=62 To promote omeututor.com – a marketplace for 100% online tutoring I founded in 2018 – I created a blog, which included 2 posts with visualizations about college admissions. This is the second post.

In Portugal, when students apply to colleges, they fill in a list of preferred courses and colleges they would like to be enrolled in, in order of preference. For this post, I got each students’ list of preferences for 2017 and quantified how many times each pair of courses were included in the lists. This calculation weighted how close the preferences are to each other. For example, a student’s first and second preferences have a stronger association than the student’s first and fourth preferences.

My goal with this post was to help students discover alternative courses to their preferred ones, which is important because many students can’t get into their preferred course because they didn’t get the required admission grade. Hopefully, knowing how others build their list of preferences could help a student build his own.

In the visualization, the bigger the circle, the more the course is associated with the one selected in the select-box.

The graph is in Portuguese because the business I was promoting was focused on the Portuguese market.

See the code for this graph.

]]>
Visualization of admission-grades to college courses https://goncalovf.com/vis-college-admission-grades/ Sat, 15 Sep 2018 17:11:00 +0000 https://goncalovf.com/?p=57 To promote omeututor.com – a marketplace for 100% online tutoring I founded in 2018 – I created a blog, which included 2 posts with visualizations about college admissions. This is the first post.

In this post, I wanted to help students view the minimum admission grade for different colleges for any particular course.

To use the graph:

  1. Select the courses you want to include.
  2. Select whether you want the previous year’s admission grade (2017) or the average of the previous 3 years (2015-2017).
  3. Place the cursor on top of a grade (circle) to read the information about the college..

Note: only grades for public institutions are included.

The graph is in Portuguese because the business I was promoting was focused on the Portuguese market.

See the code for this graph.

]]>