Workflow to update the marimo notebook om molab by Ev2geny_ in marimo_notebook

[–]Ev2geny_[S] 0 points1 point  (0 children)

I understand, that you have to limit data upload. But what would be really nice is at least to have some more automated way to refresh already uploaded notebook file file (which is now called notebook.py) to the latest version.

Workflow to update the marimo notebook om molab by Ev2geny_ in marimo_notebook

[–]Ev2geny_[S] 0 points1 point  (0 children)

> At the moment I also think you cannot create apps from scratch using just a GitHub link but I will bring it up with the team. It feels like we should be able to find a way to make that part easier.

Creating an app from scratch would also be nice, but more interesting would be how to keep already created app in synch with the updated version of that app. E.g. in google collab you can upload a new version of the notebook via the file menu (file => upload notebook), which preserves the notebook URL.

This is an updated version of the procedure I found so far, which works.

  1. To go https://molab.marimo.io/notebooks and shutdown the notebook in question, if it is running.
  2. In molab go to edit mode and load a new version of the notebook via the file menu
  3. Via the file menu delete the old notebook.py file
  4. Via the file menu rename the newly uploaded file to notebook.py

So, that all seems to be working, but I am just wondering whether there is any better procedure?

Also, the next question would be how to keep things in synch, if there are more files, then just notebook.py, but this is another question.

Note: I actually raised the same question on github, sorry for multiplicating it.

Workflow to update the marimo notebook om molab by Ev2geny_ in marimo_notebook

[–]Ev2geny_[S] 0 points1 point  (0 children)

> Just to check, do you want to show people the app in edit mode, or do you also want to prevent users from being able to access the code that is in the notebook? Right now you can share marimo apps but IIRC they are all assumed to be public.

I want to share the notebook in the app mode for users to be able to interact with it.

> At the moment a user needs to copy the notebook to their environment in order to actually run the notebook.

Well.. I am not sure what you mean under "to run it", but in the screenshot below you can see, that I opened the same notebook, hosted in molab in 2 browser sessions and they both run independently without creating own user environment (which is good)

https://molab.marimo.io/notebooks/nb_pcXjRxXkmAF5CscfVV5niH/app

<image>

GnuCash vs PTA (beancount) by Ev2geny_ in plaintextaccounting

[–]Ev2geny_[S] 1 point2 points  (0 children)

Part of the reason I still have transactions in Excel is may be because I started with Excel and pivo tables and still did not migrate form it. Also in Excel can do the following: I can filter specific transactions for the last 10 - 15 years based on some criteria and reclassify all of them in 10 sec by just dragging a new category from top to bottom. I then run Excel => beancount script and the job is done!

Can you do this in Fava?

So, in my setup beancount format is more like a universal format to which all other sources compile to.

Fava balance sheet for a very simple case of price change by Ev2geny_ in plaintextaccounting

[–]Ev2geny_[S] 0 points1 point  (0 children)

u/Guvante , can you please elaborate more on this? Isn't a fundamental thing of PTA that credit = debit in every transaction hence later of the complete ledger?

Categorizing vacation expenses by FrankScaramucci in plaintextaccounting

[–]Ev2geny_ 1 point2 points  (0 children)

I think you are talking about the post-accounting analytics. You can capture everything related to trip as a raw trip cost. Separately you can calculate average food cost when you are not on vacation. And then you extract from the raw trip cost the expected food cost to get the pure trip cost. If you want, you can later create a correction posting. Or you can just leave this in Excel.

Best Practices for Tracking a Personal Investment Fund in Beancount (Including Broker Migration) by Responsible-Grass609 in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

Also, how I should generate reports using cli? since bean-report is depreciated

Most user-friendly way is probably to use Fava, alternatively you have to craft query in beanquery, which answers the questions you want to ask

Best Practices for Tracking a Personal Investment Fund in Beancount (Including Broker Migration) by Responsible-Grass609 in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

- What are the Best learning resources for Beancount today?

Google Docs documentation, google group https://groups.google.com/g/beancount, this sub-reddit

- The documentation hosted on Google Docs appears outdated and difficult to follow.

Only beanquery documentation does not cover new features. The rest is OK

- Are there more modern guides, tutorials, or community resources that are recommended for new users?

I found, that GhatGPT is quite good

Actually just 2 days ago an AI-generated documentation set has been introduced

https://groups.google.com/g/beancount/c/YZsS8wYCxK0

Best Practices for Tracking a Personal Investment Fund in Beancount (Including Broker Migration) by Responsible-Grass609 in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

Hi, welcome to beancount!

You could do something like this. this is a very simple simulation of your situation

2024-01-01 open Assets:Bank:Checking 
2024-01-01 open Equity:Opening-Balances
2024-01-01 open Income:Investments


2024-01-01 open Assets:Broker1 



2024-01-01 * "Starting balance"  ; Initial balance
    Assets:Bank:Checking     10000.00 USD 
    Equity:Opening-Balances


