View Single Post
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#168
Originally Posted by mämo View Post
How can I enter a sell transaction?

What I tried:
  • tap menu button, bottom-right
  • "Select Portfolio"
  • tap "pencil and paper" button to go to edit mode
  • tap portfolio where I want to enter transaction
  • tap stock position where I want to enter transaction
  • tap + button
Now all I can enter here are shares, price, commission. There is no selector for buy/sell and it always defaults to Buy@, even if I enter a negative share amount.

Any ideas?

PS: I saw a while back there was a Youtube link posted showing how to enter transactions. I'm in China currently and YT is blocked here. Please give a verbal description. Thanks!
Sell transaction is currently not supported. Actually, the feature is partially implemented but I wasn't quite sure the use case so I didn't complete it. I will look into this, but I need your help explaining to me the use case. Specifically, do I need to include realized gain when calculating the performance of a position?

Let's say you have 3 buy transactions for NOK, from earlier to latter:
1. 10 shares; cost $3
2. 10 shares; cost $5
3. 10 shares; cost $2
So you NOK position is 30 shares with total cost $100.
Assuming NOK price is currently $7 then the market value is $210 so the unrealized gain is $110.

When you sell all or nothing for each buy transaction the realized gain is easily calculated. But partial sell the realized gain is more complex. So if I can get away with only calculating the unrealized gain then I can get this feature done pretty fast.

For realized gain... as an example let's say you sell 15 shares at $7, the realized gain depends on which slot of shares you sell. I know usually people do FIFO (first-in-first-out) so looks like a date field is needed in order to figure out the ordering. Assuming FIFO, the sell results in 15*7 - (10*3) - (5*5) = $50 gain, right?
After the sell the position becomes:
1. 5 shares; cost $5
2. 10 shares; cost $2

So the position performance becomes:
Share: 20
Cost: $45

Gain: Realized gain + Unrealized gain = $50 + (market value - cost) = $50 + (20*7 - 45) = $145

or

Gain: Unrealized gain = (20*7 - 45) = $95?

Last edited by sony123; 2013-10-31 at 08:19.