Welcome to Personal Stock Monitor user forum. You must have an account to post to the forum. See the forum instructions page for some instructions on how to use the forum.
Subscribe to RSS Feed
Personal Stock Monitor Users Forum -> Currency Conversion CAD
Not logged in.
2010-06-05 18:49:13
1 of 26
#2233
I have a few Canadian stocks with Interactive Brokers. Orders are entered in CAD, and the daily/monthly statements track the activity and performance in both C$ and US$. I'm trying to figure out how to do this properly in PSM Gold.

I'll use Husky Energy as an example (HSE.TO). It appears, first, that the Yahoo! quotes are in CAD, although there's no indication. I've come to this conclusion after checking the June 4 closing price on Yahoo! Finance, and then through GlobeInvestor.com. Both give the amount as 26.04, but GlobeInvestor specifies that it's C$.

My global currency is USD, but I have overridden the properties for this ticker to use CAD as the quote currency. Then when I enter the buy transaction, I can put in the CAD amounts for the price and commission, and a conversion value for CAD (based on what IB converts to) and get the proper total price.

So far, so good. However, now (about 2 weeks later) I'm looking at the closing price and it's showing 24.4984. That SHOULD be 26.04 * .940876 (the current conversion rate), which would be 24.5004. If it was using the original conversion price as input on the buy transaciton, it would be 24.9567 (conversion to 4 decimals is .9584 for that day).

So -- am I not understanding how to use the currency conversion? The global display currency is USD, and the quote currency for the ticker is CAD. I thought that was supposed to take care of it. I've left the quote server for these tickers to Yahoo!, and use the .TO suffix. I'm using the display of 4 decimal places.
Posted by: Litewriter
2010-06-06 16:42:52
2 of 26
#2234
in reply to #2233
The experts can weigh in here, but I have the reverse scenario, and it works the way I expect it to work as follows:

I am holding a US stock in a Canadian broker account, with all positions (Total Value, Total Cost) reported in CAD. My settings are:
Global Currency: Default (No Conversion)
Account Tab Currency: CAD
For the particular US stock, I checked "Override Quote Currency --> USD" (because the Yahoo quote is in USD).

I recorded the purchase the way you did -- the Total Cost aligns with my broker's confirmation both in USD, then (using FX from confirmation slip) also in CAD. This Total Cost is "frozen" in both USD and CAD -- it does NOT change with the daily FX rate. I confirmed that.

The Total Value shows in CAD (my portfolio/ account tab currency), and it changes with BOTH daily change in USD share price, AND daily FX change. Basically, the share price for this USD security in my CAD accounts always shows in CAD -- it being the USD share price at that time, times the FX at that time.

Is yours not behaving the same way -- taking into account that your scenario is exactly the opposite, but it shouldn't matter.
Posted by: immaus
2010-06-06 17:17:16
3 of 26
#2235
in reply to #2234
Wanted to highlight some strange scenario related to FX conversion to see whether it can be addressed – it might have to do with Rounding and FX, not sure???:
This is a real scenario I am facing right now:

My global Rounding setting is “No Rounding – maximum Precision”.

I am holding a stock in my Canadian portfolio that used to be listed in Canada (in CAD), now moved to US listing (in USD). 2 scenarios, same USD share price, same # shares, resulting in different Total Value in CAD (not sure why):

1) Buy 100 NRTLQ.PK when (originally) listed in Canada in CAD @ CAD9.90 + CAD10.00 Commission = CAD 1,000.00 Total Cost. Current Share Price (now listed in US in USD) is US 0.04. In PSM (account currency CAD, security-specific quote currency override to USD), it shows as CAD 0.042. PSM FX is 1.048817, so “theoretical CAD share price in PSM should be USD0.04 x 1.048817 = CAD0.0419526. Looks like PSM might be rounding this to 4 decimals, hence CAD0.042(0) as the official PSM CAD share price. Makes sense to me. Correspondingly, Total Value is CAD 0.042 x 100 = CAD4.20. Perfect - - as expected.

2) Buy same 100 NRTLQ.PK now when it’s already listed in US. Rest of purchase info is irrelevant, as problem is Total Value anyways. Same 100 shares as in 1), same current USD0.04 per Share quote from Yahoo, same FX, but now PSM shows a Total Value of CAD4.1952 instead of CAD4.20???

Any idea? Can this be fixed? It looks like in scenario 1 where the initial purchase was in the same currency as the account currency, the 4-decimal rounded CAD share price is used to calculate Total Value. In scenario 2 where initial purchase was in USD instead of account currency of CAD, the CAD share price that is used to calculate Total Value is NOT the rounded 4-decimal one, but instead the USD Yahoo quote price times the FULL 6-decimal FX rate times the # Shares Held, THEN Rounded to 4 decimals only at the end?

Does it make sense to treat both scenarios differently? I would suggest given that account currency is same, quote currency is same, # shares is same, USD quote is same, Total Value should be same, regardless of fact whether initial shares were bought in Canada or US?
Posted by: immaus
2010-06-07 10:40:37
4 of 26
#2237
in reply to #2235
Thanks for pointing that out. I will have to look into this scenario a bit further.
Posted by: Anatoly
2010-06-11 12:06:56
5 of 26
#2246
in reply to #2237
Sorry not to have updated this recently, after reading Immaus' replies.

First though, I'm a bit confused about 'MV' -- what are you referring to? BV I take to mean basis value.

