Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-kind transfer issue #6

Open
blais opened this issue Feb 21, 2021 · 1 comment
Open

In-kind transfer issue #6

blais opened this issue Feb 21, 2021 · 1 comment

Comments

@blais
Copy link
Member

blais commented Feb 21, 2021

@redstreet

I have a case that doesn't produce the desired output: a transfer out of an account, in-kind. This gets categorized as an ASSET_OTHERASSET. I'm not sure I understand the reasoning for why this category cashflows out the cost basis of the other asset. Shouldn't it be outflowing the market value instead?

More generally, in-kind transfers (in or out) don't seem to work correctly for this reason. They only work if both source and target accounts are considered together in a group.


Source:
--------------------------------------------------------------------------------------------
option "operating_currency" "USD"
plugin "beancount.plugins.implicit_prices"

2005-01-01 commodity USD
2005-01-01 commodity HOOL

2000-01-01 open Assets:Brokerage:USD
2000-01-01 open Assets:Brokerage:HOOL "STRICT"
2000-01-01 open Assets:Zero-Sum-Accounts:Transfers "STRICT"

2020-01-01 * "Buy"
  Assets:Brokerage:HOOL 1000 HOOL {1 USD}
  Assets:Brokerage:USD

2020-10-01 price HOOL 1.1 USD

2020-10-02 * "Transfer out, in kind"
  Assets:Brokerage:HOOL   -1000 HOOL {1 USD}
  Assets:Zero-Sum-Accounts:Transfers  1000 HOOL {1 USD}

Config:
--------------------------------------------------------------------------------------------
investments {
  investment {
    currency: "HOOL"
    asset_account: "Assets:Brokerage:HOOL"
    cash_accounts: "Assets:Brokerage:USD"
    dividend_accounts: "Income:Dividends:Brokerage:HOOL"
  }
}
groups {
  group {
    name: "currency.HOOL"
    investment: "Assets:Brokerage:HOOL"
  }
}

Results:
--------------------------------------------------------------------------------------------

Desired (meaningful) output: 12% CAGR

Actual output: 0.00% (since the cashflow is -1000 for the buy, and +1000 for the transfer).

@michelgb
Copy link

michelgb commented Jul 1, 2021

I was testing the same and got issues as well. I also noticed that you add the cost to each leg of the transaction which makes me wonder if in-kind that is a requirement or in-kind transfer will deduce that from the inventory itself (let's say we use FIFO or LIFO).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants