Tesla factory, Fremont, Calif.
Tesla workers examine a Model S used for training and tool calibration at the company's factory in Fremont, California, June 22, 2012. Since then, Tesla has more than doubled capacity. Reuters/Noah Berger

An analyst at Stifel Nicolaus upgraded shares of Tesla Motors on Tuesday, advising clients to buy at a price target of $400. He said the company (NASDAQ:TSLA) has carved out an electric-car-market niche that it can defend. Here are some of the highlights of the note, by analyst James Albertine, with a hat tip to StreetInsider.com:

TSLA appears to have carved out a defensible niche in the global market for luxury electric vehicles, and based on our recent tour of the Fremont, CA, facility, a sizable head start with respect to production.

We believe TSLA is likely to further defend its already multi-year branding/production advantage relative to OEM peers chasing luxury EV share, and TSLA's Gigafactory will only augment its implicit battery cost advantage.

We recently hosted a tour of TSLA's production facility in Fremont, CA, where it appeared the company remains on track (if not ahead of plan) to achieving a 1,000 unit per week production rate by year-end 2014.

Given the pace at which production is ramping and the fact TSLA has only recently entered the EU and Asian markets, we are incrementally confident in management's ability to leverage its brand advantage globally over the next 2-3 years.

We are raising our 2017 EPS estimate to $8.28 vs. $6.14 prior, primarily driven by (a) increased Model X pricing assumptions (now a $5-10k premium to Model S vs. a $10k discount prior), (b) modestly increased Model S/X output (111k S/X units delivered in 2017 vs. 98k prior), (c) 33% non-GAAP gross margin (vs. 30% prior), and (d) R&D expenses running at 10% of sales (vs. 9% prior) and SG&A expenses at 12% of sales (vs. 11% prior).

TSLA sentiment is like a freight train, in our view, benefiting from a well manicured growth story that has caught the eye of a much broader investor base relative to most auto stocks. TSLA has positioned itself as the smart vehicle of the future, with a glimpse into smart purchasing and smart infrastructure. TSLA has captivated a global audience, some of whom have lost interest in distinguishing horsepower ratings among the dozens of $100k-plus luxury vehicles, others that would have never considered spending six-figures on anything but a house.