Bitcoin and other cryptocurrencies, or "altcoins," can be purchased and traded on a number of online exchanges, but it's also possible to get ahold of digital coins without trading cash or other fiat currency by producing new ones via mining.

Mining cryptocurrencies is done through a variety of means depending on the coin being mined, but the basic idea is to use computing power to solve mathematical problems. Often, this computational power is used to power the network that a particular altcoin runs upon and "miners" are rewarded for their contribution with some of the altcoin currency itself.

So which is the better way to get your hands of some digital cryptocurrency? To invest time and money in buying, setting up and powering a mining rig that will quietly sit in a corner and literally mint altcoins for you? Or to simply buy a new altcoin as soon as possible, buying your way into the ground floor before watching it soar (hopefully)?

New research presented at last month's Financial Crypto 2018 conference finds that mining a new altcoin may provide better returns than simply speculating by buying cryptocurrencies on an exchange.

Researchers from Princeton University and the University of California, San Diego looked at the potential profitability of mining versus speculating on 18 altcoins, include Dogecoin, AuroraCoin, ViaCoin and RonPaulCoin. They found that mining a coin shortly after it is listed on an exchange is more profitable on average than simply speculating on the coin once it has been listed.

The researchers created simulations that estimated daily returns for altcoins per $1 of investment, whether through mining or speculating. Over a period of seven days, the simulations showed expected daily returns of between 7 and 18 percent for mining and between negative one and positive .5 percent for speculating.

"It's also important to point out that we show the Altcoin market is highly volatile, whether you're mining or speculating," said Danny Huang, first author of the paper, who earned his Ph.D. in computer science at the University of California San Diego and is now postdoctoral researcher at Princeton.

Normally this is the point where I include a note about how investing in cryptocurrencies is risky, but Huang was kind enough to do it for me.

"Altcoins have attracted enthusiasts who enter the market by mining or buying them, but the risks and rewards can potentially be significant, especially when the market is volatile," Huang said.

This is especially true when dealing with newer altcoins. Rampant speculation over the past year has led to the launching of a number of junk cryptocurrencies. Some of these have already disappeared, taking money invested by both miners and speculators alike along with them