Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-28 Thread Red S
On Thursday, November 28, 2024 at 1:07:03 PM UTC-8 Eric Morgan wrote: Thanks to everyone for input in this thread! Thanks Red for the code change! I'll try that later today and over a few weeks. If it doesn't work for all of my trades I'll see if I can refine it further. Another question: Given

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-28 Thread Red S
Thanks to everyone for input in this thread! Thanks Red for the code change! I'll try that later today and over a few weeks. If it doesn't work for all of my trades I'll see if I can refine it further. Another question: Given that there are some bugs in the beangrow code and it is not activel

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-28 Thread Eric Morgan
Thanks to everyone for input in this thread! Thanks Red for the code change! I'll try that later today and over a few weeks. If it doesn't work for all of my trades I'll see if I can refine it further. Another question: Given that there are some bugs in the beangrow code and it is not actively

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-28 Thread Red S
Hi Eric, Applying this patch should help. It uses XIRR from this library . It certainly resolves your test case, and works on several accounts of mine (but not all). However, I’ve barely tested it, and there are cases where it might not wo

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread Red S
Hi Eric, As Martin mentioned, Beangrow is code that Martin shared at some point years ago. I would consider it highly experimental, and fringe part of the larger Beancount ecosystem. I personally take that to mean “I’d be very pleasantly surprised if this worked out of the box” :). Beancount i

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread Eric Morgan
I'll just add that this issue has caused me to put using beancount on hold (since my OP on November 3rd). Prior to this issue I have spent at least 120 hours writing my own importers for banks I'm using. The end goal was to calculate an aggregate IRR for all my investments. I think my minimal e

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread Eric Morgan
Thanks for the information David. In the minimal example I posted earlier the entire position has been sold. Further I haven't specified the IRR period. I assume that by default it calculates over the full life of the investment. On Wednesday, November 27, 2024 at 11:29:28 PM UTC+1 David Avraam

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread David Avraamides
> I'm pretty sure prices should not be used for calculating IRR. If you still hold the position on the final date of the IRR calculation period, you need a price to create a final cash flow that is equivalent to selling your remaining position at that ending mark. Likewise, you can do this for

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread Martin Blais
I built beangrow years ago and got everything working for my use case back then but I haven't maintained that state since. I switched to Johnny in 2021 when I had a properly busy trading year before I returned to work in finance and I'm certain beangrow would not handle the complex options trades I

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread Martin Blais
Debuggability should be improved for sure. On Wed, Nov 27, 2024, 15:58 Eric Morgan wrote: > Further testing shows that prices are used to determine IRR, so my example > wasn't complete. Thus you don't need to answer my question. Perhaps I had a > problem with price data. > > On Wednesday, Novemb

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread Eric Morgan
Further testing shows that prices are used to determine IRR, so my example wasn't complete. Thus you don't need to answer my question. Perhaps I had a problem with price data. On Wednesday, November 27, 2024 at 9:53:33 PM UTC+1 Eric Morgan wrote: > This is an attempt at making my original quest

Re: Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-27 Thread Eric Morgan
This is an attempt at making my original question easier to answer by providing a minimal example. Here is a beancount file with one purchas and sale. *option "operating_currency" "SEK"2010-01-01 custom "fava-extension" "fava_portfolio_returns" "{ 'beangrow_config': '/data

Have had positive returns, need help understanding why beangrow shows -100% IRR

2024-11-02 Thread Eric Morgan
I'm using the beangrow plugin for fava. It shows the following numbers. I've double checked that yield is correct using a different library. But I don't understand why IRR is -100.00%. My calculations suggest it should be 285.78%. [image: 20241102_23h47m09s_grim.png] Here is the same data visu