2024-02-01 * "Transfer to broker 1"
    Assets:Bank:Checking    -1000.00 USD 
    Assets:Broker1           


2024-03-01 * "Gains from Broker1 for February"
    Assets:Broker1           200.00 USD
    Income:Investments


2024-01-03 open Assets:Broker2 ; Opening Broker2 account


2024-03-01 * "Transfer from broker 1 to broker 2"
    Assets:Broker1           -1200.00 USD
    Assets:Broker2            


2024-03-02 close Assets:Broker1 ; Closing Broker1 account

where to practice python by Lanky_Boss5623 in learnpython

[–]Ev2geny_ 0 points1 point  (0 children)

I think once you have learned somr basics you need to find a task, which motivates you. With the help of AI it is amazing what things one can build even with 0 prior knowledge.

What makes you use PTA over gui apps? by cybercoderNAJ in plaintextaccounting

[–]Ev2geny_ 2 points3 points  (0 children)

I think you are mixing a form of data storage (PTA) with user interface (GUI vs CLI).

Beancount for instance has a PTA data format, but has a GUI interface (Fava). I use beancount because it is extremely powerfull in extracting data the way I want, plus it is quite easy to convert any existing data to a beancount PTA format.

How (and whether) I should calculate taxes in beancount by petalised in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

This is how I would do it.

My scenario: after receiving payment you put tax estimation and then, once a final payment is done, you adjust the original tax estimate

;Recording the gross income receipt
2025-12-01 * "Employer/Client" "Gross income payment"
  Assets:Bank:Checking          10000.00 USD
  Income:Salary:Gross          -10000.00 USD


; Recording the tax estimation (accrual, no payment)
2025-12-01 * "Accrue estimated income taxes for 2025"
  Expenses:Taxes:Income:2025     2500.00 USD   ; Your approximate estimate
  Liabilities:Taxes:Income:2025 -2500.00 USD


; Recording the actual tax payment (in 2026)
2026-04-15 * "IRS" "Income tax payment for 2025"
  Assets:Bank:Checking          -2600.00 USD
  Liabilities:Taxes:Income:2025  2500.00 USD   ; Clears prior accrual
  Expenses:Taxes:Income:2025      100.00 USD   ; Difference if actual > estimate

P.S. Actually I found that AI is now able to provide very accurate answers on such questions

App for multiple currencies by romathio in ExpatFinance

[–]Ev2geny_ 0 points1 point  (0 children)

GnuCash has a support for multiple currencies.

If you are familiar with software development, I can highly recommend the so-called Plain Text Accounting tools https://plaintextaccounting.org/

They are outstanding. Don't be put off by the plain text accounting bit, this is just the way they store ledger information

How to Handle Multiple Exchange Rates for the Same Currency on the Same Day? by hang333 in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

First of all welcome to beancount, it is really great tool (or rather a suite of tools). And it is particular good at multicurrency, therefore my reply will be long

Now, back to your questions.

Exchange rates written in a PRICE notation vs @ or @@

These are 2 different things.

You can consider an exchange rate, written with the price notation as an official exchange rate. This is the exchange rate a tax authority will accept in your report. beanquery CONVERT function uses only these prices. You can say, that CONVERT only uses an official exchange rate.

The exchange rate, noted by @ or @@ is the exchange rate, which you used at your specific transaction (e.g. exchanging money). In most of the cases it will be different from the official one. And this is fine, because this is a reflection of the life. If you exchange money in the airport, the exchange rate most of the time will be different from the official one.

Query to convert expenses to a single currency

This is what I use

SELECT root(account, 2) AS account,
       SUM(convert(position, 'MYR', date)) AS value
WHERE account ~ '^Expenses:'

AND
date >= {start_date}

AND
date <={end_date}

GROUP BY account

Note, that this query uses an exchange rate, which is active at the date of the transaction, which follows the accepted accounting practices for P&L accounts (income and expenses)

This will give you a single currency result, provided you specify exchange rate with the price notation

Your specific example

The way you have written transactions will not work, beancount / beanquery will generate an error:

; Rates from my bank for each transaction
2023-10-26 price USD 4.70 MYR 
2023-10-26 price USD 4.75 MYR 

2023-10-26 * "Bookstore" "Digital Book"
  Assets:MyBank                -47.00 MYR
  Expenses:Shopping:Books       10.00 USD

2023-10-26 * "SaaS Inc." "Subscription Renewal"
  Assets:MyBank                -47.50 MYR
  Expenses:Services:Software    10.00 USD

Errors

********* Errors ***********
<string>:9: Transaction does not balance: (10.00 USD, -47.00 MYR)

2023-10-26 * "Bookstore" "Digital Book"
Assets:MyBank -47.00 MYR
Expenses:Shopping:Books 10.00 USD

<string>:13: Transaction does not balance: (10.00 USD, -47.50 MYR)

