Skip to main content
skill CX Codex

alphaear-stock — Claude Code skill: what it does, how to install

Searches A-Share, HK, and US stock tickers, returning OHLCV price history and fundamental metrics.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a claude-code
Open on GitHub

What alphaear-stock does

The skill runs scripts/stock_tools.py through the StockTools class. It performs fuzzy searches for ticker codes or company names like Moutai or 600519. The tool outputs OHLCV historical pricing into a DataFrame using dates in YYYY-MM-DD format.

It retrieves fundamental metrics such as market cap and PE ratio. Execution depends on pandas, requests, akshare, and yfinance, plus tables in scripts/database_manager.py. Missing Python libraries cause it to fail.

Network settings require attention. When querying US stocks via yfinance, you might need to export HTTP_PROXY and HTTPS_PROXY. For A-Share and HK tickers, akshare accesses EastMoney directly, attempting direct connections automatically.

What it helps with

  • search stock tickers by company name or code
  • extract historical OHLCV pricing data into DataFrames
  • fetch market cap, PE ratio, and industry fundamentals

Example prompts for the agent

  • Search for ticker Moutai and show company fundamentals
  • Get OHLCV price history for stock code 600519 for specific start_date and end_date
  • Check PE ratio and market cap for ticker AAPL

How to install alphaear-stock

1Skills CLI (Vercel)

npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a claude-code

2Manually: put the files in place

~/.claude/skills/alphaear-stock/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/alphaear-stock/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about alphaear-stock

How to install alphaear-stock in Claude Code?

Run npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a claude-code. The file is saved to ~/.claude/skills/alphaear-stock/SKILL.md.

What does the alphaear-stock skill do?

It queries ticker codes across US, HK, and Chinese A-Share markets. It also delivers historical OHLCV price records and company fundamentals.

Why does the skill mention proxy settings for US stocks?

Data retrieval via yfinance needs access to Yahoo Finance. If your local network cannot connect to it, export HTTP_PROXY and HTTPS_PROXY in your environment.

Source text

SKILL.md · Apache-2.0
---
name: alphaear-stock
description: Search A-Share/HK/US finance stock tickers and retrieve finance stock price history. Use when user asks about finance stock codes, recent price changes, or specific company finance stock info.
---

# AlphaEar Stock Skill

## Overview

Search A-Share/HK/US stock tickers and retrieve historical price data (OHLCV).

## Capabilities

### 1. Stock Search & Data

Use `scripts/stock_tools.py` via `StockTools`.

-   **Search**: `search_ticker(query)`
    -   Fuzzy search by code or name (e.g., "Moutai", "600519").
    -   Returns: List of `{code, name}`.
-   **Get Price**: `get_stock_price(ticker, start_date, end_date)`
    -   Returns DataFrame with OHLCV data.
    -   Dates format: "YYYY-MM-DD".
-   **Get Fundamentals**: `get_stock_fundamentals(ticker)`
    -   Returns dict with sector, industry, market cap, PE ratio, and summary.
    -   Supports A-Share/HK/US stocks.

## Dependencies

-   `pandas`, `requests`, `akshare`, `yfinance`
-   `scripts/database_manager.py` (stock tables)

## Notes

-   **Proxy**: For US stock data (via `yfinance`), you may need to set environment variables if your network cannot reach Yahoo Finance directly:
    ```bash
    export HTTP_PROXY="http://<proxy_ip>:<port>"
    export HTTPS_PROXY="http://<proxy_ip>:<port>"
    ```
-   **A-Share/HK**: Data is primarily fetched via `akshare` (EastMoney), which usually works best with a direct connection in China. The tool automatically detects proxy issues and attempts direct connection for these markets.

© RKiding · Apache-2.0 · RKiding/Awesome-finance-skills

Similar skills

Everything for Finance and business →

From the same set9

alphaear-news Fetches real-time finance news from Weibo, Zhihu, and WallstreetCN, plus Polymarket prediction data. Useful for tracking market trends and active prediction summaries. CX Codex +1 1,500installs alphaear-sentiment Financial sentiment analysis skill using local FinBERT or LLM inference. Classifies market texts into positive, negative, or neutral with a numeric score. CX Codex +1 645installs alphaear-predictor This skill produces a Kronos-based forecast for a financial time series, then adjusts the numbers against fresh news. Useful when you need a short-horizon price view. CX Codex +1 584installs alphaear-signal-tracker A skill that tracks investment signals over time: it weighs fresh news and prices and decides whether a signal got stronger, weaker or was falsified. CX Codex +1 560installs alphaear-search A skill that runs finance searches on the web through Jina, DDG or Baidu, and pulls results from a local news store. Useful when the agent needs fresh data or your own documents. CX Codex +1 542installs alphaear-reporter A skill that walks the agent through clustering signals, writing sections, assembling a financial report and building charts. CX Codex +1 535installs alphaear-logic-visualizer Turns finance transmission chains and investment theses into Draw.io XML, then saves the result as a viewable HTML file. CX Codex +1 496installs alphaear-deepear-lite Fetches high-frequency financial signals and transmission-chain analyses from DeepEar Lite. Useful for reviewing market sentiment and stock movement drivers in chat. CX Codex +1 334installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor