Session 4 课前准备
AI 炒股分析系统——从方法论到可运行 Skill
Session 4 Pre-class Setup
AI Stock Analysis System: From Framework to Runnable Skill

这节课在 第三课(Claude Design + Code)基础上新增三个工具:Git(版本控制)、GitHub 账号(存代码)、VS Code(查看和编辑文件)。另外课程脚本用到 Python + yfinance,需要提前装好。
预计准备时间:15–20 分钟。
This session adds three tools on top of Session 3 (Claude Design + Code): Git (version control), a GitHub account (code storage), and VS Code (file viewing and editing). The course script also uses Python + yfinance, which need to be installed in advance.
Estimated setup time: 15–20 minutes.

S2/S3 已经准备好了,不用重复Already Done in S2/S3 — Skip These

如果以上任何一条不满足,回到对应课程学员页按课前准备补上。If any of the above is missing, go back to that session's student page and follow the pre-class setup.

S4 新增工具一览New Tools for S4

工具Tool 用途Purpose 费用Cost
Git 本地版本控制;Claude Code 内部也依赖它Local version control; Claude Code relies on it internally 免费Free
VS Code 查看和编辑 Skill 文件、Python 脚本View and edit Skill files and Python scripts 免费Free
Python 3 + yfinance 课程数据拉取脚本(ticker_scan.pyCourse data-fetching script (ticker_scan.py) 免费Free

第 1 步Step 1 安装 GitInstall Git

  1. 打开 git-scm.com/download/winGo to git-scm.com/download/win
  2. 下载安装包,双击运行,一路点 Next(默认选项即可)Download the installer, double-click to run, and click Next through all screens (defaults are fine)
  3. 安装完后打开 PowerShell命令提示符,输入: After installation, open PowerShell or Command Prompt and type:
    git --version
  1. 打开 终端(Terminal),输入: Open Terminal and type:
    xcode-select --install
  2. 弹出对话框点 安装,等待完成(含 Git)Click Install in the dialog and wait for it to complete (Git is included)
  3. 验证:Verify:
    git --version
✅ 看到类似 git version 2.x.x 即为成功。 ✅ You should see something like git version 2.x.x — that means success.

第 2 步Step 2 安装 VS CodeInstall VS Code

  1. 打开 code.visualstudio.comGo to code.visualstudio.com
  2. 点蓝色 Download 按钮,下载对应系统的安装包Click the blue Download button and download the installer for your OS
  3. 双击安装,保持默认选项Double-click to install, keeping the default options
  4. 安装完打开 VS Code,确认能看到欢迎页即可Open VS Code after installation and confirm you see the welcome screen
课上 VS Code 用来做什么?What will VS Code be used for in class?

所有代码的实际编写和运行都通过 Claude Code 完成,VS Code 是你的"查看窗口"。All actual code writing and execution happens through Claude Code. VS Code is just your "viewing window."

第 3 步Step 3 安装 Python 3 + yfinanceInstall Python 3 + yfinance

3a. 检查 Python 是否已安装3a. Check if Python is already installed

打开终端 / PowerShell,输入:Open Terminal / PowerShell and type:

python --version

如果看到 Python 3.x.x,跳到 3b 直接装 yfinance。
如果报错或显示 Python 2,按下方步骤安装。
If you see Python 3.x.x, skip to 3b and install yfinance directly.
If it errors or shows Python 2, follow the steps below to install.

  1. 打开 python.org/downloadsGo to python.org/downloads
  2. 下载最新 Python 3(点黄色大按钮)Download the latest Python 3 (click the big yellow button)
  3. 安装时 必须勾选 "Add Python to PATH"(默认不勾,注意!)During installation, check "Add Python to PATH" (it's unchecked by default — don't miss this!)
  4. 安装完重新开一个 PowerShell 窗口,再运行 python --versionAfter installation, open a new PowerShell window and run python --version
  1. 打开终端,输入:Open Terminal and type:
    brew install python
    (没有 Homebrew?先运行 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" (No Homebrew? First run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)")
  2. 验证:python3 --versionVerify: python3 --version

3b. 安装 yfinance3b. Install yfinance

pip install yfinance

macOS 用户如果 pip 报错,改用 pip3 install yfinancemacOS users: if pip errors, use pip3 install yfinance instead.

✅ 验证:python -c "import yfinance; print('ok')" 输出 ok 即成功。 ✅ Verify: python -c "import yfinance; print('ok')" outputs ok — that means it worked.

全部验证(1 分钟)Full Verification (1 minute)

claude --version          # Claude Code 正常Claude Code working
git --version             # Git 已装Git installed
python --version          # Python 3.x
python -c "import yfinance; print('yfinance ok')"

上课前检查清单Pre-class Checklist

六项全 OK,上课见!All six done — see you in class!

💬 遇到问题发到微信群,上课前有人帮你看。 💬 Questions? Post in the WeChat group — someone will help before class starts.

Session 4 · AI 炒股分析系统——从方法论到可运行 Skill
Austin Xu · 北美华人 Claude AI 课程 · elitecoach101.com
Session 4 · AI Stock Analysis System: From Framework to Runnable Skill
Austin Xu · Claude AI Course for North American Chinese Professionals · elitecoach101.com