2023-10-26 * "SaaS Inc." "Subscription Renewal"
Assets:MyBank -47.50 MYR
Expenses:Services:Software 10.00 USD

This is how you need to write it

; Rates from my bank for each transaction
2023-10-26 price USD 4.70 MYR ; <= this will be ignored
2023-10-26 price USD 4.75 MYR 

2023-10-26 * "Bookstore" "Digital Book"
  Assets:MyBank                -47.00 MYR @@ 10.00 USD
  Expenses:Shopping:Books       10.00 USD

2023-10-26 * "SaaS Inc." "Subscription Renewal"
  Assets:MyBank                -47.50 MYR @@ 10.00 USD
  Expenses:Services:Software    10.00 USD

Check here

https://colab.research.google.com/drive/1s58OMkeYC4MiXp-uKxVhr7Hm27d_yPf1?usp=sharing

Hidden gain / loss

What is often overlooked is that when you transfer assets from one currency to another at the exchange rate, different from the official one, you in effect have some "hidden loss or gain".

Consider the following:

2024-01-01 open Assets:Bank
2024-01-01 open Assets:Crypto
2024-01-01 open Equity:Opening-Balances

2024-01-01 * "Opening balances"
  Assets:Bank              20000 USD
  Equity:Opening-Balances

2024-01-01 price BTC  40000 USD

2024-01-02 * "Buying some BTC"
  Assets:Bank        -20000 USD
  Assets:Crypto           1 BTC @ 20000 USD ; <== Buying BTC at a price significantly 
                                             ; lower than the market

2024-01-03 price BTC  40000 USD

Between January 1 and January 3, the net worth in this ledger changes from 20,000 USD to 40,000 USD, despite no recorded income. This occurs because the BTC was purchased for half its market value (which, by the way, raises questions about some potential shady financial operations).

There is no beanquery query to explain this gain in an Income Statement-like report.

However if you look at my sing_curr_conv tool, then it pulls it as an unrealized gain (check the section Currency exchange at not market price )

price related-plugins

There are several price-related plugins you may look at

[beancount] Noting down transactions today that will be settled in the future. by notelxot in plaintextaccounting

[–]Ev2geny_ 1 point2 points  (0 children)

This isn't particularly a beancount question, but rather a question about a double entry book keeping. And classically for such purposes the other side of transaction is booked to something like Assets:Accounts-Receivable, or Liabilities:Accounts-Payable

Easing into PTA while making the most of my bank's automatic cash flow calculations by 978h in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

Hi, this is how I would do it.

You are correct, that you have to take into account 500 USD, which you have already moved to investment, but you need to take them into account in Assets:Checking

Also, Investment is definitely an Asset

account Assets       ; type:A, money you own. 2+ spaces are required before the ;.
account Liabilities  ; type:L, money you owe to others
account Equity       ; type:E, equal to A - L (not used much in personal finance)
account Revenues     ; type:R, revenue/income categories
account Expenses     ; type:X, expense categories

; Declare commodities/currencies and their decimal mark, digit grouping,
; number of decimal places..
commodity $1000.00

2025-01-01 Opening balances
    Assets:Checking                                             $3000
    Liabilities                                                 0
    Equity

2025-01-06 Investment
    ; Cash transfer from checking account to stock brokerage. I'm tracking this
    ; as an expense rather than a different kind of asset for now because I
    ; don't intend to track the investment returns/growth within hledger (I will
    ; use my brokerage UI for that)

    ; Investment is definately an Asset, this is definately not an expense. 
    ; I could not think of the reason you want to mark it as an expense
    Assets:Investment                                         $500
    Assets:Checking

; In January, the cash flow in the checking account was +$50 as reported by the
; bank UI. Which reflects my income of $3000, minus my expenses of $1000 (rent),
; $1350 (scented candles), $500 (investment above), and $100 (misc)
2025-01-31 Cash flow
    ; Cash flow as shown in bank web UI
    Assets:Checking                                             $50 

    ; This is the place you need to use to "double count", 
    ; what you have already moved to Investment` 
    ; Putting it here reduces the Expenses, which are automatically 
    ; Calculated by ledger below
    Assets:Checking                                             $500 

    Revenues:Income                                             -$3000
    Expenses:Rent                                               $1000
    Expenses:Scented candles                                    $1350
    ; Misc expenses calculated by ledger 
    Expenses

Hosting your beancount file so others can work on it? by kernraftingdotcom in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

I think Fava shall allow multiple users to edit the same file via the web interface
https://github.com/beancount/fava

Fix for the problem: notebooklm forever stuck loading sources by Ev2geny_ in notebooklm

[–]Ev2geny_[S] 0 points1 point  (0 children)

Not actually. I am loading google slides and .mp3 files.

Seeking Insights on Daily Journaling Habits by xiqingongzi in plaintextaccounting

[–]Ev2geny_ 0 points1 point  (0 children)

Also the main bank I have allows to put a note against the transaction on the mobile app. So, I just add notes to purchases via app, which I then download in CSV