Precision of Shares

View: New views
2 Messages — Rating Filter:   Alert me  

Precision of Shares

by Georg Klein-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hallo,
a have a DWS Riester Rente Premium where I buy stocks every month for 9€
at the current exchange rate. The number of stocks I buy is calculated
to be at 9€ which results in a number with very high precision.
Example:

I buy 0,103600 stocks @ 86,905263.

The problem is that kmymoney supports only two digits of accuracy for
number of stocks so I have to fix it by converting this deal into

0,11 stocks @ 81,85 €

which is not very nice, since my total number of stocks is then wrong in
the long run.

The problem did not exist in a prior version of kmymoney

I looked a little around the source code and my guess is that the
problem lies somewhere in investtransactioneditor.cpp:updatePriceMode    
but I'm no expert in C++

Maybe the user-specified precision from the config menu should also be
adapted to "Shares" rather than saying
sharesEdit->value().abs()
you could say
sharesEdit -> value().RoundToPrecisionfromConfigMenu()

Regards,
Georg Klein


~$ kmymoney2 -version
Qt: 3.3.8b
KDE: 3.5.10
KMyMoney: 1.0.1


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
KMyMoney2-developer mailing list
KMyMoney2-developer@...
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer

Re: Precision of Shares

by Bugzilla from asoliverez@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Georg,
have you tried changing the fraction of the shares, rather than the price precision.
The fraction has effect on the number of shares, which is what you are looking for in this case.

Regards,
Alvaro

On Thu, Oct 22, 2009 at 1:27 PM, Georg Klein <georg@...> wrote:
Hallo,
a have a DWS Riester Rente Premium where I buy stocks every month for 9€
at the current exchange rate. The number of stocks I buy is calculated
to be at 9€ which results in a number with very high precision.
Example:

I buy 0,103600 stocks @ 86,905263.

The problem is that kmymoney supports only two digits of accuracy for
number of stocks so I have to fix it by converting this deal into

0,11 stocks @ 81,85 €

which is not very nice, since my total number of stocks is then wrong in
the long run.

The problem did not exist in a prior version of kmymoney

I looked a little around the source code and my guess is that the
problem lies somewhere in investtransactioneditor.cpp:updatePriceMode
but I'm no expert in C++

Maybe the user-specified precision from the config menu should also be
adapted to "Shares" rather than saying
sharesEdit->value().abs()
you could say
sharesEdit -> value().RoundToPrecisionfromConfigMenu()

Regards,
Georg Klein


~$ kmymoney2 -version
Qt: 3.3.8b
KDE: 3.5.10
KMyMoney: 1.0.1


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
KMyMoney2-developer mailing list
KMyMoney2-developer@...
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
KMyMoney2-developer mailing list
KMyMoney2-developer@...
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer