What happened

After slowing down on Tuesday, shares of Rivian (RIVN 6.10%) resumed their rise today. The electric pickup manufacturer didn't have news to report itself, but the news of an electric vehicle (EV) peer, Lucid (NASDAQ: LCID), and the memory of an analyst's recent bullish commentary helped to buoy the stock higher.

While the S&P 500 rose 0.7%, shares of Rivian ended today's trading session 4.3% higher and continued climbing higher in after-hours trading as of 4:25 p.m. ET.

So what

Falling short of analysts' estimates, Lucid reported second-quarter vehicle production and delivery figures today that failed to put a charge in investors' spirits. Lucid suffered a quarter-over-quarter decline in vehicle production from 2,314 vehicles in Q1 to 2,173 in Q2. Vehicle deliveries also fell -- albeit nominally -- from 1,406 vehicles in Q1 to 1,404 vehicles in Q2.

At the start of Q2, Lucid projected that it would achieve vehicle production over 10,000 for 2023 -- a figure that investors may be doubtful of after the company has reported vehicle production of 4,487 through the first half of the year.

On Monday, an analyst from Barclays raised the price target on Rivian's stock to $30 from $22. With shares of Rivian closing at $24.85 on Tuesday after its sell-off yesterday, the $30 price target represented potential upside of 21%. It's likely that those investors who had been cautious about taking a ride with shares of Rivian after its recent rise chose to park the EV stock in their portfolio today.

Now what

Juxtaposed with Lucid's disappointing vehicle production and delivery figures, Rivian may have seemed a lot more alluring in investors' eyes today. Rivian reported strong vehicle production and delivery figures earlier this month, suggesting to growth investors that it may be the more compelling EV stock at the moment.

Basing investment choices on such narrow data points as a company's performance in an individual quarter is a risky strategy. Instead, investors should always do their due diligence and investigate the company thoroughly, including its financials, before choosing to buy or sell shares.