The stock market may still be taking investors for a wild ride, but great companies are adjusting to the challenges of the current macro environment and proving their mettle in the process. While market turbulence may continue for the near term, that doesn't mean you should stop investing. 

If you have the cash on hand to put into stocks -- money that you won't need for several years at least or that you don't need to put toward bills or other financial obligations -- there is no shortage of companies begging to be bought. Here are two names to consider for your portfolio right now.

1. Amazon

Amazon (AMZN 0.80%) shares have rocketed by about 48% since the start of 2023 following a series of strong market days and a return to profitability. It's worth pointing out that the main reason Amazon was unprofitable last year was because of its stock investment in Rivian Automotive, which plummeted significantly over the last 12 to 16 months, rather than a specific operational concern. 

Many companies across the tech space and other industries are looking to reduce costs and Amazon is no exception. It's laid off thousands of workers in recent months, although these reductions still represent a relatively small percentage of its overall workforce. Against this backdrop, Amazon is growing net sales steadily due to the continued strength of its core businesses, it's profitable again, and it has a ton of cash on its balance sheet. 

Overall net sales popped 9% in the first three months of 2023, to $127 billion. Of that total, $51 billion was derived from its online retail business, while $30 billion came from third-party seller services and $21 billion came from its cloud computing business, Amazon Web Services.

Subscription services such as Amazon Prime also remain a notable driver of the company's financial performance. Sales from subscription services totaled just shy of $10 billion in the first three months of 2023.  

Amazon delivered a profit of $3.2 billion in the first quarter, while closing out the period with a whopping $64 billion in cash and investments on its balance sheet. Roughly 14% of all e-commerce sales globally are generated on Amazon's platform. And 32% of all revenue from cloud infrastructure services worldwide is attributable to Amazon Web Services. This household name business continues to prove that its longevity is as impressive as its moat. For long-term investors, there's still plenty to love about this top tech stock.  

2. Shopify

Shopify (SHOP 3.42%) is trading up by nearly 80% since the start of 2023, as improvements in operational efficiency and a surprise first-quarter profit seem to have reawakened enthusiasm about this stock from some investors.

In a surprise move earlier this year, Shopify announced that it would be selling its logistics business -- which it just expanded last summer with the acquisition of Deliverr -- to its long-standing partner and new preferred logistics provider, Flexport. 

The move was well received by investors, although it may have seemed like something of an about-face from its prior efforts to expand its logistics capabilities.

However, consider that Shopify's business has always revolved around providing premium software to fuel the e-commerce industry. Moving back toward this more asset-light model seems like a wise move, especially since merchants will still have access to premium fulfillment solutions they need to make their businesses run smoothly. 

Meanwhile, brands of all sizes, including well-known names, are continuing to see the value in Shopify's platform and tools to expand their businesses. Lululemon Studio, Kendall Jenner's 818 Tequila brand, and Mary-Kate and Ashley Olsen's celebrity favorite clothing label The Row are just a handful of recent examples of companies that launched on Shopify.  

It's also interesting to see how brands are tapping into Shopify's suite of services both online and offline. Management said that Shopify's offline gross merchandise volume (GMV) rose 31% in the first quarter from the year-ago period. That's double the growth rate that total GMV clocked in the three-month period.

Overall GMV totaled $50 billion, up 15% year over year, while total revenue jumped 25% to $1.5 billion. Shopify also pulled in a $68 million profit in the quarter.

Although pandemic-level growth rates may not be realistic to expect, these steady financial gains and the broad adoption of this e-commerce stock's hardware and software offerings could create a notable buying opportunity for long-term investors.