Shares of Action Alerts PLUS holding Costco (COST) - Get Report closed up nearly 1% Wednesday after the company revealed in a Securities and Exchange Commission filing that it used a U.S. tax loophole to repatriate more than $1.5 billion over the past two years from Canada "without adverse tax consequences."

The retailer used the weakening Canadian dollar as an opportunity to bring the funds back home.

The U.S. imposes a 35% tax on foreign profits, minus a tax credit for whatever percentage was taken from the revenue's country of origin. Canada has a net corporate tax rate between 15% and 25%, meaning Costco would receive a 10%-20% credit on its U.S. taxes.

While the exact nature of the tax loophole was not disclosed, tax analysts told The Wall Street Journal the company most likely benefited from a quirk that boosts the value of the tax credits when the U.S. dollar strengthens.

The U.S. dollar reached its highest level vs. the Canadian dollar in 13 years in January, rising to C$1.4567, following a deluge of negative data from Canada's economy.

However, this news shouldn't move the needle too much because there is no indication that Costco is bringing back the $1.5 billion in one lump sum. But that doesn't mean the company does not have upcoming catalysts.

For weeks, the analysts at Action Alerts PLUS have been writing about the company's switch to AAP holding Visa (V) - Get Report credit cards after Costco ended its years-long partnership with American Express (AXP) - Get Report .

"Specifically on the new Visa rewards card, we are confident its stronger incentives and potential for broader consumer reach with Visa (over AmEx) will have an immediate, positive impact on the business once the cards are activated on June 20," AAP portfolio co-managers Jim Cramer and Jack Mohr wrote at the beginning of the month.

There is the threat of outsized expectations hurting Costco's stock in the short term, AAP Senior Analyst Scott Berman said. The markets might be looking for the benefits of the switch once the company releases its monthly sales results. But the fact that the switch did not occur until two-thirds of the month was over means the full effect of the switch won't be reflected until the July sales report.

"Bottom line: While the overall market remains fixated on the various risks that could interrupt the recent upswing, Costco sits in an enviable position with tangible catalysts and a proven business model that will power the long-term story and help mitigate potential extraneous market impacts from global, macro news. We reiterate our long-term $175 price target," Cramer and Mohr wrote.

Add $1.5 billion in repatriated money from Canada to that equation and Costco continues to sit in an enviable position.

Editor's Note: This article was originally published at 4:09 p.m. EDT on Real Money on June 29.