The world is changing the way it conducts business. For centuries, humans have used cash to buy and sell goods and services because local fiat currency has been the most efficient way to to conduct commerce. Yet, over the past several decades, technology has drastically changed consumer behavior as well as how governments respond with new rules and regulations. Recent seismic payment shifts away from cash have been driven by the rapid rise of e-commerce and mobile payments.

Meanwhile, businesses have faced new opportunities and problems. How quickly is the world moving toward a cashless economy? Are certain geographic areas more likely to experience this transformation? Is this a positive change for society? We'll explore these questions, with an aim to capture nuanced positions, while discussing different ways investors can profit from this massive global economic shift.

Let's start with perhaps the most complex and important piece of the puzzle: how governments around the globe are addressing the digitization of money and how these regulations might spur or dampen future growth of companies betting on a strong digital economic future.

Can a government ban cash?

Can governments ban cash? The short answer: They can certainly try. And whether you think attempts to regulate or ban cash are examples of big government run amok or bold attempts to curb tax evasion and black market activities, it's important to recognize that some governments have already tried an outright ban on currency notes. While these attempts have been rare, less drastic regulations surrounding the use of currency notes and bills are more common. Paying attention to these developments in different areas of the world can help investors identify places where there may be opportunity.

Countries in northern Europe are moving most rapidly toward cashless societies, and while most of the movement is driven by consumers and industry, governments are also playing a role in the end of paper money.

In Sweden, merchants are allowed to legally reject cash, with "No cash accepted" signs sprouting up around the country. More than half of all banks in the country do not accept cash deposits or even keep currency on hand. Denmark's Chamber of Commerce recommended a similar law, permitting Danish retailers to reject cash, but the law was rejected by the country's parliament. The Norwegian Conservative political party championed the notion for Norway to become a cashless society by 2030.

Closer to home, former U.S. Treasury Secretary Larry Summers argued that banning high denominations of cash, such as the $100 bill, would go a long way toward stamping out black market activities, including drug dealing and terrorism. While not government-related, Visa incentizes domestic merchants with $10,000 in rewards for ceasing cash acceptance.

However, these moves pale next to India's sudden -- and what many described as reckless -- move to ban the 500 and 1,000 rupee bills in November 2016. These currency notes had been the country's two most widely used. The unexpected announcement caused mad rushes to exchange and deposit the notes and temporarily disrupted much of the emerging country's economy. While it is doubtful that the original goals of hindering illegal activities and rampant tax evasion were met, the move did jump-start India's electronic and digital payment ecosystem.

In Visa's 2018 third-quarter conference call, CEO Al Kelly touted the company's 20% payment volume growth and control of 50% of the market place. In 2017, Paytm's payment volume quadrupled as the digital wallet user base exploded.

The positives of a cashless society

Society can benefit from the rise of digital and electronic payments at the expense of physical currency in many ways.

Consumers benefit from the security and convenience that credit cards and other forms of digital payments provide. After all, unlike most other methods of payment, once cash is taken and the bad guy gets away, there is no institutional recourse for the victim. The money is gone, unlikely to ever come back. With credit cards, American consumers are given much greater legal protection and can only be held liable for $50 if they have been victims of fraud or theft.

Non-cash payments are also much more convenient. Frank McNamara discovered this lesson when he took clients out to dinner in New York City in the late 1940s and discovered, to his horror, that he did not have cash to pay for the meal. His wife bailed him out of an embarrassing situation by arriving to foot the bill. The circumstance made McNamara think of a way for customers to pay for what they could actually afford, but not with the money they had on hand. His solution was the Diners Club card, a charge card that could be used at participating restaurants and hotels. A plastic payment revolution was born. Consumers loved not having to carry large amounts of cash to make their purchases.

There are also benefits for merchants in removing cash from transactions. Studies show consumers are willing to spend more and are less sensitive to price when they use a credit card than with cash, which means retailers can charge more for products and services when they accept cards as a means for payment.

Security is also an issue for businesses. There are costs to keeping money safe, such as on-site safes and secure transportation from the business location to the bank. Cash exposes businesses to the possibility of embezzlement, theft, and robberies. Accounting for this security can be both expensive and taxing. In fact, some studies suggest the use of cash costs a society as much as 1.5% of its GDP.

