Beancount advancement Thread

you are right, the whole beancount project became totally unmustacian already from the time i invested. if you are not a UNIX pro, the pain is huge :face_vomiting:
however there are some rewarding moments…

I so want to try it just to be able to remake it. It doesn’t seem that complex to me. It has some good plugin architecture probably and many people contributed to essential plugins. The basics, though, seems to be a tool where you can create a list of categories and then use them to categorize your stuff.

Well guys, the problem is that you start “big” with not too much knowledge… like me :wink:
Now, some time later I don’t use importers or complicate things.
I spent hours, days! trying to configure importers, exporters, accounts, etc… and I stopped.
I did by hand… You have 1000 lines to import? You can do 100 per week? In 10 weeks is done. You are not in a hurry since you stay putting new movements in the files.

I used a simple system:

  1. Export all to CSV
  2. Pass all to a spreadsheet.
  3. Figure out how to put all in columns like: 2019-11-21 * “Payee” “Literature” ++++ Assets:Account ##### 21 CHF …
  4. Copy and paste everything in VSCode
  5. Use the magnifico, beautiful, top tool that put the cursor in every “++++” or “####” you find in the text and I do: “Enter”.
  6. The magic comes, because when you find ++++ means that you have to do another line, you can erase all the ++++ in one shot…etc.

I did like that 1000, 2000 lines from UBS or IB in one hour. Don’t spend time with importers, there is nothing completely plug-and-play

1 Like

Well… I don’t have time to do a video or explain better… Hope with that is enough.

  1. You’ll get from the bank the lines 3 and 4 in a CSV file
  2. You import this file in Excel or whatever spreadsheet and find out how to finish your data like in the line 7
  3. You copy the text from Excel to VS as you see in line 7
  4. You select whatever token you used in line 7… in my example “#####” and in mac, press Command+F2 or “Change All Occurrences” All the “#####” will become blue and thousand of cursors will be in your text.
  5. You put the cursor in the first ##### and press Enter + TAB and Erase the ##### token used to have the line 11. Later you do the same with the token ***** and make the line 12.
1 Like

simply beautiful. and with abit of excel skill, this is quite scalable. thanks for the hint! i got lost in all that parser stuff.

here is my current (randomized data…) IB-to-beancount import excel sheet.
So far it features stocks and Forex transactions, Dividends and Witholding Tax.
It’s by no means a clean solution and requires adjustments to the labeling of your bean accounts, but if you spend 10 minutes on how the strings are gnerated, you will quickly be able to adjust it to your need.

the manual, just after @Tino’s guide above:

  1. get the default activity statement from IB of the time u like like annual or year to date in CSV format

    2.open with excel or a text editor, find the sections with “Trades”, “Dividends” and “witholding Tax” in the first column. copy paste to the accorting place in my Excel sheet. Dividends and Witholdong taxes go side-by-side, not after each other. replace my random data, it is there to have a working example.
  2. adjust the account namings to your conventions (one-time effort)
  3. copy the column BT (“VSCODE sttings”) to your ledger
    image
  4. search & replace the ***** tags by newline

bean-check your document :slight_smile:

1 Like

Thanks for sharing @nugget ,
Is like you explain that I did. Your method is much more elaborated :wink: Congratulations! You are becoming an expert!
Sometimes is painful all this imports but once everything is in place, writing down each movement in your finances is really quick and easy.

Since I’m doing I discovered several fees and expenses that I wasn’t aware. Also I found some patterns in my expenses that helped me to control them.

In case it helps others, especially those familiar with Docker, I created a docker container which includes Beancount, Fava, the Beancount smart importer and an “amortize_over” plugin. You can then run the whole shebang really easily without having to install everything.

I run this using Docker Compose, with something like this:

version: '3.7'

services:
  fava:
    image: alexiri/fava:latest
    ports:
      - "5000:80"
    volumes:
      - /mnt/kube/fava:/data
    environment:
      BEANCOUNT_INPUT_FILE: "/data/main.beancount"
    restart: unless-stopped

  prices_fava:
    image: alexiri/fava:latest
    volumes:
      - /mnt/kube/fava:/data
    entrypoint: /bin/sh
    command:
      - '-c'
      - '/usr/local/bin/bean-price -i /data/main.beancount 2>/dev/null | sort >> /data/generated/prices.beancount'
    restart: 'no'

The fava container is always running, and prices_fava is run once a day to update my prices.beancount file. I also have importers for Revolut, UBS and a few other foreign banks, but the code would need to be cleaned up before I can share it.

4 Likes

this is incredibly awesome :heart_eyes:
if i got the concept of docker correct, we should be able to have all the common addons (Postfinance, IB, DKB, whatever) and thus have a platform where beancount just works?

Yes, that’s certainly possible. What I have now has all the beancount files and importers outside of the container, but I suppose it would be possible to ship the importers as part of the container as well.

I made importers for Cashback Swisscard, Cumulus Creditcard and Raiffeisenbank. They work for me. One thing that is not fixed yet is that Umlaute are not encoded correctly into the .beancount file

2 Likes

Hey guys, I was doing a little research to find a simple tool to track my net worth and found nothing. All the big players like Personal Capital, YNAB & Mint are targeted at US market and automatically draw transactions from your accounts using your logins (no thanks).

