Analyze Stocks in Claude: Turn AI Research into a Live Excel Workbook (2026)

In this article

To analyze stocks in Claude with current numbers, connect Claude to a market data source, because the model on its own has no live price feed and may quote stale figures from its training data. MarketXLS runs an MCP (Model Context Protocol) server that lets Claude call MarketXLS financial functions during a conversation, so it can fetch a price, ratio or moving average instead of estimating one. For a record you can audit and refresh, this guide also provides a free six-sheet Excel workbook in which every figure is a MarketXLS formula, such as =PERatio("MSFT") or =OperatingMargin("MSFT").

See it in actionMarketXLS video

Try it in your own spreadsheet

Get the free MarketXLS sample workbook (.xlsx).

No account needed. MarketXLS live data requires a paid plan. Preview workbook

Explore more videos
Analyze stocks in Claude workflow rebuilt as a live Excel workbook with MarketXLS formulas for valuation, financial health, technicals, and peer comparison

MarketXLS access: Downloading a workbook does not include live data access. Refreshing MarketXLS formulas requires a paid MarketXLS subscription.

The sections below cover what Claude does well and where it breaks, how the MCP connection works, the research checklist, the workbook sheet by sheet, and a workflow that uses both.

Analyze Stocks in Claude: What the Model Does Well and Where It Breaks

Claude is good at reasoning and explanation but unreliable as a raw data source. Used well, Claude is an excellent thinking partner for equity research. It explains concepts clearly, structures a checklist, and stress-tests an argument. Used as a raw data source, any language model is unreliable in ways that matter when real money is involved, because it does not inherently know today's price.

TaskClaude AloneClaude + Live Excel Workbook
Explain a metric (what is PEG?)StrongStrong, plus the live value next to it
Draft a research frameworkStrongStrong, and the framework is already built
Quote today's exact priceWeak (may be stale or estimated)Live via =QM_Last("MSFT")
Pull the current P/E ratioWeak (often outdated)Live via =PERatio("MSFT")
Compare eight peers on ten metricsTedious, error proneOne table, all formulas
Refresh the analysis next quarterRetype the promptRecalculate the sheet

The pattern is clear. Claude is strong at reasoning and language, and weaker at knowing a number that changes every second. The fix is not to abandon the model. The fix is to give it a live data spine and to keep an auditable copy of every figure in Excel. That is exactly what the free template attached to this post does.

The Bridge: How MarketXLS Connects to Claude

There are two complementary ways to analyze stocks in Claude with real numbers.

The first is the Model Context Protocol, or MCP. MCP is an open standard that lets Claude call an external tool during a conversation. MarketXLS runs an MCP server that exposes hundreds of financial functions to Claude, so the model can fetch a live price, pull a ratio, or compare a watchlist without leaving the chat. The server endpoint is:

https://connect.mcp.marketxls.com/mcp

Once connected, you can ask Claude in plain English:

  • "What is the current price and P/E of MSFT?"
  • "Compare the operating margins of MSFT, GOOGL, and META."
  • "Pull the 50-day and 200-day moving averages for NVDA and tell me the trend."

Claude calls the MarketXLS functions behind the scenes and answers with live values instead of a best guess.

The second way is the workbook itself. The MCP conversation is fast and conversational, but chats are hard to save, re-run, and share with a compliance team. A spreadsheet is the durable artifact. The template in this post takes the same checklist Claude walks through and builds it in Excel with MarketXLS formulas, so you get a permanent, auditable record you can refresh on any ticker with one recalculation. In practice the best workflow uses both: let Claude reason and draft over MCP, then confirm and store every figure in the workbook.

The Research Checklist Claude Should Follow

