Open
Description
simple.beancount
option "operating_currency" "USD"
plugin "beancount.plugins.check_commodity"
plugin "beancount.plugins.implicit_prices"
2005-01-01 commodity USD
2005-01-01 commodity AAA
2005-01-01 commodity BBB
2019-01-01 open Assets:Investments:Cash USD
2019-01-01 open Income:Investments:Gains USD
2019-01-01 open Assets:Investments:AAA AAA
2019-01-01 open Assets:Investments:BBB BBB
2019-01-01 * "Buy AAA"
Assets:Investments:AAA 100 AAA {100 USD}
Assets:Investments:Cash -10000 USD
2019-01-01 * "Buy BBB"
Assets:Investments:BBB 100 BBB {200 USD}
Assets:Investments:Cash -20000 USD
2020-01-01 * "Sell AAA"
Assets:Investments:AAA -100 AAA {100 USD} @200
Income:Investments:Gains -10000 USD
Assets:Investments:Cash 20000 USD
2020-01-01 * "Sell BBB"
Assets:Investments:BBB -100 BBB {200 USD} @400
Income:Investments:Gains -20000 USD
Assets:Investments:Cash 40000 USD
2019-07-01 price AAA 150 USD
2019-07-01 price BBB 300 USD
After running python beangrow/configure.py -v simple.beancount > conf-simple
we get following conf-simple (everything is as expected)
investments {
investment {
currency: "AAA"
asset_account: "Assets:Investments:AAA"
cash_accounts: "Assets:Investments:Cash"
}
investment {
currency: "BBB"
asset_account: "Assets:Investments:BBB"
cash_accounts: "Assets:Investments:Cash"
}
}
groups {
group {
name: "currency.AAA"
investment: "Assets:Investments:AAA"
}
group {
name: "currency.BBB"
investment: "Assets:Investments:BBB"
}
}
But if we close account AAA (after we sold investment)
option "operating_currency" "USD"
plugin "beancount.plugins.check_commodity"
plugin "beancount.plugins.implicit_prices"
2005-01-01 commodity USD
2005-01-01 commodity AAA
2005-01-01 commodity BBB
2019-01-01 open Assets:Investments:Cash USD
2019-01-01 open Income:Investments:Gains USD
2019-01-01 open Assets:Investments:AAA AAA
2020-01-01 close Assets:Investments:AAA
2019-01-01 open Assets:Investments:BBB BBB
2019-01-01 * "Buy AAA"
Assets:Investments:AAA 100 AAA {100 USD}
Assets:Investments:Cash -10000 USD
2019-01-01 * "Buy BBB"
Assets:Investments:BBB 100 BBB {200 USD}
Assets:Investments:Cash -20000 USD
2020-01-01 * "Sell AAA"
Assets:Investments:AAA -100 AAA {100 USD} @200
Income:Investments:Gains -10000 USD
Assets:Investments:Cash 20000 USD
2020-01-01 * "Sell BBB"
Assets:Investments:BBB -100 BBB {200 USD} @400
Income:Investments:Gains -20000 USD
Assets:Investments:Cash 40000 USD
2019-07-01 price AAA 150 USD
2019-07-01 price BBB 300 USD
after running python beangrow/configure.py -v simple.beancount > conf-simple
we get following conf-simple (account AAA is ignored)
investments {
investment {
currency: "BBB"
asset_account: "Assets:Investments:BBB"
cash_accounts: "Assets:Investments:Cash"
}
}
groups {
group {
name: "currency.BBB"
investment: "Assets:Investments:BBB"
}
}
Metadata
Assignees
Labels
No labels
Activity