Yes, you're still exposed to currency risk when you purchase the stock on company B's exchange. I'm assuming you're buying the shares on B's stock exchange through an ADR, GDR, or similar instrument. The risk occurs as a result of the process through which the ADR is created. In its simplest form, the process works like this:
- An international bank buys shares in the company on country A's stock exchange.
- The bank chooses a conversion rate. This is the number of shares they want to offer on country B's stock exchange per each share they purchased on country A's exchange. This conversion rate includes the exchange rate between the two currencies.
I'll illustrate this with an example. I've separated the conversion rate into the exchange rate and a generic "ADR conversion rate" which includes all other factors the bank takes into account when deciding how many ADR shares to sell. The fact that the units line up is a nice check to make sure the calculation is logically correct. My example starts with these assumptions:
The price of the company on a European stock exchange is 50 EUR/share.
The exchange rate is 1.29056 USD/EUR.
I made up the generic ADR conversion rate; it will remain constant throughout this example.
This is the simplified version of the calculation of the ADR share price from the European share price:
Let's assume that the euro appreciates against the US dollar, and is now worth 1.4 USD (this is a major appreciation, but it makes a good example):
The currency appreciation alone raised the share price of the ADR, even though the price of the share on the European exchange was unchanged. Now let's look at what happens if the euro appreciates further to 1.5 USD/EUR, but the company's share price on the European exchange falls:
Even though the euro appreciated, the decline in the share price on the European exchange offset the currency risk in this case, leaving the ADR's share price on the US exchange unchanged.
Finally, what happens if the euro experiences a major depreciation and the company's share price decreases significantly in the European market? This is a realistic situation that has occurred several times during the European sovereign debt crisis.
Assuming this occurred immediately after the first example, European shareholders in the company experienced a (43.50 - 50) / 50 = -13% return, but American holders of the ADR experienced a (15.95 - 21.5093) / 21.5093 = -25.9% return. The currency shock was the primary cause of this magnified loss.
Another point to keep in mind is that the foreign company itself may be exposed to currency risk if it conducts a lot of business in market with different currencies. Ideally the company has hedged against this, but if you invest in a foreign company through an ADR (or a GDR or another similar instrument), you may take on whatever risk the company hasn't hedged in addition to the currency risk that's present in the ADR/GDR conversion process.
Here are a few articles that discuss currency risk specifically in the context of ADR's: (1), (2). Nestle, a Swiss company that is traded on US exchanges through an ADR, even addresses this issue in their FAQ for investors.
There are other risks associated with instruments like ADR's and cross-listed companies, but normally arbitrageurs will remove these discontinuities quickly. Especially for cross-listed companies, this should keep the prices of highly liquid securities relatively synchronized.