A good stock analysis, whether written by a person or an AI, tends to answer the same five questions. The template is organized around them, one sheet per question, so the structure of the workbook matches the structure of a strong prompt.

  1. What is this company and what is it worth right now? Price, market cap, multiples, and a quick composite read.
  2. Is it expensive or cheap? Valuation multiples against a benchmark, plus simple fair-value scenarios.
  3. Is it a good business? Margins, returns on capital, leverage, and cash generation.
  4. What is the price doing? Trend and momentum from moving averages, RSI, and the 52-week range.
  5. How does it stack up against peers? A side-by-side table across a comparison set.

When you ask Claude to "analyze a stock," you are implicitly asking for these five answers. Making them explicit does two things: it gives the model a cleaner prompt to follow, and it gives you a checklist to verify its output against.

Sheet by Sheet: The Analyze Stocks in Claude Template

The workbook has six sheets. The static sample is pre-filled with an illustrative snapshot of Microsoft (MSFT) so you can see the layout immediately. The live template version replaces every value with a MarketXLS formula that updates when you type a new ticker into one yellow input cell. All numbers below are illustrative and for education only, not a recommendation about any security.

Sheet 1: How To Use

The first sheet is the manual. It lists what each of the other five sheets covers, the "as of" date for the sample snapshot, and the exact Claude prompt the workbook mirrors. It also spells out the philosophy: let the model draft the story, then verify every figure against a live formula before you trust it. The MarketXLS website and demo links live here too.

Sheet 2: Claude Scorecard (the Dashboard)

This is the command center. You type a ticker into a single yellow input cell, and the sheet returns a full snapshot: issuer name, sector, industry, last price, market cap, trailing P/E, EPS, revenue, dividend yield, operating margin, return on equity, debt to equity, and beta. Each row shows the value next to the exact MarketXLS formula that produced it, so the sheet doubles as a formula reference.

The core identity and pricing formulas are simple to read:

=Name("MSFT")                    ' Microsoft Corporation
=Sector("MSFT")                  ' Technology
=QM_Last("MSFT")                 ' Most recent traded price
=MarketCapitalization("MSFT")    ' Equity value in dollars
=PERatio("MSFT")                 ' Trailing 12-month P/E
=EarningsPerShare("MSFT")        ' Trailing EPS
=Revenue("MSFT")                 ' Trailing twelve-month revenue
=DividendYield("MSFT")           ' Trailing dividend yield

Formula documentation: Name, Sector, QM_Last, MarketCapitalization, PERatio, EarningsPerShare, Revenue, DividendYield

Below the snapshot sits a transparent, rules-based composite scorecard. It runs eight simple, visible checks, for example "operating margin above 20 percent" and "price above the 200-day moving average," and tallies how many pass. There is nothing hidden or magical about the score: every rule is written in plain English on the sheet, and you can change the thresholds to match your own framework. It is an educational checklist, not a buy or sell signal.

Sheet 3: Valuation Analysis

This sheet answers the "expensive or cheap" question. It compares the stock's multiples, P/E, forward P/E, PEG, EV/EBITDA, price to book, and price to sales, against a sector median you can edit, and color-codes each as a premium or a discount. A premium is not automatically bad and a discount is not automatically good, and the sheet says so; a high multiple often reflects a genuinely higher-quality business.

Underneath, a small fair-value block anchors three educational scenarios (bear, base, and bull) to different P/E assumptions and the company's EPS, then shows the implied price against the current price. In the live template the base case reads directly from the formulas:

=PERatio(B2)                     ' current trailing P/E
=EarningsPerShare(B2)            ' current trailing EPS
=CashFlowPerShare(B2)            ' for a price-to-cash-flow read

Formula documentation: PERatio, EarningsPerShare, CashFlowPerShare

There is also a Gordon Growth dividend discount sanity check for dividend payers. These are framing tools to structure a conversation with Claude, not price targets. The sheet labels every scenario as educational.

Sheet 4: Financial Health

Valuation tells you the price; this sheet tells you the quality of what you are buying. It lays out the margin profile (gross, operating, and net), returns on equity and assets, leverage, liquidity, and cash flow per share, and tags each reading as Strong, Average, or Caution against transparent thresholds. The live formulas are the workhorse fundamentals:

