option "title" "Test ledger"
option "operating_currency" "CHF"
; plugin "beancount.plugins.unrealized" "UPnL" ; <= switch this on & off and observe the net asset value in fava
2022-01-01 * "STOCK" "BUY 1 @ 100 USD"
Assets:STOCK 1 STOCK {100 USD, 2022-01-01}
Assets:USD
1970-01-01 open Assets:USD USD
1970-01-01 open Assets:STOCK STOCK
1970-01-01 open Income:STOCK:PnL USD
1970-01-01 open Equity:Opening-Balance:USD USD
2022-01-01 price STOCK 100 USD
2022-03-01 price STOCK 108 USD
2022-01-01 price USD 1 CHF