Then there is GNUCash, but it seems like an overkill to what I want to achieve, and I saw people tried it and then dumped it. Is Beancount really the best alternative here? I don’t really want to hack too much, I just want to have a wealth curve and maybe track the total turnover: income vs expenses.

In my research I found some Google Sheets based tools, like Tiller, but it is not very popular, and it is also quite expensive. Most of these tools charge you like $10 per month, which I find a lot for the added value. I think it would make sense to have a tool that uses a Spreadsheet as source of data, because you can easily modify it.

My expectations for the net worth tracker would be:

  • ability to manually input my transactions & bulk import with CSV (I hold CSV extracts from my old bank accounts)
  • ability to match internal money transfers (i.e. I send CHF from my money account to my broker account, then the tool converts it into a single transaction, which does not affect the turnover)
  • automatic tracking of securities: VT, VWRL, BTC, ETH etc.
  • easy to use, good looking

I guess doubly entry bookkeeping provides needed depth, so it’s worth to use it, but when I read up on it, it seemed not so straightforward. You have to learn what goes into Db and what into Cr, and I would have to manually process all transactions.

For a long time I thought I won’t bother to calculate my net worth, but at this point I have a bank account, two brokers, some cryptos, credit card & revolut, and it’s hard to keep track of it.

I was thinking the same and also thought on building my own tool. It has to generate an output readable from fava to avoid building all the eye candy stuff, at least at the beginning. Once you have that, you can easily build tools to rewrite csv in a manageable form (json in my case) and everything should be easier. The google sheet export tool is also on my list.
For now I’ve done a simple telegram bot that reads my configuration and create a series of questions to create a possible CSV line or a beancount/whatever entry. I just didn’t do the last part because I"m not sure what to do. probably a local storage that can be downloaded later.

I tested about a dozen apps, also the ones that you have mentioned. None of them did exactly what I wanted unless you paid for it. Then I started doing my own google sheets formula to enter each expense manually and make some charts until I discovered beancount through this forum. I think combined with fava it just offers all the tools that I want and there is even some budgeting option that I haven’t explored yet. Doing importers for .csv files or spreadsheets is quite straightforward, PDF files were quite annoying…Atm I plan to make a google spreadsheet for manual entries through my iPhone that will then translate into a beancount file.

1 Like

Hi Bojack,

I’ve been using Beancount and Porfolio Performance in parallel for some months now.
Since I’m used to work with plain files, git, etc… beancount is nice but need learning and sometimes is frustrating. In my case because the accounting understanding or terms, not the program itself :wink:

Portfolio Performance is more for stocks, crypto, ETF, gold, etc… Is the best program I found and it’s free! I tried to help them with some money but they are not collecting money right now.

Porfolio Perfomance has a big problem for me that the 90% of support or documentation is in German but I thing lot of you speak well German so won’t be a problem. The main interface is also in English.

I’m happy with both and using in parallel help me to maintain consistency my personal economy :wink:

If Gnucash is overkill to you, better keep off beancount :smiley:
I liked it, but now that i see how much better curencies work with beancount, i dont want to go back. however, i still hardly understand anything that beancount provides :see_no_evil::see_no_evil:

I saw both now (and before my excel-sheets / google sheets).
double-entry bookkeeping allows you to be much more robust & find possible mistakes. also, all money is really accounted for, which my old excel-sheets could not provide. Gnucash of course works fine in this regard.

Tracking your securities: easy in google sheets, less in excel. Gnucash has some third-party plugin (that i never managed to be productive, but that might not be the creator’s fault. Beancount excels here, as long as your security is listed with yahoo. i have not found other sources for beancount so fat (google quit a while ago).

1 Like

I am just using google sheets with google forms for input for my expenses. And another google sheets for tracking my networth using the googlefinance tool.

Works pretty well for me since I am just doing some simple graphs… Also handling different currencies is easy (which most programs do not provide).

Of course far away from double accounting, all depends what you want…

So I installed Beancount with Fava. It was a PITA, because I own a MacBook, and macOS is kinda like Linux, but stuff is missing. So, if anybody finds themselves in a similar situation:

  1. install xcode command line tools
  2. install homebrew
  3. install python 3
  4. install fava (it will install beancount too)
  5. add Python bin folder to environment path, otherwise you won’t be able to start fava from anywhere

So these points above is exactly what I was trying to avoid. I hate this Linux dependency tweaking stuff, I feel too old for this :stuck_out_tongue: . But after I’ve done it, and generated the example beancount file, I can enjoy the nice web GUI. Right now I am reading the documentation of Beancount on double entry bookkeeping, to understand how I need to enter this stuff.

I gotta say, it’s a lot of initial effort, but once done, you have really nice overview of where your money goes, which will hopefully ease my anxiety regarding my financial overview. Right now it’s a mess.

1 Like

You should try docker

come again? I heard about Docker, saw the whale icon somewhere, but don’t know exactly how it works. Care to shed some light?

Btw: I managed to copy paste my PostFinance transactions to Excel, then reformatted them to Beancount format. It’s not so straightforward. Are there any import/convert tools that you guys know? I guess I could save to CSV format more easily using Excel.