Shares of the electric vehicle (EV) maker Rivian Automotive (RIVN -7.26%) accelerated this week after the company announced a new joint venture with Volkswagen, which gives Rivian an initial $1 billion in cash.

That was the main headline for Rivian this week, but the company's stock also benefited from an analyst initiating coverage of Rivian's stock and slapping a buy rating on it.

The combined news put Rivian's stock into fifth gear, rising 40.2% as of Thursday afternoon, according to data provided by S&P Global Market Intelligence

New cash and opportunities

Rivian's joint venture with VW serves two purposes: It gives the company an immediate (and substantial) cash infusion and helps it reduce costs. Both are very important to the EV start-up right now.

VW and Rivian will work together on software for their respective vehicles -- a Rivian strong suit -- and Rivian receives an immediate cash injection of $1 billion. Additional investments will come from VW to Rivian through the joint venture, with an expected deal size of $5 billion.

Not only will this help Rivian's cash issues right now -- the company reported a net loss of $5.4 billion last year -- but Rivian leadership also said the deal will help lower costs for future vehicles by spreading out software costs across more vehicles.

Investors celebrated that news by pushing Rivian's stock up later in the week, but they were also optimistic after Guggenheim analyst Ronald Jewsikow initiated coverage of the EV stock earlier in the week. Jewsikow put a buy rating on Rivian, with an $18 price target.

Where Rivian goes from here

Rivian still has a long road ahead as it competes in an increasingly competitive EV market. But the company's leadership reiterated at its Investor Day presentation this week that it's targeting gross profit for vehicles by the end of this year.

Rivian initiated a series of cost-cutting measures recently, including reengineering some of the parts in its vans and vehicles to reduce costs by up to 35%.

With its newly acquired pile of cash, the potential to lower costs through the joint venture, and the company's current cost-cutting measures, Rivian appears to be on the right track toward vehicle profitability.