Governments have incentives to push for a cashless society. Law bodies are the ones introducing these laws and regulations to ban cash. Ending the use of cash in society curbs fraud because there's no room for fudging numbers when all payments are electronic, whether it be citizens or employers trying to dodge taxes or businesses trying to inflate revenue.

Cash is anonymous and largely traceless, making it ideal for negotiating illegal transactions, which, of course, the government has an interest in stopping.

Former Treasury Secretary Larry Summers is one of many who have argued cash is a boon to criminal activity. As he wrote in The Washington Post, "[I]llicit activities are facilitated when a million dollars weighs 2.2 pounds as with the 500 euro note rather than more than 50 pounds as would be the case if the $20 bill was the high denomination note." He concluded that "a moratorium on printing new high denomination notes would make the world a better place."

The negatives of banning cash

Some of the very characteristics that can make cash problematic are also reasons why it's so useful and integral to our society.

Cash is private, so using it makes keeps your transactions safe from surveillance. It's extremely difficult for others to see how you're spending your money, from nosy family members, as well as third parties, like your bank, credit card company, or credit rating agency. If you only use cash, you won't be at risk of having your account drained by a criminal or hacker who gets ahold of your information.

Then there's a sticky issue of how to determine the limits of what government should be trusted to track. Many believe this is the real reason behind government attempts to restrict the use of cash, including Steve Forbes who wrote in response to Summers, "The real reason for this war on cash ... is an ugly power grab by Big Government."

In an age where data breaches are virtually an everyday occurrence and big tech companies know us better than we know ourselves, it is easy to see why concerns about privacy and personal security are paramount.

London-based security company G4S issued a Global Cash Report, in which its CEO Jesus Rosano summed up cash's attractive qualities: "People trust cash; it's free to use and readily available for consumers, it's confidential, it can't be hacked and it doesn't run out of battery power -- these unique qualities continue to hold significant value to people living on all continents."

Finally, some people say that refusing to accept cash is a form of discrimination against people who are the least well-off economically.

In 2014, the Office of the Inspector General stated that about one-quarter of the country's adult population lived outside the "financial mainstream," which the report defined as either not having a bank account or having to use expensive services such as payday lenders. Many low-income earners don't have the same kind of access to financial institutions as the average person, for an array of different reasons.

After some New York City restaurants, such as Sweetgreen and Dig Inn, decided to stop accepting cash for payment, legislation was introduced to penalize such behavior with a fine, on the premise that it discriminated against the city's financially underserved. According to New York City Councilman Richie Torres, "We should not be stigmatizing how poor people purchase goods and services."

How to profit from the war on cash

These complicated trade-offs are what free societies must wrestle with. Ultimately, people will come down on opposite sides of the issue and make different decisions concerning how to handle their own personal transactions. Either way, it's undeniable that the use of electronic and digital payments is growing rapidly around the world.

In 2011, Mastercard released a study claiming that cash was still used as a payment method in 85% of the transactions facilitated around the world and good for about 60% of total retail transaction value. Six years later, at Mastercard's 2017 investor day, CEO Ajay Banga said that cash was now being used in about 80% of the world's transactions. In other words, while the use of digital and electronic payment methods is rising, there's still a long runway of growth.

There are several options for investors to consider as they explore how they can best position their portfolios to take advantage of these changing consumer habits while avoiding risk from potential regulations.

American Express is finally taking its digital presence seriously, partnering with PayPal Holdings and acquiring two fintech start-ups, an AI-powered concierge app called Mezi, and Cake, a mobile payments solutions app. Amex is also increasing its merchant coverage, meaning its cardholders can use it in a growing number of places, boosting an important revenue stream.

Discover Financial Services (NYSE:DFS) is being led by a new CEO who appears committed to maintaining the company's legacy of world-class customer service. Discover also has a major presence in the studentand personal loan space, making it one of the few domestic companies with a presence in lending and payments. With a P/E ratio well under the market's average, it might also feature the most attractive valuation of all the stocks we will consider.

Brazilian payments company PagSeguro Digital is showing torrid revenue growth, but margin pressure, or the company's ability to profitably offer its services without lowering its price, has kept the stock price down.

Tencent's payment platforms now boast an incredible 800 million monthly active users but is being held back due to regulatory concerns surrounding its video game business.

But while these companies all might offer investors market-beating returns, I don't believe they are all necessarily best-in-class.

What are the top investments for a cashless society?

