Re: Totals for a specific commodity

2024-02-24 Thread Martin Blais
Just SELECT sum(position) WHERE currency = 'BTC'?

On Sat, Feb 24, 2024 at 2:46 PM CDT  wrote:

> I have some commodities (lets just use BTC as an example) spread out over
> many different accounts.
>
> Is there a command to get a grand total on a specific commodity (like BTC)
> regardless of the account hierarchy?
>
> I couldn't find anything on this.
>
> --
> 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/9b8133d0-e942-44cd-bc80-db773878aa9en%40googlegroups.com
> 
> .
>

-- 
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/CAK21%2BhP3i9tNzyKpdqMRwtCaxSReBsYXQvUFs-718ZcHizmGGg%40mail.gmail.com.


Totals for a specific commodity

2024-02-24 Thread CDT
I have some commodities (lets just use BTC as an example) spread out over 
many different accounts.

Is there a command to get a grand total on a specific commodity (like BTC) 
regardless of the account hierarchy?

I couldn't find anything on this.

-- 
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/9b8133d0-e942-44cd-bc80-db773878aa9en%40googlegroups.com.


Re: Seeking beta-testers/devs for crypto tax tools

2024-02-24 Thread CDT
I'm relatively new to Python scripting and have been hand entering things 
while I'm learning, but this looks very interesting considering the volume 
of transactions that can occur with cryptos when the bull market heats up.

How do I install this?  (I'm using Windows 11 but I can use pip on command 
line)

On Saturday, February 17, 2024 at 6:23:37 PM UTC-5 erical...@gmail.com 
wrote:

> It's 2024, so, time to dust off Magicbeans and prepare 2023 taxes -- hope 
> folks don't mind me bumping this thread.  If anyone else is interested in 
> using Beancount to track crypto transactions, take a look below and if 
> you're willing to beta-test and help develop, feel free to reach out to me.
>
> best,
> eric
>
> On Wed, Nov 1, 2023 at 3:49 AM Chary Chary  wrote:
>
>> Ok,
>>
>> thanks for clarification
>>
>> On Tuesday, October 31, 2023 at 5:30:39 PM UTC+1 erical...@gmail.com 
>> wrote:
>>
>>> No worries.  I suspect that a lot of crypto traders/investors fall into 
>>> these categories:
>>>
>>> - Casual users who make minimal trades on one or two exchanges.  These 
>>> are probably adequately served by existing commercial offerings like 
>>> cointracker.io etc.
>>> - Professional traders who already have some other professional 
>>> commercial trade recording/reporting software.
>>>
>>> For people in between, who are doing something more complex (multiple 
>>> exchanges, offline wallets, mining income, large numbers of transactions or 
>>> lots) but are not professional traders, I suspect that probably most tax 
>>> returns are full of errors that neither the filers nor the IRS are readily 
>>> able to untangle.  If the amounts are low, then it's not worth either of 
>>> their time.  If the amounts are large, I am not sure.  I talked to a tax 
>>> preparer, asking how one would verify the numbers, and he said that 
>>> probably you'd have to engage a mid-to-large accounting firm and hand them 
>>> your raw data -- not sure how they would analyze it.  He also said that 
>>> with the IRS it would probably be a bit hit and miss how an auditor would 
>>> handle or analyze it -- they probably wouldn't be reading one's Python 
>>> code, no :)
>>>
>>> My goal with Magicbeans was to generate PDF reports which lay out the 
>>> lots in both inventories and transactions such that one could actually 
>>> manually match everything up, even if it would be tedious.  The goal was to 
>>> be able to walk into an IRS office with that report and be able to justify 
>>> the cap gains/losses of any sale someone questions.
>>>
>>> On Thu, Oct 26, 2023 at 1:11 PM Chary Chary  wrote:
>>>
 I know this is an offtopic, but I am just wondering: if it takes that 
 much efforts plus python programming skills to file a tax return, then:


- How do other people (mortals) do it?
- How on the earth someone is able to verify it? One can't imagine 
a tax officer debugging a Python code?


 On Thursday, October 26, 2023 at 8:57:27 PM UTC+2 erical...@gmail.com 
 wrote:

> I recently filed my 2022 tax return using Magicbeans 
>  to do detailed lot 
> tracking and capital gains/losses reporting for my crypto assets.  
> Magicbeans is a set of tools (importers and report generation tools) 
> built 
> around Beancount.  I wrote it because I was not satisfied with the 
> accuracy 
> or transparency of existing commercial services for crypto tax reporting.
>
> Although I was confident enough in the numbers to file my return, I am 
> equally confident there's a lot of latent issues in the software.  I am 
> looking for folks who (1) are interested in better tools for crypto 
> transaction tracking, (2) are willing to beta-test and debug some rough 
> software, and (3) are skilled enough devs (Python) to also contribute 
> fixes.
>
> Hope to hear from someone out there... :)
>
> --eric
>
 -- 
 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/bf16b50b-efe9-463a-a176-ce53960ef347n%40googlegroups.com
  
 
 .

>>> -- 
>> 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/075e009b-e7f6-4120-a602-21a8f3d2c431n%40googlegroups.com
>>  
>> 

Re: How to transfer commodities between currencies?

