Watch a stock list for price rules and new filings
Every 15 minutes while the market is open, this workflow checks each stock on your watchlist against its rules. For each stock with an alert, it mails you, adds a row to your alert sheet and puts an event on your calendar. It only alerts. It never buys or sells.
What it does
Section titled “What it does”- It reads your watchlist sheet. Each row is a stock with its rules.
- It gets the quote of each stock and the new filings of each company on SEC EDGAR.
- Code checks five rules for each stock:
- the price is at or above a level;
- the price is at or below a level;
- the day’s change is a given percent or more, up or down;
- the day’s high minus its low is a given percent of the previous close, or more;
- the company filed a new 10-Q or 8-K after a date.
- For each stock with an alert, it sends a mail with each rule, its value and its level, adds a row to your alert sheet, and adds a 15-minute event on the next weekday at 9:00.
The workflow has 10 steps and no AI step: code checks every rule. A run costs one credit.
What you fill in
Section titled “What you fill in”- your watchlist sheet: one row for each stock, with its ticker, its SEC number and its five rule values;
- a label that goes in the mail subject, the event title and the sheet row.
What it needs
Section titled “What it needs”- Google Sheets, Gmail and Google Calendar, from one Google account that you connect;
- Finnhub for stock quotes, connected with your own Finnhub key;
- SEC EDGAR for the filings. It is public and needs no account.
Where the result goes
Section titled “Where the result goes”A mail to you, a row in your alert sheet, and an event in your calendar, for each stock with an alert.
Why it runs by itself
Section titled “Why it runs by itself”Prices change all day, and a new filing can come at any time. Nobody checks a list of stocks every 15 minutes by hand. A schedule runs the check on weekdays while the market is open. What starts a run shows how to set the schedule. In the build below, the person kept the schedule off for the first days and started each run by hand.
How it was built
Section titled “How it was built”One chat in claude.ai with the Toolscaled connector: 6 messages from the person, 14 minutes. Four hours later, 3 more messages in the same chat added the calendar event. The person typed these messages. We replaced the mail address, the sheet links and the calendar ID with brackets. The [bench stock] tags mark the test data.
-
Use Toolscaled. I want my stock watchlist checked for me every 15 minutes while the market is open, and an alert for each stock that hits one of its rules. Here is what I do now by hand:
My watchlist is the Google Sheet “[bench stock] Watchlist” in my Drive folder “Toolscaled benchmark/stock alerts”. Each row is a stock: ticker, cik (its SEC number), and five rules:
- alert_above: alert when the price is at or above it;
- alert_below: alert when the price is at or below it;
- max_day_move_pct: alert when the day’s change is that many percent or more, up or down;
- max_day_range_pct: alert when the day’s high minus its low is that many percent of the previous close, or more;
- filings_since: alert when the company filed a new 10-Q or 8-K on SEC EDGAR after that date (amendments do not count).
I use the last price. I already connected Finnhub for stock prices.
For each stock with one or more alerts, I want three things:
- a mail to me ([my address]) with each rule that fired, its value and its level;
- a row in my sheet “[bench stock] Alerts” in the same folder (it has the columns run, checked_at, ticker, rules, values, levels);
- an event in my calendar “toolscaled test” on the next weekday at 9:00 Pacific, 15 minutes long.
The mail subject and the event title are “<label> <TICKER>: <the rules that fired>”, where the label is a tag I pick for each check; this time it is “[bench stock build]”. The label goes in the run column too.
Alerts only: never buy or sell anything.
Please do it now once, so I can see it. Then make it run by itself. Sometimes I use another watchlist sheet and another label, so I need to be able to change those two.
-
Here are the links. Watchlist: [link] and Alerts: [link]. I can’t get into my calendar settings right now, so I’ll send you the calendar ID later; please go on with the rest.
-
Looks good. Yes, please send the mails and add the rows.
-
Keep it alerting on every check for now; I’ll move the dates myself. I still can’t get the calendar ID, so please go ahead and save it now, and I’ll send the ID later.
-
Continue.
-
Do the full test, and use [bench stock build-2] as the label. Every 15 minutes in market hours is right, but for the first days I want to start it myself. Leave the schedule off.
Four hours later:
-
Here is the calendar ID of my calendar “toolscaled test”: [calendar ID]. Please add the calendar reminder now.
-
Do the full test, and use [bench stock build-3] as the label. Leave the schedule off.
-
Did the test work?
Claude checked the list once in the chat and showed the alerts. After the person’s yes, it sent the mails, added the rows and saved the workflow. Claude also asked one question: as written, a rule alerts again on each check while it holds. The person chose to keep that. Later, the calendar step went into a new version of the same workflow, with no new build.
The numbers
Section titled “The numbers”We ran the workflow on a test set that the build chat never saw: 10 stocks with 6 rule hits on 5 of them, 15 actions and 3 near misses. We compare it with an agent that did the same task from the same request. How we measured gives the method.
| Workflow | Agent | |
|---|---|---|
| Time to the last action | 2.7 s | 168 s |
| Cost a run | 1 credit, about $0.002 | about $0.29 |
| Tool calls | 45 | 75 |
| Rule hits | 6 of 6, no false alert | 7 of 7, no false alert |
| Same answer in 5 runs | 1.00 | one run |
The agent ran on the next day’s data, with 7 hits on 6 stocks, and it followed the written steps of a workflow run.
The build chat cost about $3.44 at list price, and your chat plan pays for it. At these numbers the build pays back after about 12 runs. On a 15-minute schedule, that is less than one market day.