Here are the five best ways for investors to profit from this cashless movement:

1. Alibaba Group Holding

Alibaba makes this list due to its 33% stake in Ant Financial, the fintech juggernaut responsible for Alipay and consortium of other financial services including Ant Fortune, MYbank, and Zhima Credit. In Alibaba's 2018 Q3, Ant Financial boasted 700 million active users in China, a number made all the more staggering since 70% of its user base used at least three of its services.

Ant Fortune is a mobile app that allows users to invest in a variety of Chinese investment vehicles, usually commission-free. MYbank is a cloud-based online banking platform for small businesses in China, where only approximately 14% have access to banking services such as loans and credit. Zhima Credit is a private credit platform that essentially generates credit scores for Chinese consumers who opt to use its services.

CEO Daniel Zhang shared the company's long-term goals in his 2018 letter to shareholders:

Looking ahead, our vision is to deliver digital transformation for all our clients using cloud-computing technology in the areas of retail, marketing, finance, logistics and other supporting services within the Alibaba Operating System. Globalization has always been Alibaba's longterm strategy. We are making progress toward our goal to realize 'global buy,' 'global sell,' 'global delivery,' 'global travel' and 'global pay.' This will ultimately create one truly globalized digital economy where goods can move freely around the world, and not just from China to the world.

Alibaba's intentions to reshape finance and enable a cloud-based, global payments platform make the company a particularly compelling fintech investment for an economy moving away from the use of cash. With a massive base of 700 million members, there's a decent-sized chance Alibaba is a huge catalyst toward a universal payments and e-commerce platform.

2. Mastercard

Mastercard essentially acts as a toll road for consumers' money, taking a small cut every time it moves funds from consumers' bank accounts to merchants' accounts when a purchase is made. For all intents and purposes, in the Western world, Mastercard operates as one part of a duopoly with Visa as a payments network. It currently has about 2.5 billion cards issued across the globe and its products facilitate nearly 20 billion transactions every quarter.

Its business model necessitates partnerships with banks and other financial institutions. Mastercard does not directly lend money to consumers. That responsibility falls on the shoulders of its banking partners, so Mastercard is not liable for the massive amounts of credit card loans held by its cardholders. While this also means Mastercard does not collect interest on these loans, the underlying results is that it runs an extremely asset-light business model, one with an envy-inducing non-GAAP operating margin of 59.4%, according to its most recent earnings presentation.

This high operating margin allows Mastercard to return money to shareholders by repurchasing shares and issuing dividends, while investing in complementary services that it can upsell to existing clients. These bundled services include features and products ranging from data analytics and reward program management to fraud prevention tools and digital services. Accounted for in its "other revenues" segment, these services have maintained a double-digit growth rate for several consecutive quarters and are becoming an increasingly larger revenue stream for the company.

Beyond adding to the company's top and bottom lines, these services make Mastercard's relationship with its clients much stickier, meaning it's harder for its partnering banks and credit unions to leave Mastercard for a competitor if the client relies on Mastercard for other services.

3. PayPal Holdings

The best way to think of PayPal might be as an operating system for money. From its digital wallet platform, account holders can send money to friends, make quick and secure online purchases, or transfer money to different accounts.

The company is benefiting from society's move away from cash, not the least of which is manifested by the growth in mobile payments, transactions facilitated with a mobile device. Judging by its growing 250 million-plus active account user base, PayPal is beginning to develop a real network effectmoat, meaning PayPal's service becomes more valuable the larger its platform grows. As more consumers sign on to PayPal's service, the more compelling it is for merchants to accept PayPal as a payment method. Furthermore, the more merchants that accept PayPal, the more consumers can use the platform.

CEO Dan Schulman acknowledged the company was enjoying significant tailwinds from the move to a cashless society and mobile commerce. In the company's 2017 fourth-quarter conference call, he said, "We are riding powerful and accelerating tailwinds created by 2 global trends, the digitization of cash and the mass adoption of mobile devices. We are actively positioning ourselves to take full advantage of these trends and strategically moving our business into areas where we believe these transformations are creating the strongest opportunities."

Mobile payment volume represents 40% of PayPal's total payment volume, and the segment is quickly growing.

A huge driver of PayPal's mobile success is its One Touch platform, where users can make transactions with one click on a registered device. This removes the hassle of entering cumbersome and tedious information into a small smartphone screen with each purchase. It's also more secure, as users are not leaving their personal identification and payments information on different websites, but instead giving it out as tokenized data through PayPal.

