Investing
For the past few years, I’ve been getting into investing. Modern banking apps make it reasonably easy to get started. In the Baltics, if you have an account with Revolut or Swedbank, you can already invest in publicly traded companies. A good starting point is investing in companies who’s news you already follow for one reason or another. This way, information wise, you’re already ahead of some shmucs who just follows the big trend.
Problem
In spite of this, I’ve allowed my own portfolio to grow so diverse and unfocused that I only can keep up to date with a couple of favourites. The other positions are just flashy numbers that the banking app throws at me and every other finance serf with a modern app.
Pretty, Pretty, Shiny, Shiny.

Goal
I want to make my own shiny numbers.
And so I had a need for something :
A tool takes a list of symbols I’ve invested in and plots relevant company data onto a excel sheet. Inside Excel, I can play around, come up with functions - or find them in some nerdy investment book - and see if it speaks to me.
If it does, I can add it to my tool.
Plan 0.1
So what’s the stack? I don’t know yet, and honestly It doesn’t matter. Golang has been giving me noughty winks for a while now, so I’ll go with that one, and learn as I go (double pun not intended). So let’s break the tool down :
- I wish to get a list of stock symbols that I’m currently invested in
- Get some data about the stocks company : Stock price, Yearly Income etc.
- Plot this data into excel
Let’s make something
Revolut has a well-documented API but sadly endpoints about investments are yet to be seen.
Fine. For now Let’s add symbols by hand via CLI arguments.
I can’t take the same approach when it comes to company data, but luckuly there’s a some services that - on a very tight leash - let play around for free. Just to get the ball rolling, I picked the first one on the search results : Financial Modeling prep
Their docs are detailed and the endpoints are RESTful so they seem make sense - good enough to start with and replace with something more sustainable later.
Finnaly, a GO library for writing and reading from Excel :
https://github.com/qax-os/excelize
A pinch of math
The first shiny thing I wanted was the company’s P/E ration.
I think of it like the companies hype value - the ratio of what people are willing to pay for a company compared to what it actually earned that year.
Let’s break it down :
$$ \text{P/E ratio} = \frac{\text{Price per Share}}{\text{Earnings per Share}}$$
EPS is Net income divided by the number of public shares. (Or all possible shares if were including dilution, in which case it’s diluted EPS)
$$ EPS = \frac{\text{Net income}}{\text{Shares outstanding}}$$
Current results
I now have a tool that:
- Takes my portfolio symbols
- Fetches their financials
- Plots them down in excel
- Calculates P/E ratio for current and previous year, then compares them

Enough to play around with - and a solid base to build on as more ideas come!
Repo : https://github.com/Ziedins/financialReport
Next updates
- Look if company financials can be sourced somewhere for free (current provider only allows a very limited list of symbols).
- GRAPHS (add one)
- Store historical financials - introduce a DB?