paper-profit

How to decides whether a stock is worth buying using AI


It started with a bad idea

When I first started building PaperProfit, one of the problems I had to solve was figuring out how to evaluate a stock.

My first attempt was embarrassingly naive. I just asked an AI: “Is Apple a good stock right now?”

The answer came back confident, fluent, and almost completely useless. The model had no idea what Apple’s current price was, whether the market was up or down, or whether Apple was cheap or expensive relative to its own history. It was like asking someone who’d been in a coma for six months to give you stock tips. The words sounded right. The substance wasn’t there.

So I tried another approach: I found a data feed of Wall Street analyst ratings — the “buy/hold/sell” recommendations from big banks — and averaged them together. Surely the professionals knew what they were doing?

Also useless. Analyst ratings, it turns out, are often outdated, conflicted (banks make money from the companies they cover), and hopelessly optimistic. When every analyst rates everything a “buy,” the signal disappears.

I was stuck. And I started to wonder: how does anyone actually evaluate a stock?


A crash course in how Wall Street thinks

I spent weeks trying to figure this out. I read books, watched finance YouTube, had long conversations with AI assistants, and dug through academic papers on investing.

Here’s what I learned: professional equity analysts — the people at hedge funds and banks whose literal job is figuring out which stocks to own — don’t rely on any single signal. They combine multiple lenses, each answering a different question about a company.

The goal, I realized, shouldn’t be to “predict the market.” It should be to build an educational framework that mirrors how equity analysts actually think.

After simplifying this into something a software project could actually implement, I landed on three core pillars:

The Three-Pillar Framework

Pillar Purpose
Fundamental Analysis Measures financial strength and valuation
Technical Analysis Evaluates price action and momentum
Qualitative Analysis Interprets management quality, risks, and narrative

Pillar 1: The Numbers (Fundamental Analysis)

This is the financial health check. Think of it like looking at a company’s report card.

Is the company making money? Is it growing? Does it have a mountain of debt that could sink it in a recession? Is the stock cheap or overpriced relative to what the business actually earns?

A few of the numbers we look at:

Pillar 2: The Chart (Technical Analysis)

This one is about price movement — not what the company is worth, but what the market thinks it’s worth, and where momentum is pointing.

It’s a bit like surfing. The fundamental analysis tells you whether a wave is worth catching. The technical analysis tells you whether the wave is building or breaking.

Some signals we look at:

None of these predict the future. But they describe what the crowd is currently doing — and crowds matter in markets.

Pillar 3: The Story (Qualitative Analysis)

This is the hardest pillar to automate, and the most interesting.

Numbers only tell you what happened. They don’t tell you why, or what’s coming next.

The qualitative layer tries to answer questions like:

This is where AI reasoning becomes genuinely useful. A language model can read through an earnings call transcript and pick up on things the numbers miss — the tone of management, whether they raised or lowered guidance, whether their explanation for a bad quarter sounded like a real plan or a cover story. Also it can easily compare latest earning reports with the previous one.


Let’s make it work

At this point you might be wondering: okay, but how does the app actually do all of this?

The honest answer is that we use AI for the parts that genuinely need it — and plain code for everything else.

Most of the heavy lifting is deterministic. Fetching stock prices, calculating ratios, computing moving averages, flagging red flags — all of that runs as regular Python code. It’s fast, cheap, and perfectly repeatable. No AI required.

Where we bring in an LLM is for the qualitative layer: the things that require reading, interpreting, and summarizing unstructured text. Specifically, the app makes a small number of targeted API calls to analyze two types of documents:

Once all of that is ready — the quantitative data from code, the qualitative signals from AI — the scoring system combines it into a single recommendation.


The Scoring System

Once we have data across all three pillars, we need a way to turn it into a single recommendation. Here’s how that works.

Five dimensions, one score

We score each stock across five dimensions:

Dimension The question it answers
Quality Is this a genuinely good business?
Growth Is it getting bigger?
Valuation Are you paying a fair price?
Momentum Is the market moving toward it or away from it?
Risk Could it blow up?

Each dimension gets a score from −2 to +2. Zero is neutral. Positive means the signal is favorable. Negative means it’s a warning sign.

Not all dimensions are equal

We then combine those scores with weights — because not all dimensions matter equally for long-term investment decisions:

Overall Score =
    30% × Quality
  + 25% × Growth
  + 20% × Valuation
  + 15% × Momentum
  + 10% × Risk

Quality and growth get the most weight because research consistently shows that businesses with strong fundamentals tend to outperform over the long run. Momentum is included because even a great business can be a bad investment if you buy it at the wrong time. Risk acts as a penalty — high debt or high volatility can drag down an otherwise good score.

From score to signal

Total Score What it means
Above +1.0 🟢 BUY
+0.5 to +1.0 🔵 Weak buy (accumulate gradually)
−0.5 to +0.5 ⚪ HOLD
−1.0 to −0.5 🟡 Weak sell (consider reducing)
Below −1.0 🔴 SELL

A real example

Here’s what this looks like in practice. Imagine we’re evaluating a fictional software company called Meridian Corp:

Factor Score Why
Valuation +2 Forward P/E of 13 — cheap for a software company
Quality +2 83% gross margins, nearly zero debt, strong free cash flow
Risk 0 Debt-to-equity is 0.03, but revenue is slowing
Growth −1 Revenue growth is 9–11% — decent, but decelerating
Momentum −1 RSI is 60, but stock is 47% off its 52-week high

Weighted total: +0.95 → Signal: 🔵 Weak Buy

The system says this company looks fundamentally sound and cheap, but the market hasn’t rewarded it yet — and growth is slowing. It’s worth watching, not rushing into.


What the AI actually does

The AI’s job is not to replace analysis — it’s to do the parts of analysis that are tedious for humans but easy for language models.

Reading a 60-page 10-K filing and extracting the ten most important facts. Summarizing an earnings call in plain English. Flagging when management’s language shifts from confident to defensive. Comparing this quarter’s results to the last four quarters and noting the trend.

The human still makes the final call. The AI just makes sure you’re starting from a complete picture — not guessing.


Warning signs we always flag

No matter how good a score looks, the system automatically surfaces these red flags:

A stock can look attractive on every metric and still be dangerous if one of these is true.


The honest caveat

Here’s something I learned that no finance book will tell you upfront: even the best analysts are wrong a lot.

Markets are partly math and partly human psychology. A company can have perfect fundamentals and still fall 40% because sentiment shifts. A terrible business can triple because of a meme and a Reddit thread.

What a systematic approach like this gives you isn’t a crystal ball. It gives you a process — a way to make consistent, well-reasoned decisions based on evidence rather than emotion or hype. Over many decisions, that tends to work better than guessing.

That’s the goal of PaperProfit. Not to predict the future, but to help you think about stocks the way a professional would — clearly, consistently, and without getting swept up in the noise.


*Want to dig into the code behind this? See the technical documentation *