whatisgithub

What is astock-peg?

simonlin1212/astock-peg — explained in plain English

Analysis updated 2026-05-18

16TypeScriptAudience · generalComplexity · 3/5Setup · moderate

In one sentence

A web tool that fetches Chinese A-share stock data and uses AI to generate a structured PEG valuation report in under 30 seconds.

Mindmap

mindmap
  root((repo))
    What it does
      Fetches stock data
      Calculates PEG ratio
      Generates AI report
    Tech stack
      Next.js
      React
      Tailwind CSS
      Python
    Use cases
      Stock code lookup
      Peer comparison
      News aggregation
    Audience
      Investors
      General users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Look up a six digit Chinese stock code and get an automated PEG valuation report.

USE CASE 2

Compare a stock against its top 20 sector peers by market cap.

USE CASE 3

Read an aggregated news feed of stock specific headlines alongside the valuation.

What is it built with?

Next.jsReactTailwind CSSPython

How does it compare?

simonlin1212/astock-pegdabao-yi/model-fluxdenjino/horizon-view
Stars161616
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/53/52/5
Audiencegeneraldevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires your own Anthropic or OpenAI API key, for educational use only, not investment advice.

So what is it?

Astock-peg is a web-based tool for analyzing Chinese A-share stocks using PEG valuation, a method popularized by investor Peter Lynch. PEG stands for Price/Earnings-to-Growth: it takes a stock's P/E ratio (price divided by earnings, which tells you how expensive a stock looks) and divides it by the company's earnings growth rate. This gives a more complete picture than P/E alone: a high P/E might still be reasonable if the company is growing very fast, and a low P/E is less attractive if growth has stalled. The tool automates what would otherwise be tedious manual work: you type in a six-digit Chinese stock code, and the system fetches real-time price data, collects financial statements, calculates the PEG ratio, and sends everything to an AI to generate a structured seven-section valuation report covering fundamentals, PEG analysis, earnings quality, sector peers comparison, and risk notes, in under 30 seconds. The report can be exported as a PDF. Additional features include a sector PE comparison view that auto-detects which industry a stock belongs to and shows the top 20 peers by market cap, and a news feed that aggregates stock-specific headlines. The tech stack is Next.js 16, React 19, and Tailwind CSS on the frontend, with Python scripts using akshare and mootdx for financial data collection. AI analysis requires an Anthropic Claude or OpenAI API key that you provide yourself. All data is stored in JSON files with no database required. The disclaimer in the README states the tool is for educational and research purposes only, not investment advice.

Copy-paste prompts

Prompt 1
Explain how PEG ratio valuation works and what this tool calculates.
Prompt 2
Help me set up astock-peg with my own Anthropic or OpenAI API key.
Prompt 3
Walk me through generating a PEG valuation report for a specific stock code.
Prompt 4
What financial data sources does astock-peg use to fetch stock information?

Frequently asked questions

What is astock-peg?

A web tool that fetches Chinese A-share stock data and uses AI to generate a structured PEG valuation report in under 30 seconds.

What language is astock-peg written in?

Mainly TypeScript. The stack also includes Next.js, React, Tailwind CSS.

How hard is astock-peg to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is astock-peg for?

Mainly general.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.