EnglishSvenska

Calculate Personal Financial worth with Python

I wanted to know how much my financial assets are worth across one or more bank accounts, so I created a small python script for it.

I just type all my assets into a list like this:

assets = {
'AAPL': {
'own': 40,
'current_value': yahoo_share('AAPL')
},
'Coca-Cola': {
'own': 35,
'current_value': yahoo_share('KO')
},
'NOF': {
'own': 170,
'current_value': yahoo_share('NOF.OL')
},
'Nordnet Superfonden Sverige': {
'own': 6.4099,
'current_value': morningstar("http://www.morningstar.se/Funds/Quicktake/Overview.aspx?perfid=0P0000J24W")
},
'SEB Japanfond': {
'own': 491.8263,
'current_value': morningstar("http://www.morningstar.se/Funds/Quicktake/Overview.aspx?perfid=0P00000LU7")
},    
}

Then I run the script and get an output looking a bit like this:
Skärmavbild 2015-09-12 kl. 13.40.51

(Not my actual positions 🙂 )

Next step is to program a get rich quick algorithm. Until then the code for calculating assets is published here:
https://github.com/sebnil/Pengar

Tagged with:
Posted in Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

*