You need to define commodities for everything you're using beangrow for, in
your case I imagine this is RDFN and SQ. You don't need to define the
metadata in your bullet item 3.

On Sun, Sep 12, 2021, 8:40 PM Bman Q <mplo...@gmail.com> wrote:

> Guys hi
>
> First of all i want to thank Martin for superb work! I have been using
> beancount for 2 years and flexibility / functionality beancount provides
> are simply amazing. I always recommend beancount on plain text accounting
> sub and now have 1 extra reason to suggest it :)
>
> Secondly i have several questions / issues with installation and will
> appreciate your help:
> 1. should i use "v2 master + beangrow repo" OR "beancount 2.3.3" ?
>
> 2. when i run configure.py, it generates empty file, what can be the
> reason for this?
> i run:
> "python scripts/configure.py -v b.beancount > conf-returns"
> screen output:
> INFO    : Reading ledger: b.beancount
> INFO    : Inferring configuration.
> INFO    : Done.
> but file is empty
>
> My accounts structure seems fine:
> Assets:Business:...
> Assets:Cash
> Assets:Investing:CSchwab:Cash                      USD
> Income:Investing:CSchwab:Interest                 USD
> Income:Investing:CSchwab:Gains                    USD
> Income:Investing:CSchwab:MiscCredits         USD
> Expenses:Investing:CSchwab:Fees                  USD
> Assets:Investing:CSchwab:RDFN                     RDFN
> Assets:Investing:CSchwab:SQ                          SQ
> ...
> Assets:Personal:...
>
> (i never received dividends so don't have accounts for them yet)
>
> 3. Do i understand it right that the only change we need to do in main
> beancount file is add signature handlers?
> Basically
> 2019-09-03 * "Buy; REDFIN CORP 00500"
>   Assets:Investing:CSchwab:RDFN                     326 RDFN {15.55 USD,
> 2019-09-03}
>   Expenses:Investing:CSchwab:Fees                  4.95 USD
>   Assets:Investing:CSchwab:Cash                -5074.25 USD
>
> will become
> 2019-09-03 * "Buy; REDFIN CORP 00500"
>   Assets:Investing:CSchwab:RDFN                     326 RDFN {15.55 USD,
> 2019-09-03}
>      flow: ASSET
>   Expenses:Investing:CSchwab:Fees                  4.95 USD
>      flow: EXPENSES
>   Assets:Investing:CSchwab:Cash                -5074.25 USD
>       flow: CASH
>
> 4. I tried creating simple config file myself
> investments {
>   # Accounts at Schwab.
>   investment {
>     currency: "RDFN"
>     asset_account: "Assets:Investing:CSchwab:RDFN"
>     cash_accounts: "Assets:Investing:CSchwab:Cash"
>   }
>   investment {
>     currency: "SQ"
>     asset_account: "Assets:Investing:CSchwab:SQ"
>     cash_accounts: "Assets:Investing:CSchwab:Cash"
>   }
> }
>
> groups {
>   group {
>     name: "stocks"
>     investment: "Assets:Investing:CSchwab:RDFN"
>     investment: "Assets:Investing:CSchwab:SQ"
>   }
>   group {
>     name: "all"
>     investment: "Assets:Investing:*"
>     currency: "USD"
>   }
> }
>
> but it resulted in error:
> (using beancount master and beangrow repo)
> python beangrow/compute_returns.py b.beancount conf-returns out
> R:\b\b-office>python beangrow/compute_returns.py b.beancount conf-returns
> out
> Traceback (most recent call last):
>   File "beangrow/compute_returns.py", line 105, in <module>
>     main()
>   File "beangrow/compute_returns.py", line 80, in main
>     account_data_map = investments.extract(
>   File "R:\b\b-office\beangrow\investments.py", line 553, in extract
>     account_data = [process_account_entries(pruned_entries,
> config.investments, aconfig,
>   File "R:\b\b-office\beangrow\investments.py", line 553, in <listcomp>
>     account_data = [process_account_entries(pruned_entries,
> config.investments, aconfig,
>   File "R:\b\b-office\beangrow\investments.py", line 399, in
> process_account_entries
>     comm = commodity_map[currency] if currency else None
> KeyError: 'RDFN'
>
> (using beancount 2.3.2)
> R:\b\b-office>python returns/compute_returns.py b.beancount conf-returns
> out
> Traceback (most recent call last):
>   File "returns/compute_returns.py", line 97, in <module>
>     main()
>   File "returns/compute_returns.py", line 73, in main
>     config = configlib.read_config(args.config, args.filter_reports,
> accounts)
>   File "R:\b\b-office\returns\config.py", line 44, in read_config
>     text_format.Merge(infile.read(), config)
>   File
> "C:\Users\Btycoon\AppData\Local\Programs\Python\Python38\lib\site-packages\google\protobuf\text_format.py",
> line 696, in Merge
>     return MergeLines(
>   File
> "C:\Users\Btycoon\AppData\Local\Programs\Python\Python38\lib\site-packages\google\protobuf\text_format.py",
> line 770, in MergeLines
>     return parser.MergeLines(lines, message)
>   File
> "C:\Users\Btycoon\AppData\Local\Programs\Python\Python38\lib\site-packages\google\protobuf\text_format.py",
> line 795, in MergeLines
>     self._ParseOrMerge(lines, message)
>   File
> "C:\Users\Btycoon\AppData\Local\Programs\Python\Python38\lib\site-packages\google\protobuf\text_format.py",
> line 817, in _ParseOrMerge
>     self._MergeField(tokenizer, message)
>   File
> "C:\Users\Btycoon\AppData\Local\Programs\Python\Python38\lib\site-packages\google\protobuf\text_format.py",
> line 907, in _MergeField
>     raise tokenizer.ParseErrorPreviousToken(
> google.protobuf.text_format.ParseError: 15:1 : Message type
> "beancount.returns.Config" has no field named "groups".
>
> 5. Could someone please share sample beancount and returns config files?
> On Saturday, February 20, 2021 at 9:13:59 PM UTC-5 bl...@furius.ca wrote:
>
>> Move to https://github.com/beancount/beangrow/issues/6
>>
>>
>> On Mon, Dec 28, 2020 at 6:44 AM redst...@gmail.com <redst...@gmail.com>
>> wrote:
>>
>>> 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).
>>>
>>>
>>>
>>>
>>> --
>>> 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 beancount+...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/fdb4dad4-1d92-4f7b-92e0-26e3732e7603n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/fdb4dad4-1d92-4f7b-92e0-26e3732e7603n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Beancount" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beancount/OJBIGFvbBC8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/50e30e64-b537-4fc3-8654-75a2fa3945c2n%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/50e30e64-b537-4fc3-8654-75a2fa3945c2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAO0DHEA-MY-pSxVs7ophD%2Bk1E-8rRYksbVqx2VnY%3DzryWyoY-w%40mail.gmail.com.

Reply via email to