"stock_analyzer"
"分析股票和市场。当用户想要分析单个或多个股票,或进行市场复盘时调用。"
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
Its scripts were only partly scanned.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/EthanAlgoX/AIStock with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/EthanAlgoX/AIStock'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/ethanalgox--aistock)HTML
<a href="/listings/ethanalgox--aistock"><img src="/api/listings/ethanalgox--aistock/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
For the quickest start, use [AI Stock online](https://myaistock.top/) and [request an invitation code](#try-it-online-recommended). **The installation steps below are only for running your own instance.**
1. Prepare your computer
Install **Python 3.10+**, **Node.js 20.19–26.x**, **npm 10+**, and Git. Prepare a model provider's API key and access to a model that supports **tool calling**. Hosted model calls may use paid provider credits; see [model configuration](docs/LLM_CONFIG_GUIDE_EN.md) for supported setup options, including local models.
These commands use a **macOS/Linux shell**. Windows and Docker users can follow the [deployment guide](docs/DEPLOY_EN.md).
2. Download and install
git clone https://github.com/EthanAlgoX/AIStock.git AI-Stock cd AI-Stock python3 -m venv .venv source .venv/bin/activate python -m pip install -r requirements.txt # Preserve any existing configuration. if [ ! -f .env ]; then cp .env.example .env; fi
Already have the repository? Start from `cd AI-Stock` in its parent directory and keep your existing `.env`.
3. Build the website and start the server
cd apps/dsa-web npm ci npm run build cd ../.. python main.py --serve-only --host 127.0.0.1 --port 8000
Open [http://127.0.0.1:8000](http://127.0.0.1:8000). Keep this terminal running while you use the local instance. Port `8000` is an example; if it is occupied, change `--port` and use the same port in your browser. API documentation is at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
**The website opening is only the first step.** Configure and test your model before asking it to analyze stocks.
In another terminal, check `curl --fail http://127.0.0.1:8000/api/health`. A successful response verifies the local API; model and data-source connections need their own checks.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 113 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: "stock_analyzer"
- description: "分析股票和市场。当用户想要分析单个或多个股票,或进行市场复盘时调用。"
- ---
- # 股票分析器
- 本技能基于 `src/services/analyzer_service.py` 的逻辑,提供分析股票和整体市场的功能。
- ## 输出结构 (`AnalysisResult`)
- 分析函数返回一个 `AnalysisResult` 对象(或其列表),该对象具有丰富的结构。以下是其关键组件的简要概述,并附有真实的输出示例:
- `dashboard` 属性包含核心分析,分为四个主要部分:
- 1. **`core_conclusion`**: 一句话总结、信号类型和仓位建议。
- 2. **`data_perspective`**: 技术数据,包括趋势状态、价格位置、量能分析和筹码结构。
- 3. **`intelligence`**: 定性信息,如新闻、风险警报和积极催化剂。
- 4. **`battle_plan`**: 可操作的策略,包括狙击点(买/卖目标)、仓位策略和风险控制清单。
- ## 配置 (`Config`)
- 所有分析函数都可以接受一个可选的 `config` 对象。该对象包含应用程序的所有配置,例如 API 密钥、通知设置和分析参数。
- 如果未提供 `config` 对象,函数将自动使用从 `.env` 文件加载的全局单例实例。
- **参考:** [`Config`](src/config.py)
- ## 函数
- ### 1. 分析单只股票
- **描述:** 分析单只股票并返回分析结果。
- **何时使用:** 当用户要求分析特定股票时。
- **输入:**
- - `stock_code` (str): 要分析的股票代码。
- - `config` (Config, 可选): 配置对象。默认为 `None`。
- - `full_report` (bool, 可选): 是否生成完整报告。默认为 `False`。
- - `notifier` (NotificationService, 可选): 通知服务对象。默认为 `None`。
- **输出:** `Optional[AnalysisResult]`
- 一个包含分析结果的 `AnalysisResult` 对象,如果分析失败则为 `None`。
- **示例:**
- ```python
- from src.services.analyzer_service import analyze_stock
- # 分析单只股票
- result = analyze_stock("600989")
- if result:
- print(f"股票: {result.name} ({result.code})")
- print(f"情绪得分: {result.sentiment_score}")
- print(f"操作建议: {result.operation_advice}")
- ```
- **参考:** [`analyze_stock`](src/services/analyzer_service.py)
- ### 2. 分析多只股票
- **描述:** 分析一个股票列表并返回分析结果列表。
- **何时使用:** 当用户想要一次分析多只股票时。
- **输入:**
- - `stock_codes` (List[str]): 要分析的股票代码列表。
- - `config` (Config, 可选): 配置对象。默认为 `None`。
- - `full_report` (bool, 可选): 是否为每只股票生成完整报告。默认为 `False`。
- - `notifier` (NotificationService, 可选): 通知服务对象。默认为 `None`。
- **输出:** `List[AnalysisResult]`
- 一个 `AnalysisResult` 对象列表。
- **示例:**
- ```python
- from src.services.analyzer_service import analyze_stocks
- # 分析多只股票
- results = analyze_stocks(["600989", "000001"])
- for result in results:
- print(f"股票: {result.name}, 操作建议: {result.operation_advice}")
- ```
- **参考:** [`analyze_stocks`](src/services/analyzer_service.py)
- ### 3. 执行大盘复盘
- **描述:** 对整体市场进行复盘并返回一份报告。
- **何时使用:** 当用户要求市场概览、摘要或复盘时。
- **输入:**
- - `config` (Config, 可选): 配置对象。默认为 `None`。
- - `notifier` (NotificationService, 可选): 通知服务对象。默认为 `None`。
- **输出:** `Optional[str]`
- 一个包含市场复盘报告的字符串,如果失败则为 `None`。
- **示例:**
- ```python
- from src.services.analyzer_service import perform_market_review
- # 执行大盘复盘
- report = perform_market_review()
- if report:
- print(report)
- ```
- **参考:** [`perform_market_review`](src/services/analyzer_service.py)
README.md · README · 182 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- <div align="center">
- <img src="apps/dsa-web/public/tradebot-mark.svg" alt="AI Stock" width="76" height="76">
- # AI Stock
- **Empower every stock researcher with AI—so one person can research with the capabilities of a team.**
- Your AI workspace for researching stocks, comparing ideas, and testing strategies with simulated money.
- Research assistant · Expert roundtable · Stock research · Strategy screening · Trade simulation
- [](https://github.com/EthanAlgoX/AIStock/actions/workflows/ci.yml)
- [](LICENSE)
- [](https://www.python.org/)
- [](https://react.dev/)
- [](https://fastapi.tiangolo.com/)
- **English** · [简体中文](docs/README_ZH.md) · [繁體中文](docs/README_CHT.md) · [日本語](docs/README_JA.md) · [한국어](docs/README_KO.md)
- </div>
- AI Stock brings market data, news, calculations, and AI analysis into one website. Ask about a stock, read the evidence and risks, compare different investing perspectives, and test a strategy through paper trading. Research supports **mainland China, Hong Kong, the US, Taiwan, Japan, Korea, the UK, Canada, Australia, India, Germany and France**. Paper simulation supports the first six markets. Data availability and bounded screening coverage depend on the provider and configuration; see the [market guide](docs/international-markets_EN.md).
- <a href="docs/assets/readme/trading-overview-en.jpg"><img src="docs/assets/readme/trading-overview-en.jpg" alt="AI Stock trade simulation demo with seven-module top navigation, simulated return curves and three paper accounts" width="1000"></a>
- **Trade simulation demo.** The workspace shows seven-module top navigation, strategy controls, return comparisons and expandable paper accounts. This screenshot was captured locally with synthetic DEMO data; the rising curves do not represent actual returns. [Explore the public demo](https://myaistock.top/try).
- ## Try it online (recommended)
- The easiest way to try AI Stock is the hosted website. **Register with an invitation code for a daily platform allowance, or register without one and configure your own LLM API in My account. No local deployment needed.**
- **[Open AI Stock](https://myaistock.top/)** · **[Request an invitation code](mailto:im.hanyx@gmail.com?subject=AI%20Stock%20invitation%20code%20request)**
- Click **Request an invitation code** to open your configured default email app with the recipient and subject filled in, then send your request. You will receive a code by email; use it to register on the website, then log in. Already have an account? Log in directly.
- > **Use your own email account:** Gmail, Outlook, QQ Mail, 163 Mail, and other providers can all send the request. If no email app opens, right-click or long-press the request link and copy the email address, then compose a message in your usual mailbox with the subject “AI Stock invitation code request”. If you copied the full link, use only the address between `mailto:` and `?` as the recipient.
- **Start here:** [What you can do](#what-you-can-do) · [How it works](#how-it-works) · [Quick start](#quick-start) · [Your first report](#your-first-report)
- **Choose your language:** Use the language selector at the top of the website. Interface labels follow your selection; saved reports, news and user-written content keep their original language. Report output language is configured separately.
- ## What you can do
- | If you want to… | Open… | What you get |
- | --- | --- | --- |
- | See what is happening in the market | Market radar | Market snapshots, news, and macro observations |
- | Ask a question and follow up | Research assistant | A conversation with saved answers and research |
- | Study one stock | Stock research | A report with conclusions, evidence, and risks |
- | Compare different investing perspectives | Expert roundtable | Independent AI contributions and a moderator's summary |
- | Find stocks that meet your conditions | Strategy screening | Candidates with rankings and selection reasons |
- | Check how a strategy behaves | Trade simulation | Daily decisions, simulated fills, and account performance |
- | Follow holdings and a watchlist | Portfolio | Accounts, positions, a transaction ledger, and saved tracking plans |
- | Revisit results and automate research | Tasks & Runs, Scheduled tasks | Saved reports, execution status, and future runs |
- | Explore crypto spot markets | Market radar, research, screening, trading, and portfolio | USDT spot prices, asset screening, persistent daily rule backtests, and simulated positions |
- **Example question:** “Research AAPL's recent price trend and important news. Separate bullish and bearish evidence, include the dates of the data, and tell me what information is missing.”
- Built-in full-market screening rules mainly target A-shares. The “experts” are AI roles based on investment frameworks, not the actual people. Trading experiments use simulated funds and do not place live broker orders.
- Select the **Crypto market** in the existing modules; Binance Spot uses the same saved strategy and simulation workflows, with completed UTC daily bars. It does not place exchange orders. See the [crypto spot guide](docs/crypto-spot_EN.md).
- ## How it works
- <a href="docs/assets/readme/how-it-works-en.svg"><img src="docs/assets/readme/how-it-works-en.svg" alt="From a stock question to data, AI research, and saved results" width="560"></a>
- 1. **You set the question or stock scope.** Start with a chat, a stock code, or screening conditions.
- 2. **The system gathers available evidence.** Data sources supply prices, fundamentals, and news as supported; tools query data and calculate indicators.
- 3. **AI applies the selected method.** It uses the supplied evidence and strategy instructions to form an analysis. Optional experts examine the topic independently.
- 4. **You review the result.** Revisit saved reports, inspect risks and missing information, or run a separate trading simulation.
- An **Agent** is the AI assistant doing the work. A **Skill** is its analysis playbook. **Tools** perform queries and calculations; **MCP** connects external tools. You can start with enabled defaults and learn these settings later.
- Research and simulation have different inputs: a research report can use news and fundamentals when available, while trading decisions use the configured strategy, dated market bars, and simulated account state. See [simulation inputs and limits](docs/strategy-portfolios_EN.md).
- ## Quick start
- For the quickest start, use [AI Stock online](https://myaistock.top/) and [request an invitation code](#try-it-online-recommended). **The installation steps below are only for running your own instance.**
- ### 1. Prepare your computer
- Install **Python 3.10+**, **Node.js 20.19–26.x**, **npm 10+**, and Git. Prepare a model provider's API key and access to a model that supports **tool calling**. Hosted model calls may use paid provider credits; see [model configuration](docs/LLM_CONFIG_GUIDE_EN.md) for supported setup options, including local models.
- These commands use a **macOS/Linux shell**. Windows and Docker users can follow the [deployment guide](docs/DEPLOY_EN.md).
- ### 2. Download and install
- ```bash
- git clone https://github.com/EthanAlgoX/AIStock.git AI-Stock
- cd AI-Stock
- python3 -m venv .venv
- source .venv/bin/activate
- python -m pip install -r requirements.txt
- # Preserve any existing configuration.
- if [ ! -f .env ]; then cp .env.example .env; fi
- ```
- Already have the repository? Start from `cd AI-Stock` in its parent directory and keep your existing `.env`.
- ### 3. Build the website and start the server
- ```bash
- cd apps/dsa-web
- npm ci
- npm run build
- cd ../..
- python main.py --serve-only --host 127.0.0.1 --port 8000
- ```
- Open [http://127.0.0.1:8000](http://127.0.0.1:8000). Keep this terminal running while you use the local instance. Port `8000` is an example; if it is occupied, change `--port` and use the same port in your browser. API documentation is at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
- **The website opening is only the first step.** Configure and test your model before asking it to analyze stocks.
- In another terminal, check `curl --fail http://127.0.0.1:8000/api/health`. A successful response verifies the local API; model and data-source connections need their own checks.
- ## Your first report
- Using the hosted website? Invited accounts can use their available platform allowance. Accounts registered without an invitation must first save a personal LLM API in **My account** and verify it with a short assistant question. Then follow steps 3–4. Instance-wide Settings and data-source administration are for the instance owner.
- <a href="docs/assets/readme/first-report-en.svg"><img src="docs/assets/readme/first-report-en.svg" alt="First-run checklist: connect a model, check capabilities, submit a stock, read the report" width="560"></a>
- 1. **Connect AI.** In **Settings → Models & runtime**, choose your provider, enter its API key and model details, save, and test the connection. You can also configure the provider in `.env`; see the [model guide](docs/LLM_CONFIG_GUIDE_EN.md).
- 2. **Check available capabilities.** In the **Capability Center**, check enabled Skills, tools, and data sources. Configure a news source if your question needs recent news. A configured source is not necessarily reachable: use its availability check.
- 3. **Run one stock.** Open **Stock research**, click **New stock research**, choose a market, and enter a code: `600519` for an A-share, `hk00700` for a Hong Kong stock, or `AAPL` for a US stock, then select the matching stock from the results. Review the selected research method, enter your research goal, and click **Run stock research**. The system supplies the built-in research configuration; keep its required Skills and tools enabled.
- 4. **Read the saved report.** Check the conclusion, supporting evidence, data dates, and risks. Missing data or partial results matter. Reopen the result from research history or **Tasks & Runs**. Use **Research assistant** for follow-up questions, or **Expert roundtable** to compare views.
- For a first goal, try: “Explain this stock's recent trend and key risks. Show the evidence and flag anything you cannot verify.” Stock codes here are input examples, not recommendations.
- The header lets you switch between English, Simplified Chinese, Traditional Chinese, Japanese, and Korean. Changing the interface language does not translate existing reports.
- ### If something does not work
- | What you see | What to check |
- | --- | --- |
- | Website opens, but analysis fails | Save and test the model settings; check API access, credits, and tool-calling support |
- | A default plan cannot run | Check the market, built-in research configuration, and required Skills and tools in Capability Center |
- | A hosted account has no platform allowance | Save your personal LLM API in My account and check a short assistant request; a personal API failure does not fall back to platform credits |
- | News or prices are missing | Check source configuration and availability; review the run's error or partial-result details |
- | A background task stops after closing the terminal | The server must remain running; closing a browser tab is different from stopping the server |
- ## Go further when you are ready
- - **Compare viewpoints:** choose experts and pipeline, debate, or voting mode in Expert roundtable. [Collaboration guide](docs/expert-discussion.md) (Chinese)
- - **Test a strategy:** choose a Skill in Trade simulation, preview and confirm the stock scope, save, and run once or start daily simulation. Review decisions, costs, and simulated fills. [Trading guide](docs/strategy-portfolios_EN.md)
- - **Try JEV decisions (optional):** configure its separate TypeSafe API key in **Settings → Models & runtime**, then select **JEV · Decisions only** for a new trading strategy. JEV returns buy/sell/hold, probabilities, and confidence without a research report; chat and stock-scope selection still need your LLM. Start with the [official access information](https://typesafe.ai/blog/introducing-system-one-models-and-jev), [TypeSafe console](https://console.typesafe.ai/), and [JEV setup guide](docs/jev-trading-decisions.md).
- - **Run tasks on a schedule:** keep the server running, locally or on a deployed machine. Your browser can close; a local server stops when its computer is off. [Deployment guide](docs/DEPLOY_EN.md)
- - **Track holdings or a watchlist:** record holdings or followed stocks in Portfolio, save a tracking plan, and enable its schedule. Saving a plan and running research are separate actions. [Workflow guide](docs/website-functional-logic.md) (bilingual)
- ## Documentation and development
- | You need… | Read… |
- | --- | --- |
- | All guides | [Documentation index](docs/INDEX_EN.md) |
- | Model providers and API keys | [Model configuration](docs/LLM_CONFIG_GUIDE_EN.md) |
- | Configuration and notifications | [Full guide](docs/full-guide_EN.md) |
- | Deployment options | [Deployment](docs/DEPLOY_EN.md) |
- | Task architecture and capability permissions | [Workspace architecture](docs/web-decision-workspace.md) |
- | All features and their execution logic | [Website workflows](docs/website-functional-logic.md) (bilingual) |
- | An optional external Agent engine | [Runtime integration](docs/agent-runtime-integration_EN.md) |
- | Checks and release history | [Testing](docs/testing.md) · [Changelog](docs/CHANGELOG.md) |
- For frontend development, keep the backend running and run `npm run dev` in `apps/dsa-web`. Vite defaults to port `5173` and proxies `/api` to backend port `8000`; use `DSA_WEB_API_PROXY_TARGET` if the backend address differs.
- ```bash
- # From the repository root
- python -m pip install -r .github/requirements-ci.txt
- ./scripts/ci_gate.sh
- cd apps/dsa-web
- npm test -- --maxWorkers=2
- npm run lint
- npm run build
- ```
- ## License and scope
- [MIT License](LICENSE). AI Stock is for investment research and controlled historical or paper-trading experiments. Reports and simulated performance do not guarantee future returns. Historical AI replay can be affected by knowledge in model training; it is not proof of a profitable strategy.
- Previously named LLM TradeBot and InvestCrew; the current product name is **AI Stock** and the repository is `EthanAlgoX/AIStock`.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.