Portfolio tracking: Excel spreadsheets

What do you think about opening a dedicated thread for Excel spreadsheets? In our family, we have securities accounts in at least two places, so we track the “overall picture” in Excel.

I could share the online Excel template I use here a bit later, once I’ve cleared some data from it.

What kind of Excel spreadsheets do you have? Could ready-made templates be linked here? :slight_smile:

Do you use Google Sheets (online) or a separate Excel file on your own computer?

Also, if you have ready-made Excel calculators, I’m interested. I can share mine later as well.

13 Likes

A pretty fun idea, but I don’t dare share my own Excel sheet :face_with_monocle:

If I summarize the main points, I follow dividend development, stock purchases and sales according to FIFO, portfolio development vs. OMXHGI, and the total return of stocks (realized sales gains/losses, net dividends, costs).

Of course, it could be expanded to stock-specific analysis, but as long as Inderes continues its quality forecasting, I don’t believe I can do better.

Everything happens in a desktop Excel sheet.

2 Likes

Yeah. The idea of the thread was precisely to share bases WITHOUT data :flexed_biceps:

If this doesn’t get any traction, the whole thread will be deleted :wink:

I’m really interested in this. It would be great if you could share your own calculators or templates here.

2 Likes

I took this as a base a while ago: https://investmentmoats.com/stock-market-commentary/portfolio-management/introducing-our-free-stock-portfolio-tracker-spreadsheet/

Then I modified it for my own needs. Proper real annual return calculation is still missing. However, it can automatically save the portfolio’s total value at the desired timing.

2 Likes

Isn’t it true that nowadays there’s no API to get Helsinki Stock Exchange stock prices and you have to enter them manually?

This is the template I once received in Shareville:

https://docs.google.com/spreadsheets/d/11_-RflqR4CiLywtlbYwvt57MFTCLYcsJuj6mSldGpVs/edit?usp=sharing

Edit: The person marked as the owner of the sheet is not me.

You can browse your own sheets with your Google credentials:

Retrieving course information:

I used to use Google, Kauppalehti, etc., but for example, Google doesn’t have First North data… and KL stopped working. So now I’m using Bloomberg.

For example, this retrieves the course data for QT Group. This also changes the decimal separator from a dot to a comma:

