soe-filter

Filter state-owned and central-enterprise stocks from equity universes using R1-R4 rules.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/chinawrj/agent-skills-stock --skill soe-filter
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: soe-filter
Source: https://github.com/chinawrj/agent-skills-stock/tree/main/.github/skills/soe-filter
Command: npx skills add https://github.com/chinawrj/agent-skills-stock --skill soe-filter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, pandas, and includes scripts (resource) components.

What problem does it solve?

This skill removes state-owned and central-enterprise stocks from a stock universe to help investors focus on private and foreign-owned companies, enabling safer pre-screening.

Core Features & Use Cases

  • Exclusion rules: apply four rule sets (R1–R4) to identify and drop state-owned stocks from the investment universe.
  • Input flexibility: accepts a Parquet of stock data or a DuckDB stocks table and can fall back to a cache CSV if data is unavailable.
  • Outputs and review: writes a non-SoE universe parquet and a review CSV for ambiguous cases, plus a built-in self-test and guardrails to ensure data integrity.

Quick Start

Run the filter_soe.py script on your universe data to generate the non-SoE universe.

Frequently Asked Questions about soe-filter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I filter out state-owned stocks from an A-share investment universe?▼

To filter state-owned stocks from an A-share investment universe, apply exclusion rules to identify and drop central-enterprise equities. The skill processes stock data and outputs a non-SOE universe parquet alongside a review CSV for ambiguous cases.

Can I use a DuckDB stocks table as input for state-owned enterprise screening?▼

Yes, state-owned enterprise screening accepts a DuckDB stocks table as input for filtering. It also supports reading directly from a Parquet file and gracefully falls back to a cache CSV when primary data sources are unavailable.

What are the R1-R4 exclusion rules for removing central-enterprise stocks?▼

The R1-R4 exclusion rules are four applied rule sets designed to identify and drop state-owned and central-enterprise stocks from equity universes. They ensure comprehensive filtering while isolating uncertain cases into a separate review CSV.

How do I handle ambiguous stocks during SOE universe filtering?▼

During SOE universe filtering, ambiguous stocks that cannot be definitively classified by the exclusion rules are separated. The skill writes these uncertain cases to a review CSV, allowing manual inspection while retaining clear non-SOE stocks in a parquet file.

Does stock screening for state-owned enterprises work with pandas and Parquet files?▼

Yes, stock screening for state-owned enterprises works with pandas and Parquet files. The skill leverages both pandas and DuckDB dependencies to process equity data and writes the resulting non-SOE universe directly to a Parquet file.

Why does my A-share universe still contain state-owned equities after filtering?▼

If an A-share universe retains state-owned equities after filtering, they are likely ambiguous cases flagged by the four exclusion rules. Check the generated review CSV, which captures uncertain stocks that require manual verification before removal.