=OperatingMargin(B2)             ' operating income / revenue
=ReturnOnEquity(B2)              ' net income / shareholder equity
=TotalDebtToEquity(B2)           ' leverage
=CashFlowPerShare(B2)            ' cash generation per share
=Revenue(B2)                     ' trailing revenue

Formula documentation: OperatingMargin, ReturnOnEquity, TotalDebtToEquity, CashFlowPerShare, Revenue

A quality scorecard at the bottom counts how many of eight fundamental tests the company passes, mirroring the composite on the dashboard but focused purely on business quality rather than price.

Sheet 5: Technical Analysis

This sheet reads the tape. It pulls the last price, the 50-day and 200-day simple moving averages, RSI, and the 52-week high and low, then interprets each: is price above or below each moving average, is RSI overbought, oversold, or neutral, and how far is the stock from its yearly extremes. The formulas map one to one with the classic indicators:

=SimpleMovingAverage(B2,"50")    ' medium-term trend
=SimpleMovingAverage(B2,"200")   ' long-term trend
=RSI(B2)                         ' momentum oscillator
=FiftyTwoWeekHigh(B2)            ' upside reference
=FiftyTwoWeekLow(B2)             ' downside reference
=QM_GetHistory(B2)              ' full price history array

Formula documentation: SimpleMovingAverage, RSI, FiftyTwoWeekHigh, FiftyTwoWeekLow, QM_GetHistory

A signal summary condenses it into short-term trend, long-term trend, and momentum readings, so a technically-inclined prompt to Claude ("is MSFT in an uptrend and is momentum stretched?") has a factual, refreshable answer sitting right next to it.

Sheet 6: Peer Comparison

No stock is analyzed in a vacuum. This sheet lines the subject up against a peer set, mega-cap technology names in the sample, across last price, market cap, P/E, ROE, operating margin, dividend yield, and beta, then computes a peer average row. In the live template you simply type peer tickers into the yellow column and every metric fills in automatically:

=QM_Last(A4)                     ' peer last price
=PERatio(A4)                     ' peer P/E
=ReturnOnEquity(A4)              ' peer ROE
=OperatingMargin(A4)             ' peer operating margin
=Beta(A4)                        ' peer beta

Formula documentation: QM_Last, PERatio, ReturnOnEquity, OperatingMargin, Beta

Swap in your own comparison set and the whole table recalculates. This is the single most tedious task to do by hand or to trust an AI to eyeball, and it is where a formula-driven table earns its keep.

Two Files: Static Sample and Live Template

The workbook ships in two versions so you can start fast and then go live.

Download the templates:

  • - Pre-filled with an illustrative MSFT snapshot so you can see every sheet immediately. Each value shows the MarketXLS formula that would produce it live.
  • - Type any ticker into the yellow cell and the entire workbook recalculates with live formulas.

The sample is the lead magnet: open it and the whole framework is visible without any setup. The template is the working tool: it needs MarketXLS installed in Excel so the formulas can fetch live data. You can explore MarketXLS features here and book a demo if you want a walkthrough of the formula library.

A Practical Workflow: Claude and the Workbook Together

Here is how the pieces fit in a real research session.

  1. Draft with Claude. Ask the model to analyze your ticker using the five-question checklist above. Let it reason about the business, the risks, and the story. This is where the AI shines.
  2. Fetch live numbers over MCP. With the MarketXLS MCP server connected, ask Claude to pull the specific figures it referenced, price, P/E, margins, moving averages, so its narrative is grounded in current data rather than an estimate.
  3. Verify and store in Excel. Drop the ticker into the workbook's yellow cell. Every claim Claude made now has an auditable formula next to it. If a number disagrees with the model, trust the formula.
  4. Refresh on a schedule. Next week or next quarter, reopen the workbook, recalculate, and you have a fresh analysis with zero retyping. Feed the updated table back to Claude for a new written summary.

