On Sat, May 01, 2021 at 02:32:19AM -0700, [email protected] wrote:
> Hey,
> 
> I'm in a case where I create a new ledger file for every financial year. 
> This works great because the file is clear and clean and, you know what you 
> are working with.
> 
> For the normal financial accounts creating opening balances is fine, but 
> I'm wondering how can I create "opening positions" for commodities I 
> bought/sold in the previous year?
> 
> Obviously I can just create an opening balance for the commodity itself, 
> but it's not clear if there is a way to specify which of that balance was 
> bought at which prices. This puts me in the position where in the next 
> year, I sell a foreign currency, but I'm unable to get an accurate PnL 
> because it doesn't have the positions at which it was purchased in the 
> first place.
> 
> Is there a way to specify opening positions somehow?

I think this should do what you want. Someone please let me know if
this is a bad idea.

2020-01-01 * "Opening balances"
  Assets:Brokerage:ACME  10 ACME {10.00 USD, 2015-01-01}
  Assets:Brokerage:ACME  10 ACME {15.00 USD, 2015-02-01}
  Assets:Brokerage:ACME  10 ACME {14.00 USD, 2015-03-01}
  Equity:Balances

-- 
James

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20210501171927.utzflgswjgrfkzyz%40moth.falsifian.org.

Reply via email to