Merchants love the platform because shoppers who use PayPal are much more likely to finalize a purchase compared to those who use other payment methods. One Touch has more than 100 million consumers and 10 million merchants participating on the platform.

4. Square

Square was founded by Twitter's CEO Jack Dorsey who developed the concept after a friend had a hard time selling a piece of art because he didn't have the ability to accept credit cards as payment. Square released its first product, a small square-shaped device that plugs into a mobile device, enabling any person with a cell phone to accept payments from credit and debit cards. Merchants began using these at the point-of-sale and the company soon expanded its suite of offerings.

The product effectively democratized payments, enabling small businesses -- think food trucks, farmer market vendors, etc. -- to cheaply accept card payments for the first time. Square's quarterly gross payment volume (GPV), the total amount of money facilitated through Square's point-of-sale system, is now $22.5 billion, and has grown between 29% to 31% year over year for five consecutive quarters.

Square's products for sellers have grown to include a robust suite of productsfor small businesses that were traditionally only available to larger retailers. This ecosystem differentiates Square form its payment processing peers because it gives it a deeper relationship with its merchants rather than just a vendor offering a commoditized service like cash registers. This subscription and services-based revenue segment has show explosive growth, with sales even eclipsing a triple-digit growth rate year over year in recent quarters.

Square's products are also beginning to appeal to larger businesses. In the company's 2018 third quarter, businesses with annualized payment volume over $500,000 represented 24% of Square's customer base, up from just 16% two years before. There is also evidence that many of Square's sellers are growing within its ecosystem, a good indicator of future success for Square. More than 40% of Square's large sellers (defined as having GPV between $125,000 to $500,000) started off as micro sellers (less than $125,000 in GPV) on the company's payments platform.

5. Visa

Sporting a near identical business model to Mastercard, Visa's network provides fast and safe transport for funds from a consumer to a merchant bank account after transactions. It does not lend money to its card holders, meaning that it also features an asset-light business model with an operating margin that even tops Mastercard's. In 2018, the fiscal year's adjusted operating margin came in at 66%.

Visa's management team sees the greenest pastures for future growth in developing economies, where local currency notes are still used more than other forms of digital and electronic payment methods. In the company's 2018 third-quarter conference call, CEO Al Kelly said:

As I look at our business ... over the next number of years, the bulk of our growth is going to come from overseas. It's something we're putting a lot of time and attention too. I've personally spent a lot of my personal time overseas. So, I think you're going to continue to see us invest in these markets. The cash displacement opportunity is great.

One of the company's greatest opportunities is in India, where the company enjoys a more than 50% market share. Visa recently renewed deals with five of the country's largest banks. Kelly said he was "confident that these deals contribute to further strengthening of our market leadership position across debit and credit products" in the country.

Investments making a cashless society possible

Alibaba, Mastercard, PayPal, Square, and Visa represent the purest ways to invest in the digitization of money. What makes these investments particularly compelling is that they are not passively benefiting from society's move toward digital and electronic payments but are actively driving that change.

Alibaba's Alipay and PayPal's core platform and Venmo, make it easier than ever for consumers to use their mobile devices to manage their money and facilitate transactions tp merchants but also between friends, families, roommates, coworkers, and classmates. Merchants love the platforms because it helps them complete more online sales.

Mastercard and Visa make it quick and safe to transfer money across digital and electronic channels. E-commerce would not resemble anything like its current state without these networks and the security and protection they provide to consumers and merchants.

Finally, Square makes it possible for small businesses to participate in the digital economy. Before Square, small merchants relied on the use of cash to sell their wares. Now it is easy for these sellers to make sales by accepting credit and debit card payments without expensive hardware or even a landline necessary.

With these positions in your portfolio, you'll be set to cash in on a cashless world.

This article originally appeared in the Motley Fool.

Matthew Cochrane owns shares of Mastercard, PayPal Holdings, and Square. The Motley Fool owns shares of and recommends Mastercard, PayPal Holdings, Square, and Tencent Holdings. The Motley Fool owns shares of Visa and has the following options: short January 2019 $82 calls on PayPal Holdings and short January 2019 $80 calls on Square. The Motley Fool recommends PagSeguro Digital. The Motley Fool has a disclosure policy.