This division of labor plays to each tool's strength. Claude handles judgment and language. MarketXLS handles data and auditability. You keep control of the decision.

Why Auditability Matters More Than Ever

The appeal of asking an AI to analyze a stock is speed. The risk is a confident answer built on a number that is quietly wrong or out of date. When you are managing your own capital, or someone else's, "the model said so" is not a defensible process. A formula you can click on and trace back to a live data feed is.

That is the whole point of pairing Claude with MarketXLS. You are not choosing between the AI and the spreadsheet. You are using the AI to think faster and the spreadsheet to keep it honest. The result is a workflow that is both quick and accountable, which is exactly what serious research requires.

Frequently Asked Questions

Can Claude actually pull live stock prices on its own? Not by default. A language model does not have a live market feed; left alone it will estimate a price from its training data, which can be stale. To analyze stocks in Claude with real numbers you connect a data tool. The MarketXLS MCP server at https://connect.mcp.marketxls.com/mcp gives Claude live access to hundreds of financial functions during a conversation.

Do I need to know how to code to use this? No. Connecting the MarketXLS MCP server to Claude is a configuration step, not a programming task, and the Excel template uses ordinary spreadsheet formulas. If you can type a ticker into a cell, you can run the workbook.

How is this different from just asking Claude to analyze a stock? Claude alone gives you a well-written narrative with numbers you cannot verify or refresh. This approach keeps Claude's reasoning and adds a live, auditable data layer: every figure is a MarketXLS formula you can trace and recalculate. You get the speed of AI and the accountability of a spreadsheet.

Which stocks and metrics does the template support? Any US-listed stock or ETF that MarketXLS covers. The workbook pulls price, market cap, valuation multiples, margins, returns, leverage, dividends, moving averages, RSI, and the 52-week range, and the peer sheet compares any set of tickers you choose.

Is the analysis in the template investment advice? No. The composite scores and fair-value scenarios are transparent, educational checklists with visible rules you can edit. Nothing in the workbook is a buy or sell recommendation, and all sample values are illustrative.

Can I use the same workbook with other AI assistants? Yes. The Excel template is model-agnostic; the formulas work regardless of which assistant you use. MarketXLS also connects to other MCP-capable tools, so the same live-data-plus-audit pattern applies whether you prefer Claude or another assistant.

The Bottom Line

Analyze stocks in Claude and you get speed, structure, and clear writing, but not verifiable data. Analyze stocks in Excel with MarketXLS and you get verifiable data, but you write the narrative yourself. Put them together and each covers the other's weakness: Claude reasons and drafts, MarketXLS supplies live, auditable prices, ratios, margins, and technicals, and the six-sheet workbook keeps a permanent record you can refresh on any ticker. Download both files above, connect the MarketXLS MCP server to Claude, and turn a one-off AI answer into a repeatable research process.

Learn more at MarketXLS or book a demo to see the full formula library in action.

About the authors
Ankur

About Ankur

CEO & Founder, MarketXLS

Ankur is the CEO and founder of MarketXLS. He works with Anagh and Robin on the MarketXLS blog, creating articles together about market data and spreadsheet workflows.

Written collaboratively by Ankur, Anagh and Robin.

Important Disclaimer

The information provided in this article is for educational and informational purposes only and should not be construed as investment advice, a recommendation, or an offer to buy or sell any securities. MarketXLS is a financial data platform and is not a registered investment advisor, broker-dealer, or financial planner. Always conduct your own research and consult with a qualified financial professional before making any investment decisions. Past performance is not indicative of future results. Trading and investing involve substantial risk of loss.

Explore MarketXLS in Excel
Download a free sample workbook (.xlsx). MarketXLS is a paid subscription.

See MarketXLS in action

Bring this workflow into Excel.

Book a demo with our team to see how MarketXLS supports your market research.

Ankur
AnkurFounder & CEO, MarketXLS
Book a demo