2024-02-24 Thread Matt McCormick
Yeah I think what helped was to just take one step at a time.  I was trying 
to combine multiple steps together which ended up in confusion.  When 
separating out the steps and doing one thing at a time I can think more 
clearly about what I want to accomplish even though it does result in more 
transactions than I would like.

On Tuesday 20 February 2024 at 19:54:59 UTC Red S wrote:

> I'd suggest first figuring out what you want in this case, in terms of 
> realizing gains vs not. In general (with some exceptions), most users want 
> their journal to reflect their tax authority's views of the transaction. Of 
> course, if you have multiple tax authorities who each view it differently, 
> it gets complicated.
>
> Making Beancount reflect either a realization or transferring the original 
> cost basis are both possible and reasonably easy.
>
> On Monday, February 19, 2024 at 11:05:29 PM UTC-8 matt...@gmail.com wrote:
>
> Thanks this is helpful.  I guess I was thinking that the gains would not 
> be realized until the commodity was sold.  But I supposed it at least makes 
> it easier to realize the gains when exchanging.  I was trying to think of a 
> way to transfer the original cost basis, with it being converted somehow.
>
> On Monday 19 February 2024 at 14:24:32 UTC bl...@furius.ca wrote:
>
> It helps to think of it as all the steps that would be taken by your 
> broker.
> Say on a transfer you realize the gains:
>
> plugin "beancount.plugins.auto"
>
> 2024-01-01 * "Add cash"
>   Income:Misc
>   Assets:CA:Brokerage:USAccount:Cash   1000.00 USD
>
> 2024-01-01 * "Buy BMO in US"
>   Assets:CA:Brokerage:USAccount:BMO   2 BMO {90.00 USD}
>   Assets:CA:Brokerage:USAccount:Cash
>
>
> 2024-02-18 * "Sell BMO, realized gain"
>   Assets:CA:Brokerage:USAccount:BMO  -2 BMO {90.00 USD} @ 94.19 USD
>   Assets:CA:Brokerage:USAccount:Cash   2*94.19 USD
>   Income:CA:Brokerage:USAccount:PnL
>
> 2024-02-18 * "Transfer cash equivalent"
>   Assets:CA:Brokerage:USAccount:Cash -2*94.19 USD
>   Assets:CA:Brokerage:CanadianAccount:Cash   2*127.03 CAD @ USD
>
> 2024-02-18 * "Sell BMO, realized gain"
>   Assets:CA:Brokerage:CanadianAccount:Cash  -2*127.03 CAD
>   Assets:CA:Brokerage:CanadianAccount:BMO   +2 BMO {127.03 CAD}
>
>
> It's not super convenient, but you can compress those last three 
> transactions to
>
> 2024-02-18 * "Sell BMO, realized gain"
>   Assets:CA:Brokerage:USAccount:BMO  -2 BMO {90.00 USD} @ 94.19 USD
>   Income:CA:Brokerage:USAccount:PnL   -8.38 USD
>   Assets:CA:Brokerage:CanadianAccount:BMO   +2 BMO {127.03 CAD}
>   Assets:CA:Brokerage:CanadianAccount:Cash   2*127.03 CAD @ USD
>   Assets:CA:Brokerage:CanadianAccount:Cash  -2*127.03 CAD
>
> If you prefer to provide the exchange rate instead it can fill in the P/L:
>
> 2024-02-18 * "Sell BMO, realized gain"
>   Assets:CA:Brokerage:USAccount:BMO  -2 BMO {90.00 USD} @ 94.19 USD
>   Income:CA:Brokerage:USAccount:PnL
>   Assets:CA:Brokerage:CanadianAccount:BMO   +2 BMO {127.03 CAD}
>   Assets:CA:Brokerage:CanadianAccount:Cash   2*127.03 CAD @ 0.74147 USD
>   Assets:CA:Brokerage:CanadianAccount:Cash  -2*127.03 CAD
>
> Granted it could be better, but it's possible.
> Thankfully you probably don't have a ton of these...
> (You could automate the generation of these with a plugin if you do.)
>
>
>
> On Mon, Feb 19, 2024 at 9:08 AM Martin Blais  wrote:
>
> (But to the straightforward question is: yes, it can.)
>
> On Mon, Feb 19, 2024 at 9:08 AM Martin Blais  wrote:
>
> It depends.
> What happens to your unrealized gain?
> Does this trigger a realization and stepping up of cost-basis? Or do you 
> carry the unrealized gain to CAD?
>
>
> On Sun, Feb 18, 2024 at 10:11 PM Matt McCormick  wrote:
>
> Some commodities trade on multiple stock exchanges and can be exchanged.  
> How can this transaction be properly recorded?  For example:
>
> 2024-02-18 * "Transfer BMO"
> Assets:CA:Brokerage:CanadianAccount:BMO 1 BMO {127.03 CAD}
> Assets:CA:Brokerage:USAccount:BMO -1 BMO {} @ 94.19 USD
>
> This results in a "Transaction does not balance" error due to the 
> different currencies.
> Is there a way this can be properly recorded?
>
> Thanks
>
> -- 
> 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/d6516c06-94ff-4066-862f-a8762f1a8b4fn%40googlegroups.com
>  
> 
> .
>
>

-- 
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