=VALUE(SUBSTITUTE(IMPORTXML(“https://www.bloomberg.com/quote/QTCOM:FH";“//span[@class=‘priceText__1853e8a5’]”);“.”;",”))

If you don’t need the dot-comma conversion, it would apparently go like this:

=VALUE(IMPORTXML(“https://www.bloomberg.com/quote/QTCOM:FH";"//span[@class=‘priceText__1853e8a5’]”); )

I have modified the above sheet a bit further…

10 Likes

I’ve sometimes collected monthly economic data in sheets. The columns describe assets, loans, or cash, and each row represents one month. The cells then record the value of the asset at the end of the month. I may have also recorded more detailed information about individual investments on separate pages: how much was paid for the investment, whether the investment generated dividends, or whether interest had to be paid on a loan, etc. I have determined the value of the apartment based on Statistics Finland’s house price index.

However, this only tracks the value and weightings of assets and holdings. Perhaps dividends and interest could also be tracked in a similar way. But I would also like broader data:

  • Asset/portfolio score.
    • From which one can easily derive the annual return.
    • Leverage (well, it wouldn’t be impossible to calculate even with the current method).
    • Total yield of investments or some kind of presented dividend yield.
    • Higher resolution, for example, a daily score.

Sometimes I tried to implement these using Excel / Sheets pivot tables, but things quickly get quite complicated. It might work, but it’s not very maintainable if you wanted to make some changes. Or maybe I’m just not an Excel wizard enough! If all assets could be imported into Nordnet, I would be very happy :smiley:.

One option could be to code some system for this myself, but so far I’ve found it’s not worth the effort. Then I could, for example, do an Excel import from Nordnet and have the ability to enter off-market asset classes (bank loans, apartment) and their scores. I have also tried to find some portfolio tracker online, but they usually don’t allow you to enter your own asset classes.

In practice, I’ve given up on the matter a bit and settled for tracking gross and net wealth, expenses, and costs infrequently, and my stock portfolio more closely. The idea of having nearly 100% visibility into my entire finances would definitely intrigue me, but on the other hand, there’s little benefit from, say, monthly resolution with mortgage interest.

In addition to wealth tracking, I also create a budget and cash flow forecast for my operating expenses for about a year ahead. I might not bother otherwise, but my income and expenses are quite cyclical for many reasons (though reasonably predictable), so it’s good to know in advance when to liquidate assets and when I can invest slightly ahead of schedule in the stock market with credit. As one example, I leverage my finances by paying income taxes at a low tax rate and then take the hit for back taxes at the end of each year.

2 Likes

Investment blogger P.Ohatta has automated his financial tracking with MS PowerBI. PowerBI could actually be an excellent tool for the kind of tracking I envisioned.

3 Likes

Bloomberg stock price lookup in Google Sheets seems to have been glitching yesterday and doesn’t seem to be working today either. Does anyone know more?

For example, the Hoivatilat script:

=VALUE(SUBSTITUTE(IMPORTXML(“https://www.bloomberg.com/quote/HOIVA:FH";“//span[@class=‘priceText__1853e8a5’]”);“.”;",”))

The source code on Bloomberg seems to be unchanged; at least the “price information” is still found there with the identifier

priceText__1853e8a5

view-source:https://www.bloomberg.com/quote/HOIVA:FH

You have the wrong quotation marks around price “priceText__1853e8a5”. It should be ’ and not ’

E: Or at least if they are changed, it works for me in the UK and Finland sheets
E2: uh, Inderes changes the quotation marks.

It should be the character with code U+0027. Now it is U+2019. U+0027 is what comes from the keyboard next to enter.

1 Like

It feels like Bloomberg has put a lock on it.
If I copy the script to the clipboard and paste it into a new sheet, it works for a moment and then rejects it.
Google Finance works perfectly fine in the same sheet.
I need to find a new route to fetch First North data.
If anyone knows a working script for First North, I would be
immensely grateful.

1 Like

I’d like the same myself. For some reason, Remedy still works for me via Bloomberg, but others don’t.

With Google’s script, I was able to fetch QT Group, Harvia, Talenom, Hoivatilat, Kamux, among others. This is used in the spreadsheet I linked earlier.

=IF(E12 = “£”; GOOGLEFINANCE(CONCATENATE(“LON:”; B12); “price”)/100; IF(C12 = “FR”; GOOGLEFINANCE(CONCATENATE(“EPA:”; B12); “price”); IF(C12 = “NL”; GOOGLEFINANCE(CONCATENATE(“AMS:”; B12); “price”); GOOGLEFINANCE(B12; “price”))))

Efecte (Efecte) doesn’t work for some reason on Bloomberg now, and it’s not included in Google Finance either.

I haven’t used Yahoo’s script, and it apparently doesn’t work now?

=SUBSTITUTE(importdata(“Ihre Datenschutzeinstellungen”)

Edit: Well, of those, only Efecte (Efecte) and Remedy (Remedy) are in FN anymore… indeed, for some reason Remedy (Remedy) works but others don’t… heh

Edit2: I don’t know how long the First North search will work, but when I re-entered the Bloomberg script for Efecte (Efecte) into Google Sheets, it started working…

All main list stocks work for me with Google Finance.
FirstNord doesn’t work at all anymore. It still worked occasionally yesterday.
What ticker do you use to search for, e.g., Qt? CPH:QTCOM works for me.

Just QTCOM.
Alternatively, HEL:QTCOM might also work with Google.

Edit: Now Bloomberg is again having issues with Remedy, but it managed to fetch Efecte’s data… There’s something buggy with this First North.

Edit2: As soon as Remedy’s data was found on Bloomberg, Efecte’s data immediately disappeared… I wonder if there’s some “1 data fetch at a time” restriction that’s been implemented… or what in the world is going on.

Finding FirstNord stock prices is getting difficult. I haven’t been able to find their prices anywhere else besides Bloomberg, and now not even there. Yahoo seems to have cut the connection last year.

I got it to work temporarily by rewriting the script and pressing enter… for example, by deleting one character + enter + editing it back + enter… so a temporary solution until we figure out something better for First North.

Automated data processing.

At least from Nordnet’s website, even those of us who are not Nordnet customers get really comprehensive course information (over 13,000 shares, including First North).

I don’t know Excel very well, but if curl (https://curl.haxx.se/) works in Windows, I would think you could get the information into Excel somehow.

For example, on the Linux command line:

curl -s Nokia (NOKIA) osake | Nordnet |grep -Pom1 ‘last\K[^,]+’ |tr -dc ‘0-9.+’

gives the Nokia course.

Instead of that grep part, there are probably some filtering features in Excel as well.

That number starting with 16 and the name also have to be retrieved from Nordnet, assuming it’s their created number series.

The problem is that searching for some illiquid paper (even Piippo; identifier 16360024-piippo) gives the value “0” with a similar command; which can also be seen in the browser at Piippo (PIIPPO) osake | Nordnet

p.s. Grep gurus are welcome to tease me about the funny structure…

I need a script that fetches FirstNord stock prices into a Google Sheets spreadsheet. I’m completely clueless about IT, so a ready-made script would be great.

2 Likes