DEV Community

Kevin Meneses González
Kevin Meneses González

Posted on • Originally published at Medium

How I Automated My Investment Research With 50 Lines of Python

The Problem: Too Much Noise, Not Enough Signal

A while ago, my daily investment routine looked like this:

  • Open multiple tabs
  • Check stock prices
  • Compare volume
  • Look at charts
  • Scan for opportunities

Every day, the same process.

And the problem wasn't time alone.

It was inconsistency.

Some days I would miss good setups.
Other days I would overanalyze everything.

Because I was relying on manual effort.

The Shift: From Checking Stocks to Filtering Them

At some point, I realized something simple:

I don't need more information. I need better filtering.

Instead of checking stocks one by one, I decided to build a system that:

  • Monitors a list of stocks automatically
  • Applies predefined conditions
  • Shows only the ones worth analyzing

That's when I built a simple Python watchlist.

What This System Actually Does

The idea is straightforward:

  • Define a list of stocks you care about
  • Define conditions that matter to you
  • Let the script filter the market

Instead of asking:

"What should I check today?"

You get:

"These are the stocks that meet your criteria today."

Step 1: Define Your Watchlist

This is your universe of interest.

WATCHLIST = ["AAPL", "MSFT", "TSLA", "NVDA", "AMZN"]
Enter fullscreen mode Exit fullscreen mode

This list can include:

  • Stocks you own
  • Stocks you are tracking
  • Potential opportunities
  • High-volume or trending assets

The watchlist gives structure to your process.

Step 2: Define Your Conditions

Now comes the key part.

You define what "interesting" means.

CONDITIONS = {
    "min_price": 100,
    "min_volume": 1_000_000,
    "min_change_percent": 2
}
Enter fullscreen mode Exit fullscreen mode

This means:

  • Only stocks above $100
  • With significant volume
  • And at least 2% daily movement

You are encoding your thinking into rules.

Step 3: Fetch Real-Time Data

To make this work, we need reliable data.

This is where EODHD comes in.

import requests

API_KEY = "YOUR_API_KEY"

def get_stock_data(symbol):
    url = f"https://eodhd.com/api/real-time/{symbol}?api_token={API_KEY}&fmt=json"
    response = requests.get(url)
    return response.json()
Enter fullscreen mode Exit fullscreen mode

This gives us:

  • Current price
  • Volume
  • Daily change

Everything needed to evaluate our conditions.

Step 4: Apply the Logic

Now we combine everything.

def meets_conditions(data):
    price = data.get("close", 0)
    volume = data.get("volume", 0)
    change_percent = data.get("change_p", 0)

    return (
        price >= CONDITIONS["min_price"] and
        volume >= CONDITIONS["min_volume"] and
        change_percent >= CONDITIONS["min_change_percent"]
    )
Enter fullscreen mode Exit fullscreen mode

Step 5: Filter the Market

results = []

for symbol in WATCHLIST:
    data = get_stock_data(symbol)

    if meets_conditions(data):
        results.append({
            "symbol": symbol,
            "price": data.get("close"),
            "volume": data.get("volume"),
            "change_percent": data.get("change_p")
        })
Enter fullscreen mode Exit fullscreen mode

Step 6: Get a Clean Output

if results:
    print("Stocks that meet your conditions:\n")

    for stock in results:
        print(f"{stock['symbol']}")
        print(f"Price: {stock['price']}")
        print(f"Volume: {stock['volume']}")
        print(f"Change %: {stock['change_percent']}")
        print("-" * 30)
else:
    print("No stocks matched your conditions today.")
Enter fullscreen mode Exit fullscreen mode

What Changed for Me

Before this system:

  • I checked everything manually
  • I wasted time on irrelevant stocks
  • I had no consistent process

After:

  • I only see filtered opportunities
  • I focus on what matters
  • I save hours every week

The script doesn't make decisions for me.

It removes the noise before I make them.

The Hidden Cost of API Calls

This is something most people ignore.

When you build systems like this, API usage matters.

Let's say you track:

  • 30 stocks
  • Every hour

That quickly becomes thousands of API calls per month.

And here's the problem:

Not all APIs handle this well.

Some have:

  • Strict limits
  • Unstable responses
  • Delayed data

So while they look "cheap", they cost you in:

  • Time
  • Errors
  • Missed opportunities

Why Data Quality Matters

In a system like this, everything depends on data.

If your data is wrong:

  • Your filters are wrong
  • Your signals are wrong
  • Your decisions are wrong

That's why using a provider like EODHD makes a difference.

Because it gives you:

  • Reliable real-time data
  • Clean and consistent responses
  • Coverage across multiple assets

This is what allows the system to actually work.

FAQs

Do I need advanced Python skills?

No. If you understand basic Python (loops, functions, variables), you can build this.

Can I change the conditions?

Yes. That's the core idea.

You can adapt the script to:

  • Momentum strategies
  • Long-term filters
  • Volatility setups

Is this a trading bot?

No.

This is a filtering system.

It helps you decide what to analyze, not what to buy.

Are free APIs enough?

For testing, yes.

For real systems, usually not.

Because reliability becomes critical.

Why use EODHD?

Because it allows you to:

  • Access real-time market data
  • Build consistent workflows
  • Scale your scripts without constant issues

Final Thought

Most people try to improve their investing by consuming more information.

But the real advantage comes from filtering better.

Because:

  • You don't need more data
  • You need less noise

If you want to build your own watchlist and automate your investment research with Python, the first step is having reliable data.

You can explore EODHD and start building your own system from scratch.


Looking for technical content for your company? I can help — LinkedIn · kevinmenesesgonzalez@gmail.com


`
Enter fullscreen mode Exit fullscreen mode

Top comments (0)