当前位置: 首页 > Skill >

Vnstock Free Expert

Vnstock Free Expert

Vnstock Free Expert

执行端到端 vnstock 工作流,实现免费层安全的越南股票估值、排名及 API 操作,严格速率限制控制;在用户请求时使用。

1.0.3 2026.11.26 119
获取Skill文件查看使用说明
作 者:陆禾 许可证: 更新时间:2026.11.26
本文目录展开

VNStock Free Expert

Use this skill when the user needs advanced Vietnam stock analysis with vnstock, while staying safe on free-tier limits.

Important packaging note

This skill is self-contained and does not require shipping a separate vnstock/ docs folder. All operational knowledge needed by the agent is stored under:

  • references/

Read order

  1. Read references/capabilities.md.
  2. Read references/method_matrix.md for exact class/method mapping.
  3. Read references/free_tier_playbook.md before large runs.

Scope and constraints

  • Library: vnstock only.
  • Preferred sources: kbs first, vci fallback.
  • Never use tcbs.
  • Treat Screener API as unavailable unless user confirms it is restored in their installed version.

Free-tier operating rules

  • No API key: target <= 20 requests/minute.
  • Free API key: target <= 60 requests/minute.
  • Safe default pacing in scripts: 3.2s/request.
  • Reuse cached artifacts between steps.

Shared confidence rubric (required)

Report confidence as High / Medium / Low using this standard:

  • High: universe coverage >= 95%, critical metrics coverage >= 80%, and hard errors <= 5% of symbols.
  • Medium: universe coverage >= 80%, critical metrics coverage >= 60%, and hard errors <= 15%.
  • Low: below Medium thresholds or material missing fields that can flip ranking results.

Always output:

  1. Confidence level.
  2. Coverage stats (symbols_requested, symbols_scored, % missing by key metric).
  3. Top missing fields that may change conclusions.

API key configuration (implemented)

  • Skill-local key file: .env
  • Variable: VNSTOCK_API_KEY
  • All API-calling scripts auto-load this key and call vnstock auth setup before requests.
  • You can override per run with --api-key "...".

Execution workflow (ordered)

  1. Validate environment (python, vnstock, pandas) and load optional API key from .env.
  2. Build a universe using scripts/build_universe.py (group, exchange, or symbols mode).
  3. Collect market data with scripts/collect_market_data.py using safe pacing.
  4. Collect fundamentals with scripts/collect_fundamentals.py.
  5. Score and rank using scripts/score_stocks.py.
  6. Generate analyst-style memo with scripts/generate_report.py.
  7. Apply confidence rubric, disclose missing fields, and summarize risks.

Downstream handoff bundle (required when doing single-ticker deep dive)

When the user request is about valuing or building a memo for a specific ticker (or a small list), output a compact JSON bundle that downstream skills can reuse:

  • ticker, as_of_date, currency
  • financials (income/balance/cashflow + key ratios if available)
  • price_history (returns 1m/3m/6m/12m)
  • peer_set (if you built one)
  • metadata.source and data_quality_notes

Handoff stability rule:

  • Keep field names stable so downstream skills can consume the bundle without reinterpretation.
  • Never omit a required top-level key; use null, an empty object, or an empty list when data is unavailable.
  • Put provider errors and missing fields in metadata.data_quality_notes.

This bundle is designed to feed equity-valuation-framework and portfolio-risk-manager.

Script map

A) Discovery and universal invocation (for broad feature coverage)

  1. catalog_vnstock.py Path: scripts/catalog_vnstock.py

Use when:

  • You need to inspect available classes/methods in the installed vnstock version.
  • You want to confirm compatibility before running a method.
  1. invoke_vnstock.py Path: scripts/invoke_vnstock.py

Use when:

  • You need to call any supported class/method beyond the prebuilt valuation pipeline.
  • You want one generic entry point for Listing, Quote, Company, Finance, Trading, Fund, or other exported classes.

This script supports dynamic invocation by class name and method name with JSON kwargs.

B) Valuation pipeline scripts

  1. build_universe.py Use when building symbol universe from index/exchange/custom symbol list. Input: source + mode + group/exchange/symbols. Output: outputs/universe_*.csv and latest pointers.

  2. collect_market_data.py Use when collecting OHLCV/momentum fields (3M, 6M, 12M returns). Input: universe CSV path. Output: outputs/market_data_*.csv + per-symbol errors in JSON.

  3. collect_fundamentals.py Use when collecting valuation and quality metrics from finance/company APIs. Input: universe CSV path. Output: outputs/fundamentals_*.csv + per-symbol errors in JSON.

  4. score_stocks.py Use when ranking symbols with composite scoring. Input: market + fundamentals CSV files. Output: outputs/ranking_*.csv.

  5. generate_report.py Use when converting ranking output to analyst-style markdown memo. Input: ranking CSV file. Output: outputs/investment_memo_*.md.

  6. run_pipeline.py Use when running the end-to-end pipeline in one command. Input: source + universe mode. Output: all artifacts above in one run.

Error handling rules

  1. Log symbol-level failures and continue processing remaining symbols.
  2. Do not claim missing metrics as zeros; mark them as missing.
  3. If a critical step fails, stop and report failed step + command + suggested retry scope.

Recommended decision logic

  1. If request is “standard valuation/ranking”: run pipeline scripts.
  2. If request needs a specific vnstock capability not in pipeline: use catalog_vnstock.py then invoke_vnstock.py.
  3. If request volume is large: apply free_tier_playbook.md throttling and chunking strategy.

Confidence aggregation (required)

When output includes ranking and valuation interpretation:

  1. Compute data confidence from coverage metrics (symbols_scored, missing key fields, error ratio).
  2. Compute model confidence from method robustness (single metric vs multi-factor consistency).
  3. Final confidence = lower of data confidence and model confidence.
  4. In Low confidence cases, provide directional output only and list required missing inputs.

Required output template

  1. What Was Run: scripts, source, universe scope, and pacing profile.
  2. Coverage: requested symbols, scored symbols, and missingness by key field.
  3. Top Results: ranked list with score columns.
  4. Key Risks: concentration, stale data, missing metrics, or provider limitations.
  5. Confidence and Gaps: final confidence + exact blockers.

Quick command examples

python scripts/catalog_vnstock.py --outdir ./outputs
python scripts/invoke_vnstock.py --class-name Quote --init-kwargs '{"source":"kbs","symbol":"VCB"}' --method history --method-kwargs '{"start":"2024-01-01","end":"2024-12-31","interval":"1D"}' --outdir ./outputs
python scripts/run_pipeline.py --source kbs --mode group --group VN30 --outdir ./outputs

Trigger examples

  • "Analyze VN30 using vnstock but keep it free-tier safe."
  • "Rank Vietnamese stocks by value/quality/momentum with KBS data."
  • "Run a full vnstock pipeline and return top candidates with risk notes."

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
Skill 文件
  • SKILL.md
    • VNStock Free Expert
    • Important packaging note
    • Read order
    • Scope and constraints
    • Free-tier operating rules
    • Shared confidence rubric (required)
    • API key configuration (implemented)
    • Execution workflow (ordered)
    • Downstream handoff bundle (required when doing single-ticker deep dive)
    • Script map
      • A) Discovery and universal invocation (for broad feature coverage)
      • B) Valuation pipeline scripts
    • Error handling rules
    • Recommended decision logic
    • Confidence aggregation (required)
    • Required output template
    • Quick command examples
    • Trigger examples
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期