Thanks for the reply, Martin!

In the absence of anyone piping up to say such a plugin already exists that 
I've overlooked, I might implement this as a plugin first to share with you 
all, and then consider contributing to a "custom booking method" registry 
feature if there's interest in it. But it will be a little while before I 
can contribute either in any case.

On Saturday, 5 June 2021 at 2:20:16 pm UTC+10 [email protected] wrote:

> Sure why not.
>
> But you could also write your own booking method that does just this 
> instead?
> I would call it "CHECK_FIFO".
> (Problem is it's orthogonal to all the methods, e.g. CHECK_LIFO, etc.. 
> Whatever.)
>
> Right now I don't have a registration mechanism so you'd have to either 
> - patch the code
> - monkey-patch the code without change the library (not sure if possible)
> - send me a patch to add a registry so you can do this cleanly
>
>
>
>
>
> On Fri, Jun 4, 2021 at 11:52 PM [email protected] <
> [email protected]> wrote:
>
>> Hi folks,
>>
>> I use a FIFO methodology for capital gains but with STRICT booking, 
>> inputting the lots I sell explicitly (relying heavily on vim-beancount's 
>> GetContext, but increasingly also automating this with importers that 
>> accept the prior entries).
>>
>> I have two reasons: I'm affected by the "transfer lots with cost" issue 
>> discussed at length in crypto contexts, but a crypto transfer with a fee 
>> means increasing the cost base slightly while preserving the date. All 
>> things considered, this is safer to do explicitly so I can see what's going 
>> on. I also find it personally preferable for everything to be explicitly 
>> expressed in the text. It's aesthetically appealing and reassuring to me 
>> that I haven't misunderstood beancount if it's done explicitly.
>>
>> Which brings me to my question: I have in mind a plugin that would check 
>> the transactions after all the parsing and processing is complete, and 
>> assert that the lots I've explicitly reduced are the ones that are 
>> consistent with a FIFO approach.
>>
>> I think this is something useful and that I could reasonably write (and 
>> open-source) when I have time, but I wanted to ask if anyone's aware of an 
>> existing plugin that does this?
>>
>> A further thought is that if I choose `option "booking_method" "FIFO"`, 
>> then it would be extremely cool if beancount would not just interpolate 
>> missing bookings according to FIFO but also consider it an error if I have 
>> explicitly booked a reduction that doesn't conform to FIFO. I'll leave it 
>> up to Martin to decide whether this validation is in the scope of 
>> `booking_method` or whether this belongs to a plugin.
>>
>> Thanks for reading!
>>
>> -- 
>> 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/2a2682b6-83d9-4288-a3d5-c7c5b2659cafn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/beancount/2a2682b6-83d9-4288-a3d5-c7c5b2659cafn%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/37a15b36-1b13-4166-9402-2a81f4c56249n%40googlegroups.com.

Reply via email to