InvestAI
Say goodbye to emotional speculation and use AI to stay rational in your investing. InvestAI monitors trends, rule triggers, and risk signals, helping you focus on executing your strategy—while all decisions always remain in your hands. It doesn’t predict prices or place trades. It’s simply a calm, explainable investment monitoring assistant.
Install / Use
/learn @flingjie/InvestAIREADME
InvestAI 🚀
An AI-powered investing assistant for everyday investors
AI helps you stay rational. Decisions are still yours.
Project Overview
InvestAI is an AI-powered investment assistant designed for everyday investors.
It does not place trades, and it does not make investment decisions for you. InvestAI focuses on only two things:
- Analyzing the market based on well-established trading rules
- Highlighting signals that may deserve your attention at key moments
Whether to buy, sell, or continue holding is always a human decision.
The goal of this project is not to “increase win rates,” but to help investors consistently apply a long-term, disciplined investment approach in real market conditions.
Why InvestAI Exists
Many investment problems are not really about “not knowing how to pick stocks,” but about things like:
- Being impulsive when entering a position
- Not being able to hold through declines
- Taking profits too early
- Only realizing afterward that you had already drifted away from your original plan
The rules themselves are often not that complicated. What’s difficult is executing them consistently, calmly, and over long periods of time.
The role of InvestAI is to step in at the moments when emotions are most likely to interfere, and put the rules back in front of you — reminding you what is actually happening right now.
Core Design Philosophy
InvestAI draws inspiration from established trading philosophies such as The Turtle Trading Rules, but makes one deliberate choice:
Let AI execute the rules. Keep decisions in human hands.
Its core principles include:
- Not trying to be right every time
- Accepting small losses as a normal cost
- Clearly separating “signals” from “decisions”
- Making every analysis explainable and traceable
AI’s responsibility is to tell you whether a rule has been triggered, not to tell you “you must buy” or “you must sell.”
What InvestAI Does
For the stocks you follow, InvestAI continuously analyzes them based on a fixed rule system and reports things like:
- Whether a reference buy signal has appeared
- Whether risk or stop-related conditions have been triggered
- Whether the current trend structure is still intact
- Whether the situation is better interpreted as a waiting phase
At their core, these outputs are all answering one question:
If you strictly followed this rule set, how should this stock be “viewed” right now?
What InvestAI Does Not Do
To avoid misunderstandings, InvestAI deliberately does not provide:
- ❌ Automated trading or order execution
- ❌ “Sure-win stocks” or aggressive buy recommendations
- ❌ Short-term predictions or high-frequency signals
- ❌ Black-box scores or unexplained conclusions
It is not a “stock-picking tool.” It is a rule execution and rule awareness tool.
Why Use AI Instead of Traditional Indicator Tools?
Many investors already know how to read indicators. The problem is that:
- There are too many of them, and it’s unclear which to trust
- Different timeframes give conflicting signals
- Once emotions are involved, unfavorable information is often ignored
InvestAI is meant to:
- Integrate multiple rules into a single, explainable analytical process
- Apply the same logic consistently, every time
- Surface reminders precisely when risks are easiest to overlook or optimism becomes excessive
It is closer to a calm investment companion that doesn’t argue with you — but doesn’t indulge you either.
Example Strategy Rules
InvestAI doesn’t rely on vague “gut feeling” analysis—it operates based on a clear, configurable set of trading rules.
Below is an example trend-following strategy to illustrate how InvestAI generates buy/sell reference signals.
⚠️ This is just an example strategy, not the only or optimal approach. All parameters can be adjusted to fit individual trading styles.
1. Market Trend and Environment
Before analyzing any individual stock, InvestAI will first assess the overall market environment.
Because in most cases:
The market determines the probability of success, while individual stocks determine the potential return.
2. Individual Stock Trend and Breakout Conditions
trend:
pullback_threshold: 0.03 # Pullback threshold (3%)
resistance_window: 20 # Resistance window for breakout confirmation (N previous days)
breakout_buffer: 0.005 # Breakout buffer ratio (0.5%)
Strategy Overview:
- Based on moving averages (ma20 and ma60) to analyze stock trends.
- Waits for controllable pullbacks (≤3%) to avoid overtrading.
- Uses the recent 20-day price range to calculate key resistance levels.
- Only when the price breaks above the highest price in the past N days (plus the buffer ratio), is it considered a valid breakout.
👉 AI will judge:
Is this a normal pullback within the trend, or is it a “passive decline” in a weak market environment?
3. Volume Confirmation (Volume)
volume:
ma_window: 20
min_ratio: 1.0
Strategy Overview:
- Uses 20-day moving average volume as a reference.
- When breaking above the moving average or rebounding, the volume must not be lower than the moving average.
- In weak market environments, the volume requirements will be stricter.
👉 AI will remind you:
In the current market environment, is this breakout really supported by sufficient volume?
4. Momentum Filtering (RSI)
rsi:
min: 40
max: 65
Strategy Overview:
- Does not operate in extreme emotion intervals.
- RSI too low: The trend may have weakened.
- RSI too high: In weak market environments, it is more likely to be a short-term reversal.
👉 AI will combine the market environment to judge:
Is this a healthy trend momentum, or is it a short-term reversal driven by market emotions?
5. Trend Health Check (CCI)
cci:
min: -100
max: 100
Strategy Overview:
- Judges whether the price is severly deviated from the mean.
- Filters out short-term overheating or panic phases.
- In weak market environments, it is more likely to be a short-term reversal.
👉 AI will tell you:
In the current market background, this position is more likely to be an opportunity, or is it just market noise driven by emotions?
How InvestAI Integrates These Rules
When you add a stock to your watchlist, InvestAI will:
- Assess the current market environment
- Evaluate whether the stock meets trend and volume/price conditions
- Adjust signal confidence based on the market context
- Generate interpretable analysis with risk reminders
- Notify you at key moments
Example alerts might include:
- “The stock’s trend structure is intact, but the market is in a sideways phase; success probability is lower than during a tailwind period.”
- “Price has pulled back into the strategy range and volume meets criteria, but market risk is elevated; exercise caution.”
- “Trend and market environment are aligned, indicating a relatively favorable setup.”
📌 InvestAI provides “rule- and environment-based reference judgments,” not trading instructions.
Who It’s For
- ✔ Individual investors pursuing long-term or trend-based strategies
- ✔ Those who want to reduce emotional trading
- ✔ Investors with basic knowledge but inconsistent execution
Who It’s Not For
- ❌ Those looking for quick in-and-out signals
- ❌ Those wanting to fully automate trading
- ❌ Professional quantitative or high-frequency trading scenarios
Deployment & Features
InvestAI can be deployed via one-click Docker, with no complex environment setup required. Once running, it assists your investment rules in two ways:
- Scheduled background monitoring – continuously tracks rules and sends alerts
- Interactive real-time analysis – check status and adjust strategies via AI dialogue
1️⃣ Scheduled Monitoring
Ideal for users who don’t want to watch the market but want rules to run continuously.
- Automatically analyzes your watchlist at set intervals
- Assesses trends, pullbacks, and risk levels according to your rules
- Sends alerts via Slack / Lark / WeWork
- Key notifications reach you even when offline
You only need to maintain the rules and watchlist—the system handles the rest.
2️⃣ Real-Time Interactive Analysis
Ideal for users who want to check rule-based analysis anytime.
Using Cherry Studio + MCP, you can interact in natural language to:
- View your current watchlist
- Analyze a stock’s current rule status
- Understand the logic behind the applied strategy
- Adjust strategy parameters according to your personal trading style
All interactions focus on explaining rules and status, not issuing trading commands.
2. Quick Start
Environment Setup
Make sure the following are installed:
- Docker
- Cherry Studio (provides a GUI interface)
1️⃣ Clone the Project
git clone https://github.com/flingjie/InvestAI.git
cd InvestAI
2️⃣ Configuration Files
(1) Environment Variables
cp .env.example .env
Edit the .env file:
- Set your large model API key (used for dialogues and strategy interpretation)
(2) Core Configuration
-
invest_ai.yaml- Scheduled task intervals
- Notification channels (Slack / Feishu / WeChat Work)
-
watchlist.json- Maintain your stock watchlist (code + name)
3️⃣ Start the Service
Go to the docker directory and start the service:
cd docker
docker-compose up -d
Check the running status:
docker ps
If everything is working, you should see the InvestAI service running:

Example notifications (Slack):
**📣 Market Trend