I just checked the current price with the markets open, and now the conversion works. Haven't checked after market closes again, to see if it has something to do possibly with not having the conversion for CAD to USD 'frozen' at the same time.

Otherwise, I believe my settings are the same (albeit reversed) as Immaus noted, except that this tab has a mixed bag and defaults to USD (my global default currency). I too am using no rounding, maximum precision.
Posted by: Litewriter
2010-06-11 12:31:42
6 of 26
#2247
in reply to #2246
Sorry,

MV = Market Value (current Price x # Shares).

BV = Book Value ("Total Cost" in PSM) = # Shares Purchased x Purchase Price per Share + Commissions + Fees.

Posted by: immaus
2010-06-11 12:44:22
7 of 26
#2248
in reply to #2247
In that case I was confusing MV and BV as well, since I'm not used to using those abbreviations. Since BV includes commissions and fees, couldn't you just set the fee on one of the transactions to reflect the broker adjustment?
Posted by: Anatoly
2010-06-12 14:27:28
8 of 26
#2249
in reply to #2248
Sorry, Anatoly, are you referring to posting #2235 or 2233 above?

I will send you a small transaction file for challenge #2235 -- the problem is that I believe both lots should have the same Total Value as they contain the same # of Shares.
Posted by: immaus
2010-06-15 03:08:16
9 of 26
#2257
in reply to #2249
Just to clarify what I think the small calculation gap is (should be easy to fix in the code if this is confirmed to be the problem):

In scenario 2) per Post # 2235, I believe PSM calculates in Full Precision Mode:
USD Price per Share x ROUND(CADUSD FX, 4) x # Shares.

The problem is that USD Price per Share x ROUND(CADUSD FX, 4) results in a 6-decimal number (CAD 0.041952) which then gets multiplied with # Shares, while the Current Holding Tab displays USD Price per Share x ROUND(CADUSD FX, 4) as a 4-decimal rounded number (CAD 0.0420 -- this is the number I would have expected to be used for multiplication with # Shares to get to Total Market Value. That would not only be more consistent with the 4-decimal maximum precision rule otherwise applied throughout PSM, it would also ensure that both 1) and 2) in post #2235 result in the same Market Value given that both Lots acquired the same # of Shares).

So, instead of current logic, I believe PSM should be calculating:
ROUND[USD Price per Share x ROUND(CADUSD FX, 4), 4] x # Shares.

The difference is just a small additional interim rounding step during the calculation of Market Value. It basically should be rounding (to 4 decimals -- same as displayed on Current Holdings Tab) the CAD-converted Price per Share BEFORE multiplying with Number of Shares.

If you can confirm this to be the small gap, can you fix for next release?

Thx
Posted by: immaus
2010-06-15 11:51:45
10 of 26
#2258
in reply to #2257
Actually right now it does

ROUND[USD Price per Share x CADUSD FX, 4] x # Shares

 so the rounding would need to be added at the FX step.
Posted by: Anatoly
2010-06-15 22:06:07
11 of 26
#2260
in reply to #2258
Ok, I can't see the code. Below 2 examples of the slightly incorrect "Share Value" on the Current Holdings tab -- can you see what needs to be changed in the code to correct it?

---
Example 1:
Maximum Precision setting.
NRTLQ.PK is the stock, listed in the US in USD.
USD Price per Share is USD0.04.
CADUSD FX per PSM is 1.048817.
"Price" on Current Holdings Tab (which is set to CAD as account currency) shows as CAD 0.042.

Correspondingly for 100 shares in a Lot, the "Share Value" should be CAD0.042 x 100 = CAD4.2000. However, it shows CAD4.1952.

---
Example 2:
Maximum Precision setting.
USD Price per Share today is USD0.0375.
CADUSD FX per PSM is 1.027959.
"Price" on Current Holdings Tab (which is set to CAD as account currency) shows as CAD 0.0385.

Correspondingly for 100 shares in a Lot, the "Share Value" should be CAD0.0385 x 100 = CAD3.8500. However, it shows CAD3.8546.

---
It appears whatever Rounding you apply before displaying "Price" in CAD on the "Current Holdings" tab is not applied when calculating the Lot's "Total Value" -- that appears to be the gap/ disconnect.

Can you fix?

Thx
Posted by: immaus
2010-06-16 09:03:22
12 of 26
#2263
in reply to #2258
In reply to #2258, would it not be better to perform the entire calculation (USD pps x CADUSD FX x #Shares) and THEN round it?
Posted by: Litewriter
2010-06-16 11:08:13
13 of 26
#2264
in reply to #2263
Yes, it is more accurate to not round the FX rate. Since the problem turned out to be elsewhere, I'm leaving the FX rate unrounded in the calculation.

Litewriter wrote
In reply to #2258, would it not be better to perform the entire calculation (USD pps x CADUSD FX x #Shares) and THEN round it?

Posted by: Anatoly
2010-06-16 11:10:02
14 of 26
#2265
in reply to #2260
immaus wrote

Can you fix?

The problem turned out to be that I was doing the currency conversion on price then multiplying by shares in one place, but doing the currency conversion on price * shares in another place. I have now changed it so that it always multiplies by #shares after the currency conversion, so the numbers will match. I will post an updated build later today.
Posted by: Anatoly
2010-06-16 14:11:02
15 of 26
#2267
in reply to #2265
Ok, test build has been updated with the latest changes. Build number should be 349 after installation.
Posted by: Anatoly
1 2 >>