stock-analyzer
git clone https://github.com/harnoorDev/stock-analyzer
git clone --depth=1 https://github.com/harnoorDev/stock-analyzer ~/.claude/skills/harnoordev-stock-analyzer-stock-analyzer
SKILL.mdStock Analyzer
A structured equity research skill that produces institutional-quality stock analysis grounded in real-time web data. The skill follows a 5-section framework: Foundation → Valuation → Risk → Technicals → Opinion.
Why every word matters
This skill informs real financial decisions. People may buy or sell securities based on its output. That creates two competing obligations:
- Be useful. Vague, hedge-everything analysis wastes the user's time and provides no value. The user came here for a view, not a disclaimer wrapped in fluff.
- Be honest about uncertainty. Never state something as fact when it's an inference. Never present a single data point as a trend. Never hide the bear case to make the bull case sound cleaner.
The solution: State your view clearly, show exactly what data supports it, and explicitly flag what could prove you wrong. That's more valuable than false neutrality.
Execution modes
Full analysis (default): User provides a ticker → run all 5 sections in order → produce chat summary + downloadable report.
Section-specific: User asks for a specific section (e.g., "run the risk analysis on AAOI", "what's the valuation look like for PLTR") → run only that section.
Article analysis: User pastes or uploads a bullish/bearish article → analyze what the author got right, what they missed, and whether it changes the thesis if prior research exists in the thread.
Disclaimer (MANDATORY — never skip)
Place this disclaimer at the very top of every response and at the bottom of every response, both in chat and in the downloadable report. Use this exact language:
Top disclaimer:
⚠️ This is AI-generated research for informational purposes only. It is NOT financial advice. I am not a licensed financial advisor, broker, or analyst. This analysis may contain errors, outdated information, or misinterpretations of financial data. Always verify critical data points independently and consult a qualified financial professional before making investment decisions. You are solely responsible for your own investment choices.
Bottom disclaimer:
⚠️ Reminder: This analysis is AI-generated and may contain errors. Do not make investment decisions based solely on this output. Verify all data independently. Past performance and current metrics do not guarantee future results.
Section 1: Research Foundation
This section grounds the analysis in verified, current data. Every claim must come from a web search.
1.1 Latest News & Earnings (3-5 searches)
Search for and report:
- The 3 most recent material news events (earnings, product launches, partnerships, regulatory actions)
- Most recent quarterly earnings: revenue, EPS (GAAP and non-GAAP), YoY growth, and any guidance updates
- Any guidance revisions or pre-announcements
Search targets: Yahoo Finance, company IR page, Reuters, Bloomberg, CNBC Search queries to use: "[TICKER] latest news", "[TICKER] earnings results [current year]", "[TICKER] revenue guidance"
1.2 Business Model Deep Dive (2-3 searches)
Explain in plain language:
- How the company makes money — core revenue streams, % breakdown if available
- What the product actually does (avoid jargon, explain like briefing a smart non-expert)
- Revenue model: recurring vs one-time, subscription vs transactional, hardware vs software mix
1.3 Moat & Competition (3-5 searches)
- Identify the top 3 competitors via web search (do NOT guess — search "[TICKER] competitors" and "[TICKER] competitive landscape")
- Assess whether the company has a durable competitive advantage: proprietary technology, patents, network effects, switching costs, scale, or regulatory moats
- For each competitor, note: relative size, market share if available, key differentiator
Save the identified competitors — they are used in Section 2 for the peer valuation table.
1.4 Catalysts — Next 12 Months (2-3 searches)
Identify the top 3 upcoming catalysts and rate each:
- Critical — if this slips or fails, the investment thesis breaks
- High — material impact on valuation or sentiment
- Strategic — longer-term optionality, not priced in yet
For each catalyst: what it is, expected timeline, and why it matters.
1.5 Earnings Transcript Summarization (2-4 searches)
Pull key insights from the most recent earnings call transcript. Search for the transcript on Seeking Alpha, Motley Fool, or the company's IR page.
Extract and summarize:
- Management tone: Confident, cautious, defensive, or evasive? Did the CEO hedge on guidance or speak with conviction? Note any change in tone vs prior quarters.
- Key quotes (paraphrased): The 2-3 most important statements from the call — guidance specifics, strategic pivots, or admissions of weakness. Paraphrase rather than quoting directly.
- Analyst Q&A highlights: What did analysts press on? What questions did management dodge or give vague answers to? Evasive answers on specific topics are often more revealing than the prepared remarks.
- Forward-looking signals: Any new product timelines, capacity targets, hiring plans, or partnership hints dropped during the call that aren't in the press release.
- Red flags in language: Watch for phrases like "challenging environment," "unexpected headwinds," "right-sizing," or sudden shifts from specific metrics to vague qualitative language.
Search queries: "[TICKER] earnings call transcript [quarter] [year]", "[TICKER] earnings call highlights"
Section 2: Valuation & Financials
Numbers are only meaningful relative to peers and history.
2.1 Peer Comparison Table (5-8 searches)
Using the competitors identified in Section 1.3, build a comparison table with:
| Metric | [TICKER] | Competitor 1 | Competitor 2 |
|---|---|---|---|
| P/S (TTM) | |||
| P/S (Forward) | |||
| EV/EBITDA | |||
| Gross Margin | |||
| YoY Revenue Growth | |||
| Value/Growth Score |
Value/Growth Score = P/S TTM ÷ YoY Revenue Growth %. Lower = more growth per valuation dollar. This is a simple revenue PEG ratio. Explain what the scores mean in context.
Search targets: Yahoo Finance, Macrotrends, company filings Search queries: "[TICKER] P/S ratio", "[TICKER] revenue growth", "[COMPETITOR] valuation metrics"
If the user specified competitors, use those instead of auto-identified ones.
2.2 Forward P/S (1-2 searches)
- Pull management's revenue guidance for next fiscal year
- Calculate forward P/S at today's market cap
- Compare to TTM P/S
- Explain what re-rating would occur if guidance is met
If forward P/S is significantly lower than TTM, note this but stress-test whether guidance is credible based on the company's historical guidance accuracy.
2.3 Rule of 40 (1-2 searches)
Calculate: Revenue Growth % + EBITDA Margin % for the most recent quarter. Note the trend over the last 2-4 quarters if data is available. Above 40 = strong. Below 40 = flag it but explain context (early growth companies often sacrifice margin).
2.4 Historical Valuation Range (1-2 searches)
Pull the 3-year P/S range: minimum, maximum, average. Where does the current P/S sit in that range?
- Near historical max → needs a new catalyst or narrative to justify
- Near historical min → ask why it's cheap and whether the discount is warranted
2.5 Insider Alignment (2-3 searches)
- Insider ownership % vs industry average
- Recent insider buys or sells (last 6 months)
- Stock-based compensation as % of revenue (from latest 10-K)
- Any active ATM (at-the-market) offering programs — this means ongoing dilution
2.6 Simplified DCF Sanity Check (2-3 searches)
Build a simplified discounted cash flow to sanity-check the current price. This is NOT a full-precision institutional DCF — it's a directional check to see if the market price implies reasonable or extreme growth assumptions.
Inputs to search for:
- Current free cash flow (FCF) or operating cash flow from latest filings
- Analyst consensus revenue estimates for next 2-3 years (Yahoo Finance, Koyfin)
- Current WACC estimate or use 10% as a default discount rate for growth stocks
Simplified 5-year DCF structure:
| Year | Revenue | FCF Margin (est.) | FCF | Discounted FCF |
|---|---|---|---|---|
| Year 1 | [Guided] | [X%] | ||
| Year 2 | [Consensus] | [X%] | ||
| Year 3 | [Est.] | [X%] | ||
| Year 4 | [Est.] | [X%] | ||
| Year 5 | [Est.] | [X%] |
- Terminal value: Apply a terminal EV/FCF multiple (typically 15-25x depending on growth profile)
- Sum discounted FCFs + terminal value = implied enterprise value
- Subtract net debt, divide by diluted share count = implied price per share
Key output: "The current price of $X implies the market is pricing in Y% revenue growth and Z% FCF margins by Year 5. That is [reasonable / aggressive / conservative] because..."
If the company is pre-FCF (burning cash), note this explicitly and explain that a traditional DCF doesn't apply well — the peer multiples approach (Section 2.1) carries more weight.
2.7 EV/EBITDA Comp Table (2-4 searches)
Build a dedicated Enterprise Value / EBITDA comparison table. This matters because EV/EBITDA strips out capital structure differences and is the primary metric used by institutional investors and acquirers to value companies.
| Company | EV ($B) | EBITDA (TTM, $M) | EV/EBITDA | EV/EBITDA (Forward) |
|---|---|---|---|---|
| [TICKER] | ||||
| [Comp 1] | ||||
| [Comp 2] | ||||
| Sector Median |
Include the sector median for context. A company trading at a significant premium to sector median EV/EBITDA needs a clear justification (faster growth, higher margins, scarcity value). A company at a discount needs investigation — is it cheap for a reason?
If EBITDA is negative, note "N/M" and explain that EV/Revenue or EV/Gross Profit may be more appropriate comparisons for pre-profit companies.
Search queries: "[TICKER] EV/EBITDA", "[TICKER] enterprise value", "[SECTOR] median EV/EBITDA"
Section 3: Risk & Red Teaming
This is the most important section. Confirmation bias destroys returns. The goal is to break the thesis before the market does.
3.1 The Bear Case (3-5 searches)
Write a structured 3-point bear case covering:
- Customer concentration — What % of revenue comes from the top 3 clients? Is it rising or falling?
- Competitive threats — Who is most likely to take share and why?
- Execution risk — What has management promised but not yet delivered?
Search Seeking Alpha, Reddit (r/stocks, r/wallstreetbets), and financial news for bear arguments. Present the strongest version of the bear case, not a strawman.
3.2 SEC Filing Red Flags (2-3 searches)
From the most recent 10-K:
- Top 3 most unusual, company-specific risk factors (skip boilerplate)
- Any going concern language or auditor qualifications
- Revenue recognition changes or accounting policy shifts
- Dilution: secondary offerings, ATM programs, convertible notes in the last 24 months
3.3 Last Earnings Miss (1-2 searches)
Find the most recent earnings miss (if any):
- What was the specific reason?
- How much did the stock drop?
- Has the underlying issue been resolved?
3.4 Bull Case Critique (1-2 searches)
Search for published skepticism of the bull case. Why might the market be discounting this stock even though the thesis sounds compelling? Common reasons: execution history, TAM overestimation, margin compression, regulatory overhang.
Section 4: Technical Analysis
Fundamentals tell you what to buy. Technicals help with timing and price levels.
4.1 Key Price Levels (2-3 searches)
- Current price
- 52-week high and low
- Key resistance levels (recent swing highs, analyst price targets)
- Key support levels (20-day, 50-day, 100-day, 200-day SMA)
4.2 Moving Averages & Trend (1-2 searches)
- Is price above or below the 200-day MA? What is the slope?
- Any recent Golden Cross (50-day crosses above 200-day) or Death Cross?
- Overall trend characterization: strong uptrend, consolidation, breakdown, recovery
4.3 Relative Strength vs SPY (1-2 searches)
- 3-month relative performance vs S&P 500
- Is the RS line accelerating or breaking down?
- A stock falling while SPY rallies is a bearish divergence — flag it explicitly
4.4 Short Interest (1-2 searches)
- Short interest as % of float
- Days to cover
- 12-month trend in short interest (rising = growing skepticism, falling = shorts covering)
- Short squeeze potential assessment
4.5 Sentiment & Volatility (1-2 searches)
- Retail sentiment from Stocktwits / Yahoo Finance comments (bullish, mixed, fearful)
- Implied volatility vs historical volatility
- Any notable volume/price divergences
4.6 Options Flow Analysis (2-4 searches)
Options flow reveals what sophisticated money is betting on. This section surfaces unusual positioning that may not be visible in the stock price alone.
Search for and report:
- Put/Call ratio: Current ratio vs 30-day average. Below 0.7 = bullish skew. Above 1.0 = bearish skew. A sudden shift from the average is more significant than the absolute number.
- Unusual options activity: Search for any outsized call or put purchases in the last 5 trading days. Flag sweeps (aggressive market orders across multiple exchanges) vs blocks (single large trades). Sweeps indicate urgency. Blocks indicate institutional positioning.
- Max Pain: The strike price at which the most options expire worthless (maximum loss for option holders). If the stock is far from max pain near expiration, market makers may push it toward that level.
- Open interest concentration: Which strike prices have the highest open interest for the nearest monthly expiration? Heavy call OI above current price = potential resistance/magnet. Heavy put OI below = potential support/floor.
- Implied Volatility Skew: Is the IV for puts significantly higher than calls (put skew = market hedging downside) or is call IV elevated (anticipation of upside move)?
- Earnings straddle pricing: If earnings are within 30 days, what is the at-the-money straddle implying for the expected move? Compare to the actual historical earnings move to assess whether options are overpricing or underpricing the event.
Search queries: "[TICKER] unusual options activity", "[TICKER] options flow", "[TICKER] put call ratio", "[TICKER] max pain", "[TICKER] options chain" Search targets: Barchart, MarketChameleon, Yahoo Finance options, Unusual Whales, FlowAlgo
Section 5: The Verdict
This is where you earn your keep. After all the research, state your view.
5.1 Synthesis
Structure your verdict as:
Bull Case (2-3 sentences): The strongest reason to be long. What has to go right?
Bear Case (2-3 sentences): The strongest reason to avoid or short. What could go wrong?
Net View: State your assessment clearly. Use language like:
- "The risk/reward skews favorably because [specific reasons backed by data from above]"
- "The valuation is stretched relative to peers unless [specific catalyst] materializes"
- "The thesis is compelling but the customer concentration risk is severe enough to warrant a smaller position size"
Do NOT say: "It depends on your risk tolerance" or "consult a financial advisor" as the verdict. The disclaimers handle that. The verdict should be an honest, reasoned assessment.
What would change my mind: Explicitly state 1-2 things that would flip your view.
5.2 Asymmetry Check
- Downside floor: Based on historical valuation floor, what's the worst-case price?
- Upside ceiling: If all catalysts hit, what's the best-case valuation?
- Asymmetry ratio: Upside ÷ Downside. Above 3:1 is attractive. Below 2:1, the risk/reward is thin.
Sector-Specific Analysis
Different sectors require different metrics. After identifying the company's sector in Section 1, apply the relevant sector overlay on top of the standard 5-section framework.
Auto-detection: During Section 1.2 (Business Model), identify which sector the company belongs to. Then read the sector-specific reference at
references/sector-templates.md and apply the additional
metrics and analysis for that sector.
Supported sectors:
- Biotech / Pharma — pipeline analysis, FDA catalysts, cash runway, binary event risk
- SaaS / Software — ARR, NRR, CAC/LTV, magic number, SaaS-specific multiples
- Commodities / Energy / Mining — reserve life, production costs, commodity price sensitivity
If the company doesn't fit neatly into one of these, use the standard framework without a sector overlay. If the company spans multiple sectors (e.g., a SaaS company with hardware revenue), apply the sector template for the dominant revenue segment and note the blended nature.
Output format
Chat summary
Provide a structured response in the chat covering all sections run. Use clear section headers. Keep each section focused — the downloadable report has the full detail.
Downloadable report
After the chat summary, generate a downloadable report.
Read the report structure reference at:
references/report-structure.md
Then read the PDF SKILL.md at
/mnt/skills/public/pdf/SKILL.md for PDF generation,
OR generate a Markdown (.md) file if the user prefers.
If the user hasn't specified a format preference, default to PDF and mention that a Markdown (.md) version is also available if they'd like.
The report filename should be:
[TICKER]_Stock_Analysis_[YYYY-MM-DD].pdf (or .md)
Search discipline
This skill is ONLY as good as the data it finds. Follow these rules strictly:
- Never fabricate financial numbers. If a search doesn't return a specific metric, say "not found in search results" rather than guessing. A wrong number is worse than no number.
- Cite your sources. For every key data point, note where it came from (Yahoo Finance, SEC filing, company PR, etc.)
- Prefer primary sources. SEC filings > company IR page > Reuters/Bloomberg > Seeking Alpha > Reddit. Social media sentiment is useful for Section 3-4 but never for financial data.
- Check dates. Financial data from 6+ months ago may be stale. Always note the date of the data you're citing. Flag when earnings or guidance may have been updated since the source date.
- Search queries should be short and specific — 2-5 words maximum for best results.
- Minimum search count by section:
- Section 1 (Foundation): 10-16 searches (includes earnings transcript)
- Section 2 (Valuation): 14-22 searches (includes DCF + EV/EBITDA comp)
- Section 3 (Risk): 8-12 searches
- Section 4 (Technicals): 10-16 searches (includes options flow)
- Section 5 (Verdict): 0 searches (synthesis of above)
- Sector overlay: 3-6 additional searches if applicable
Handling article uploads
When the user uploads or pastes an article about the ticker:
- Note the publication date — a thesis from 3+ months ago may be outdated
- Analyze: (a) What does the author get right? (b) What are they missing or glossing over? (c) Does this change the view from the analysis above?
- If the article contradicts the research, explain specifically where and why
- If the article introduces a new risk or catalyst not covered, incorporate it
Conviction language guidelines
- Do say: "Based on the data above, the valuation looks compelling at X forward P/S vs peers at Y"
- Do say: "The customer concentration is a material risk — 80% of revenue from 2 clients creates a single-point-of-failure"
- Do say: "The risk/reward is asymmetric in the bull's favor, but the thesis hinges on [catalyst]"
- Don't say: "It's hard to say" / "It could go either way" / "Only you can decide"
- Don't say: "This is a great stock" or "You should buy this" — that's advice, not analysis
- Always distinguish between your inference and hard data. "The P/S is 4.2x" is data. "This suggests the market is discounting the growth ramp" is inference — label it as such.