Tesla spent the highest amount on research and development in 2018.

The electric carmaker’s R&D expenditure is falling at a time when legacy auto manufacturers are spending more.

Tesla’s technological edge in electric and autonomous vehicles is now at risk.

Tesla (NASDAQ:TSLA) will announce its second-quarter results on July 23 as the quarterly earnings season heats up. The consensus from Wall Street suggests a loss for the June quarter is imminent. There is a slim chance that the electric vehicle (EV) maker could surprise markets with a profit, though.

A profitable Q2 would mark the fourth consecutive quarter that Tesla is in the black. Consistent quarterly profits will likely pave the way for Tesla’s entry into the S&P 500 index.

The three consecutive profitable quarters achieved so far have come from a combination of factors–growing economies of scale, financial engineering, and cost-cutting.

Is Tesla about to lose its competitive edge?

Despite rising revenues, Tesla has been allocating lower amounts to research and development.

If the trend over the past two years is anything to go by, expect another decline in R&D spending.

In dollar amounts, Tesla’s R&D expenses reached a peak in 2018 when the electric carmaker spent $1.46 billion. Since then, the amount has been on a downward trend.

Elon Musk’s self-defeating R&D cuts

Last year, Tesla’s R&D spending fell by 8.01% compared to 2018. Since then, the declines have continued.

During the quarter that ended March, its R&D spending over the past 12 months fell 7.39% annually.

While three consecutive profitable quarters have been a source of joy for many investors, it’s coming at the expense of R&D. That could spell trouble for Tesla down the road.

Tesla’s R&D spending is, unfortunately, falling at a time when rivals are allocating outsized amounts to developing new products and services. Investors who have longed Tesla for its technological edge now have reason to fret.

GM, Volkswagen, Toyota all accelerating EV goals

Last year, Volkswagen increased its spending on EV and autonomous vehicle technologies by 36%. Over five years, Volkswagen will spend $66 billion–about $13.2 billion per year.

Toyota’s R&D budget for the 2020 fiscal year is about $12.6 billion. General Motors (NYSE:GM) typically spends between 4% to 6% of its revenues on R&D. Over the past seven years, this has averaged around $7.4 billion annually.

Tesla’s R&D expenses-to-revenue ratio has been falling as sales rise. In percentage terms, Tesla’s R&D-expenses-to-revenue ratio is now around the average for automakers. Since Tesla’s revenues are only a fraction of its biggest threats, the gap is wide.

R&D spend alone does not translate into a technological advantage for Tesla, but when significant rivals are outspending Elon Musk by at least five times, there’s reason to worry.

Legacy carmakers should look at Tesla’s R&D reductions favorably, as it makes their goal of catching up to Elon Musk much easier.

Disclaimer: This article represents the author’s opinion and should not be considered investment or trading advice from CCN.com. Unless otherwise noted, the author has no position in any of the stocks mentioned.