Right now, there's a conundrum in the stock market. And if you can look beyond investor sentiment at the truth behind this puzzle, you could stand to profit.

Both Apple (AAPL) and Amazon (AMZN) released quarterly reports last week. According to Apple's results, the company is faced with a dwindling market share and shrinking margins. This should send up a red flag for investors, warning them to get out fast. But instead, investors are falling over themselves to grab more shares, sending shares of the Cupertino, Calif.-based company higher.

Apple is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. See how Cramer rates the stock here. Want to be alerted before Cramer buys or sells AAPL? Learn more now.

On the other hand, Amazon reported its seventh consecutive quarter of profits, along with soaring revenue. Meanwhile, new research shows the company is responsible for 53% of all online sales growth in the U.S. But investors apparently can't wait to dump their shares of this e-commerce behemoth.

Clearly, something is wrong here.

My guess is that it has to do with the "church of Apple." Apple's fans and investors are like a cult, so enamored with the company that they don't read behind the lines in the company's earnings report.

Yes, Apple sold 5% more iPhones year over year. But there's more than meets the eye here.

Apple has pulled off a sleight of hand, changing the day count for the latest quarter by adding an extra week. That means some of those extra iPhone sales came from added days.

Apple's got other troubles, as well. The gross margin was 38.5% in the latest quarter, down from 40.1% a year earlier. So while more iPhones and other gadgets were sold, the company's gross margin actually fell by 2.6 percentage points.

Perhaps Apple would do well by not picking fights with -- or even suing -- its suppliers, including Samsung Electronics, Qualcomm  (QCOM) and Foxconn Technology.

But it gets worse. China is the world's largest cellphone market. Yet, here Apple recorded a 12% drop in sales for the quarter. The company's China market share has fallen to 9.6%. Meanwhile, Chinese smartphone makers Oppo, Huawei and Vivo each had better year-over-year performance than Apple during the fourth quarter.

Moreover, worldwide, Apple is losing its market share, with only 11.5% of global cellphone users using Apple's iOS.

Investors should be wary of Apple's faltering business.

On the other hand, we have Amazon, which recorded revenue growth of 22% and a profit of $749 million in the most recent quarter. And there's plenty of value left for investors.

In the U.S., 43% of all online retail sales were made through its e-commerce platform. That means 43 cents of every dollar spent online went to Amazon.

And the company keeps grabbing new markets. Amazon's cloud operations saw revenue grow by more than 47%, while its competitors are struggling to lower their costs.

Then there's the virtual assistant business. Currently, more than 11 million Alexa devices have been sold, placing the company way ahead of Alphabet  (GOOGL) and Apple in this space. Amazon will also start bringing its assistant to cars, having inked deals with General Motors  (GM) and Ford Motor (F) .

Alphabet is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. See how Cramer rates the stock here. Want to be alerted before Cramer buys or sells GOOGL? Learn more now.

Whereas Apple is spending billions on a new "spaceship" campus that certainly will never fly, Amazon is building an air cargo hub near its mega distribution center in Kentucky that will better facilitate the delivery of its goods. And that's on top of the company's new ocean freight business that has recently made headlines.

Amazon itself has little to fear from competitors right now. Yes, Walmart  (WMT) did buy Jet.com and is offering free shipping for some online items if you spend more than $35, but it's still not on the same level as Amazon's Prime.

Apple's big trouble is a lack of "the next big thing," but Amazon is constantly trying things that may well take on that mantle.

Apple makes phones that some people like. But the company's practice of hording cash isn't the best way to build future value.

Amazon may spend more cash, but that brings more opportunity to this blockbuster company and its investors.

Here's Why Amazon is more than just an online retailer:

---

As I've just explained, Apple is no bargain investment bet now while Amazon might be. But if you're looking for other growth opportunities, we've found a genius trader who turned $50,000 into $5 million by using his proprietary trading method. For a limited time, he's guaranteeing you $67,548 per year in profitable trades if you follow his simple step-by-step process. Click here now for details.

The author is an independent contributor who at the time of publication owned none of the stocks mentioned.

More from Stocks

Economist Perspective: Why 2019 Will Be Different?

Economist Perspective: Why 2019 Will Be Different?

GE Gains on Plans to Reduce Stake in Baker Hughes

GE Gains on Plans to Reduce Stake in Baker Hughes

Dow Ends Lower, Nasdaq Finishes Flat in Seesaw Trading

Dow Ends Lower, Nasdaq Finishes Flat in Seesaw Trading

Cisco Reports Earnings on Wednesday: 7 Important Things to Watch

Cisco Reports Earnings on Wednesday: 7 Important Things to Watch

Tesla Takes Another Step Toward Launching the Model 3 in Europe

Tesla Takes Another Step Toward Launching the Model 3 in Europe