How Non-Programmers Can Build a Personal AI Stock Screening System
This guide explains how non-programmers can build a personal AI-powered stock screening system using an AI agent framework. It covers the four-layer agent architecture, the three prerequisites (a cloud server, a model API key, and a messaging channel), environment initialization, system prompt design, connecting market data as a tool, and running daily automated screening with scheduled tasks. It also outlines common pitfalls and risk controls. The system produces a candidate watchlist to improve screening efficiency and does not constitute investment advice.
1. From Institutional-Only to Personal: A Shift in Capability Structure
Over the past few years, the core advantage of quantitative institutions and high-frequency funds has not come from strategy alone. It comes from a combination of three things: more complete data, a faster execution pipeline, and a 24/7 unattended runtime. Individual investors may have ideas, but they are often blocked by three barriers: setting up the environment, connecting data, and keeping the system running continuously.
The maturity of AI agent frameworks has changed this structure. A usable agent system typically consists of four layers:
- Model layer: understands natural-language instructions and performs summarization and reasoning;
- Tool layer: fetches market data, calculates indicators, reads and writes files, and sends notifications;
- Memory layer: stores preferences, historical conclusions, and context so you do not have to restate requirements every time;
- Scheduling layer: triggers tasks by time or event to enable unattended operation.
What individual users really need to prepare is simply wiring these four layers together, rather than implementing each layer from scratch. This is the fundamental reason non-programmers can complete the setup in about ten minutes.
One boundary should be clear up front: the system described here outputs a “candidate watchlist” to improve the efficiency of information screening. It does not constitute any investment advice and does not promise returns.
2. Preparation: Just Three Things
- A lightweight cloud server: a configuration of 2 cores and 2GB or above is recommended. Choose the cloud rather than a local computer because local devices shut down, lose network connectivity, or sleep, while scheduled tasks need to stay online 24/7.
- A model service key: used to call large model capabilities. Use a dedicated key and set a spending cap to avoid accidental overuse and excess charges.
- A messaging channel: used to push daily results into a chat tool you already use.
3. Environment Initialization: Let Automation Handle Repetitive Steps
When purchasing a cloud server, choosing an image with a preconfigured runtime environment can eliminate most dependency installation work. After logging in to the console and connecting to the instance via a passwordless or key-based method, use the initialization command provided by the vendor to enter the configuration wizard. Such wizards typically include the following steps:
- Risk confirmation: a notice that the instance will open network access, requiring the user to acknowledge it;
- Mode selection: beginners can choose the QuickStart mode, which completes most settings with default parameters;
- Model configuration: select a model provider and complete key binding on the authentication page;
- Capability toggle: enable the memory feature so the agent maintains context across multiple turns.
An illustrative flow is shown below (refer to the documentation of the image you use for specific commands; this article does not provide command names for any specific tool):
# After connecting to the instance, run the initialization entry point included with the imagesudo <initialization command> --mode quickstart# After configuration, check the service statussystemctl status agent-runtimecurl -s http://127.0.0.1:8080/health
Three security practices are mandatory: open only the necessary ports; store keys in environment variables or a key management file rather than in code; and configure an access allowlist for the instance instead of exposing management ports to the entire internet.
4. Agent Persona Design: The Key to Output Quality
When model capabilities are equal, differences in output come mainly from the persona (System Prompt) and constraint design. A usable stock-screening agent persona should contain four parts:
- Role: you are a rigorous market-data screening assistant that speaks only based on data;
- Input: stock pool, market fields, financial fields, and screening thresholds;
- Processing: first filter out symbols with insufficient liquidity, then calculate indicators, and finally rank them;
- Output: a fixed structure containing code, name, trigger reason, key indicators, and risk notes.
An illustrative persona snippet:
Role: market data screening assistantConstraints: do not use data that is not provided; do not predict rises or falls; do not give buy or sell adviceFlow: liquidity filter -> indicator calculation -> threshold screening -> rank and take top 5Output: table + trigger reason for each symbol + a uniform risk note
Combined with the memory feature, you can write long-term preferences such as “exclude a certain industry” or “prefer a certain market-cap range” into memory, so you do not need to restate them later.
5. Data Integration: Turning Real-Time Quotes into a Tool
The agent itself does not hold market data and needs an external data interface. The recommended approach is to add a “quote tool” that the model calls to fetch data, rather than stuffing large amounts of data directly into the conversation context—the latter is both expensive and prone to exceeding length limits.
{"tool": "fetch_quotes","params": { "symbols": ["600000", "000001"], "fields": ["price","volume","pe","ma20"] }}
On the data side, focus on three categories of fields: price and change percentage; volume and turnover rate (reflecting liquidity); and valuation and moving averages (reflecting position). Make sure field definitions are consistent to avoid distorted indicators caused by different adjustment methods.
6. Messaging Bot and Daily Automated Screening
Create a bot application on an open platform, select the personal-use scenario, configure permissions for receiving messages and active push, and fill the credentials into the corresponding fields of the configuration file to connect the chat side with the runtime side.
The scheduling layer uses a scheduled task to run automatically every day:
# Trigger screening once at 08:30 on each trading day30 8 * * 1-5 cd /opt/agent && ./run.sh --task daily_pick >> logs/pick.log 2>&1
The complete pipeline is: scheduled trigger → fetch quotes → indicator calculation → threshold screening → rank and take the top five → push message → write log. It is recommended to connect logs and alerts to the log service and monitoring/alerting capabilities commonly offered by cloud vendors, so that you are notified the moment a task fails rather than discovering the next day that no result arrived.
7. Common Pitfalls and Risk Control
- Data latency: free interfaces usually have delays and should not be used for intraday real-time decisions;
- Rate limits: fetch data in batches with intervals to avoid being throttled;
- Cost overruns: set spending caps for model calls and reuse cached results;
- Conclusion drift: fix the output template to make it easier to compare historical results;
- Cognitive bias: treat the system as a “filter” rather than an “oracle”; the final judgment is still made by a human.
8. Conclusion
The essence of a non-programmer building a personal AI stock screening system is standardizing four things: environment, data, persona, and scheduling. After completing the configuration once, the system automatically delivers a structured candidate list every day, and you only need to review it and adjust thresholds. The real barrier has shifted from technology to the quality of your questions: defining a clear screening logic matters more to the value of the results than mastering complex code.
