1

Currently, I'm implementing currency exchange feature, for a stock market portfolio app.

I had faced the following obstacle.

  • In 2008, I bought a stock priced USD 1, using currency MYR. 1 USD is 3 MYR. I paid MYR 3.

  • In 2015, I sold the stock price USD 2, using curreny MYR. 1 USD is 4 MYR. I paid MYR 8.

  • My profit in MYR is 5 (MYR 8 - MYR 3)

  • My profit in USD is 2 (USD 2 - USD 1)

Now, I wish to view my portfolio profit in term of SGD. What should it be?

closed as off-topic by Dheer, Victor, JoeTaxpayer Jun 2 '15 at 12:19

  • This question does not appear to be about Personal Finance within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I'm voting to close this question as off-topic because its about building a software feature and there is no right or wrong way. – Dheer Jun 2 '15 at 9:34
0

I think this will do the trick:

  1. Determine the buying price in SGD of the stock using SGD/MYR in 2008 (at the point you entered your position)
  2. Determine the selling price in SGD of the stock using SGD/MYR in 2015 (at the point you closed your position)
  3. Calculate the percentage difference between the values found in 1 and 2
  • This is correct, but not always practical. SGD/MYR is not generally quoted or traded (at least in depth) so prices can be odd. It is probably better to combine USDSGD and USDMYR to get the SGDMYR. – rhaskett Jan 8 '15 at 21:58
0

It's very simple. Use USDSGD. Here's why:

  • At any point in time all your assets can be valued in the asset-denominated currency (USD in your example), call it NAVXXX (where XXX is the currency)
  • At any point in time all these NAVXXX can be valued in your base currency (SGD here), use whatever is feasible i.e. if there's a cross SGDMYR use that, otherwise cross USDSGD and USDMYR yourself.
  • Now the portfolio's total profit/loss between two points in time is just the difference in NAVSGD at those two points in time.

Presenting profits/losses in other currencies or denominations can be useful if you want to sketch out the profit/loss you made due to foreign currency exposure but depending on the audience of your app this may sometimes confuse people (like yourself).

Not the answer you're looking for? Browse other questions tagged .