No smart investor should consciously bet on a company in hopes of doubling their investment within a year: Your plan should be to treat the stock market as a long-term game, because anything can happen in the short run. Over time, however, the best companies will rise to the top and produce outsized returns.

But if a company does rack up amazing gains in shorter time frames, who are we to argue? While stock runs of this type can often be the result of a company having bet (apparently successfully) on a risky play, other times, the market can deliver them because a well-laid business plan is working out. Read on to see which camp MoneyGram International (NASDAQ:MGI), Northern Dynasty Minerals (NYSEMKT:NAK), and Applied Optoelectronics (NASDAQ:AAOI) fell into, and what the reasons were for their stocks' phenomenal 12-month results.

Digital representation of global currencies being moved around the world

Image source: Getty Images.

MoneyGram International (up 186.2%)

Things began to look up for money transfer specialist MoneyGram International before Donald Trump was elected president, his win spurred a rise in its stock because anxiety among immigrants was seen as leading to a short-term jump in money transfers to Mexico, the nation that is the fourth-biggest recipient of remittances from the U.S., behind India, China, and Philippines.

It didn't hurt that in October, MoneyGram and partner Wal-Mart launched a new program that allows money transfers from any U.S. Wal-Mart store to any Wal-Mart Mexico store.

But things really began to heat up in January when Alibaba affiliate Ant Financial offered to buy MoneyGram in a deal valued at roughly $880 million. Ant's primary business is Alipay, China's largest online payments service. But the proposal raised concerns about the acquisition giving the Chinese government access to the sensitive personal and financial information of Americans, since businesses owned by the government in Beijing in turn own a big chunk of Ant.

The Ant offer sparked a bidding war with U.S.-based Euronet Worldwide, which offered $1 billion for MoneyGram. Ant countered with a $1.2 billion bid, or $18 per share. As Euronet never followed up with a higher offer, MoneyGram shareholders overwhelmingly approved the Ant Financial takeover, with 97% of investors voting in favor.

The deal still has to get approved by the Treasury Department committee that oversees foreign investments in U.S. companies, but Ant Financial has said it believes it will get the OK by the summer. All the drama has boosted MoneyGram International's stock more than 186%, turning a $1,000 investment in the money transfer specialist a year ago into $2,800 today. Yet it's still possible MoneyGram's stock could crash if Treasury quashes the deal.

Gold miner holding a nugget

Image source: Getty Images.

Northern Dynasty Minerals (up 411.4%)

Exploratory-stage precious-metals miner Northern Dynasty Minerals has seemingly had one foot in the grave for years after the Environmental Protection Agency revealed its official opposition to the development of the Pebble mine in Alaska, before the miner had even submitted an application. Its wholly owned subsidiary, Pebble Limited Partnership, responded by suing the EPA, asserting that the agency had jumped the gun.

Located on Bristol Bay at the headwaters of a major spawning run to which 40 million salmon return every year, Pebble is the single largest undeveloped copper-gold-molybdenum deposit in the world, with the potential to produce as much as 55 billion pounds of copper, 67 million ounces of gold, and 3.3 billion pounds of molybdenum over a near-80-year period. But that's only if it could be mined profitably, which is not a sure thing. Northern Dynasty has had two partners back out of the project -- fellow miners Anglo American and Rio Tinto -- and the site has been laying fallow. However, Trump's election gave rise to dual catalysts for Pebble: speculation that his policies would lead to higher precious metals prices, and the high likelihood that under new management, the EPA would view the project more favorably.

In fact, the miner and the regulatory agency did just come to a settlement recently over Northern Dynasty's lawsuit. The EPA has said it will withdraw its previous opposition, and postpone any further decisions on Pebble until the miner actually submits an application, and an environmental impact statement of its proposal has been completed by the U.S. Army Corps of Engineers.

Shares of Northern Dynasty had gained as much as 1,000%, pulling it out of true penny stock status to a price of over $3 a share, but it's since pulled back by around 50% from its 12-month high, given that substantial local opposition to the project still exists, from fisherman whose livelihoods it could put at risk to indigenous peoples, and among residents of Bristol Bay in general. Today Northern Dynasty Minerals remains up 411% from where it sat a year ago, which means an investment of $1,000 would have turned into more than $5,100. But seeing as those gains were largely built on hype and hope, it unclear whether they will last.

Glowing fiber optic cable

Image source: Getty Images.

Applied Optoelectronics (up 565%)

Fiber-optic network products provider Applied Optoelectronics has surged some 565% during the past year on a string of strong quarterly earnings reports that began last June. The cause? Customers like (NASDAQ:AMZN) and Microsoft increased their demand for data center work, causing segment revenues to more than double. In its first-quarter earnings report, Applied Optoelectronics said data center revenues jumped year over year from $38 million to more than $79 million.

Amazon provided 55% of AO's revenues while Microsoft accounted for almost 19%. 

AO provides fiber and fiber-networking products to homes, internet data centers, and for cable television broadband -- the need for which is only increasing as ever more network-connected devices come online and demand rises for streaming video, cloud computing, social networking, and more.

Primarily because's growth shows no signs of letting up, there's no reason to expects Applied Optoelectronics' own growth will falter either. A $1,000 investment in the fiber-optic network products specialist a year ago would be worth more $6,200 now, and it's easy to believe it can go higher still.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.