redstreet/fava_investor

Investor Link shows in Fava, but individual modules fail

g40matt opened this issue · 10 comments

Thank you for this project! Investor tools will be very useful in Fava. I successfully installed the extension and added the fava-extension to my beancount file, which appears to work (Investor link shows in Fava and the new screen loads). But when I click on any of the tabs -- Asset Allocation, Cash Drag, TLH, etc, I get a module failed error within Fava.

"Loading http://localhost:5000/ledger/extension/Investor/?module=aa_class failed."

Probably something simple I am missing :) Any suggestions?

Thanks for the kind words!

Couple things to try:

  1. Does running the example work? (See README.md)
  2. What's the console (where you started the command) saying?

fava_investor doesn't have any inbuilt base currency, but uses beancount's "operating_currency" option. (That's true for the fava extensions and libraries. The CLI lets you specify the base currency, with USD as default, but this thread isn't about the CLI).

However, I haven't tested any of the code with multiple currencies. I'd like fava_investor to support multiple currencies, so any contributions including test cases and/or bugfixes are most welcome.

Got it. The only way AA can assign percentages is to view your entire balance inventory in a single currency, so it can make comparisons. In this case, is the solution to first convert commodities to EUR, then do a second step conversion from EUR to USD? This would depend on being able to convert between the two currencies on or close to the date AA is requested. Let me know.

Also, curious: does beancount/fava support more than two currencies? Is 3+ currencies a common use case?

@g40matt, let me know if your case involves multiple currencies or if you were able to get this working?

@scanta2, what other modules fail? Would you be willing to contribute a few test cases? A patch would be even better!

A few follow-ups:

(1) I did get it to work. I didn't set the parameters to pass to the extension, so I think it was causing it to fail.

(2) Regarding currencies, I have some non-USD holdings which appear to be ignored in the AA reports. I have price directives to convert to USD and they are still ignored.

Been busy at work but I will mess around with this alot more. The new functionality this brings to Fava is tremendous!

Glad you find it useful, thank you for the feedback!

Yes, the project is new, and may be a bit rough around the edges, since I'm focused on getting it off the ground and building the core functionality before polishing it.

Reg (1), cash drag and TLH should work without any config. AA-by-class may fail if you don't have the right metadata. The console where you ran fava should tell you why it failed though. If it didn't, please do file a bug report with a minimal example.

Reg (2): AA-by-class needs some work and some thought to get it working with multiple currencies. I filed this. If you can add a minimal example (a beancount source that doesn't produce the results you want), that would help move it forward.

I'll close this issue, feel free to reopen or open new issues as needed.

Thanks!

For reference the module failed error was due to me inserting this line (which I now realize was just an example from the readme file) in my beancount file:

2010-01-01 custom "fava-extension" "fava_investor" "{...}"

Good to know. Suggestions appreciated.