Replies: 8 comments
-
Paisa doesn't handle 2 level indirection well. Since the USD to INR price is not mentioned anywhere, it will not know how to handle it. The price fetched from yahoo will be stored as ABNB -> INR. You can fix the problem in 2 ways
I personally use the second method, but both might approach might work |
Beta Was this translation helpful? Give feedback.
-
Thanks @ananthakumaran This helps. Is there any plan in future to handle this? |
Beta Was this translation helpful? Give feedback.
-
What is your expectation? The way I see it, it already works, you just have to specify how commodities are connected. |
Beta Was this translation helpful? Give feedback.
-
Currently, I'm using your first solution. I have to add the USD to INR price manually. I was wondering if there is a way this can be added automatically, similar to how you are pulling stock and mutual fund prices |
Beta Was this translation helpful? Give feedback.
-
Hey, if you are still looking for this, add the following to fetch USD to INR price automatically to your commodities in paisa.yaml:
Or add USD as a stock with price fetch from yahoo with ticker INR=X similar to how you added ABNB in the UI. Though I'm not sure if this will correctly solve this issue, this is a valid way to fetch the exchange rate. @ananthakumaran I can create a PR adding this to the docs for fetching currency prices if you like. |
Beta Was this translation helpful? Give feedback.
-
I doubt this will help with the OP issue, the amount is converted to default currency when the ledger file is parsed, and during that time prices from external systems are not referred to, only the prices specified in the ledger file are used. |
Beta Was this translation helpful? Give feedback.
-
Ah, I see. It seems that the code for conversion of the prices to $default_currency exists already somewhere in the code, since the market value is calculated correctly with the example ledger entry. You need to use the same code when calculating investment amount too for correct gain calculations. |
Beta Was this translation helpful? Give feedback.
-
Converted to a discussion since a workaround is available and there are no immediate plans to support 2-level indirection. |
Beta Was this translation helpful? Give feedback.
-
Problem:
When the default currency is set to INR and I make transactions for stocks in USD, the market value calculation appears to be significantly off.
Example ledger entry:
The stock is purchased in USD and in assets report the Absolute return is incorrect.
For example As of Today 4th Oct 2023 the market value of ABNB is 127.73 USD. In absolute return it shows 12,673.00% change. Actual change is less than 20%.
Is this expected behavior or am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions