Registered Member
|
I have a 401k investment account that I can update directly. Yet, I end up doing it manually through OFX import, because the direct update gives different results. Every month, a fixed amount is invested in a number of funds. I have defined these funds to use "Total for all shares" in the Price Entry section of the investment setup. The share prices should be equal to the invested amounts divided by the respective number of shares, which is nearly always a number with as many decimals as KMM has been set to store. The problem is that with direct update, a fixed share prices (two decimals) is obtained, and the total amount is not right (more than two decimals). Is this the fault of the financial institution, or can it be fixed?
|
Registered Member
|
Firstly, are you sure that the figures you obtain directly only have two decimal places?
Secondly, how many decimal places are set in Settings>Configure KMyMoney>Global>Price precision? Thirdly, does changing the setting have any effect on the results?
John Hudson, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Yes. I have the following operation (buy shares) if imported manually:
Six digits. Yes. As expected, V=$285.4325 if I reduce the number of digits to 4. All else remains equal. The direct update does not follow the definition of the investment, according to which "total for all shares" should have been used. Actually, I am surprised that is even an option. |
Registered Member
|
Well, maybe it is not. The investment has been defined in 1/1000 both in KMM and by the financial institution; so, three digits is fixed precision for Q. The invested amount V is definitely fixed i.e. no roundoff is allowed. You divide V by the price per share and get the quantity. The quantity is then rounded to three decimals and becomes fixed. This leaves only the price to absorb any round-off. |
Registered Member
|
The first result of Q × P = 285.4299968 but this is rounded to six decimal places.
In the second calculation P is rounded to two decimal places so that Q × P = 285.43248. So in both cases the outputs are correct. The issue is the rounding of P to two decimal places for the second calculation. This may be a bug/feature of KMyMoney but it may be worth increasing the price precision to 7 to see if this makes any difference.
John Hudson, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Thanks, John, for your feedback. I'm sure it will react as you predict: method 1 will give 285.4299968, while method 2 will come up with the exact same numbers as before, based on a two-digit price (additional digits beyond the fifth decimal are zero). Not to me. The amount of the transfer was $285.43 exactly. The actual price per share of the transaction was not $10.46 but slightly less. So, I think you cannot simultaneously define "price" as the stock market quote upon which the transaction is based and link it to the value of the transaction. That link requires an adjusted (actual) price. It would be interesting to hear what the developers think. |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]