What steps will reproduce the problem?
1. Look at the cost basis in the Performance panel field on the picture located
at https://code.google.com/p/stock-portfolio-manager/
2. Let's use the RY.TO stock for discussion
3.
What is the expected output? What do you see instead?
The transaction cost of RY.TO is $1434.90. Since there are 30 shares owned the
correct adjusted cost basis per share should be $47.83. The average cost per
share of $47.50 is correct but it is useless from an investment point of view
as it is not including the commission cost for the two purchase transactions.
If you execute a sell trade using the 47.50 as your adjusted cost you may end
up in a situation where it looks like you made money but actually lost money,
net of commissions.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Recommend you put in a foreign exchange field, on a per transaction level. Many
people make the mistake of doing this on a global basis but if you know
anything about stock trades you'll know that foreign exchange always changes so
each transaction exchange rate is different. You'll want the FX to be able to
do at least 4 decimal places.
Let's do an example:
BUY 100 IBM (NYSE) @ $163.138 $USD
Commission is $6.95 $USD
FX to CAD is 1.12400
Adjusted Cost Basis = ((100 x $163.138) + $6.95) x 1.12400 = $18344.523
SELL 100 IBM (NYSE) @ $164.250 $USD
Commission is $6.95 $USD
FX to CAD is 1.11760
Cost of Liquidating = ((100 x $164.25) + 6.95) x 1.11760 = $18348.813
Net gain = $4.290
(I made $1.1120 per share but lost almost all of it because of FX.)
Original issue reported on code.google.com by jkn...@gmail.com on 10 May 2015 at 2:49
Original issue reported on code.google.com by
jkn...@gmail.com
on 10 May 2015 at 2:49