agentleFS
qunyou-agentqunyou-agent/finance-skills/skills/data/data-cleaning/SKILL.md

data-cleaning

Skill4 starsChanged 4 months agoMITView on GitHub

Cleans and preprocesses financial time series data. Handles missing values, outliers, corporate actions (splits, dividends), date alignment, and data quality checks. Trigger when the user has messy financial data or needs to prepare data for analysis.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check nulls → df.isnull().sum(), decide fill strategy

    line 31

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Data Cleaning

Prepares financial time series data for analysis by handling common data quality issues.

Real Code Reference

  • tradinglearn/utils/data_fetcher.py — fetch_stock_data() normalizes TDX raw data to clean DataFrame
  • tradinglearn/utils/simple_pytdx2.py — mock data generator with controllable noise
  • tradinglearn/pytdx2/client/quotationClient.py — raw data source (prices need scaling adjustments)

Capabilities

  • Missing values: forward fill (ffill), linear interpolation, drop, or flag
  • Outlier detection: z-score, IQR, moving average deviation
  • Corporate actions: adjust prices for splits and dividends using adjustment factors
  • Date alignment: merge multiple series on common trading dates (not calendar dates)
  • Data quality: volume anomalies, price gaps > N%, stale data, duplicate rows

Typical Workflow

  1. Load raw data → pd.DataFrame with columns: date, open, high, low, close, volume
  2. Check nulls → df.isnull().sum(), decide fill strategy
  3. Detect outliers → flag bars where abs(zscore(returns)) > 3
  4. Adjust for splits → apply adjustment factor series
  5. Align dates → reindex to intersection of all trading calendars
  6. Validate → no NaNs, no suspicious jumps, no future dates

Edge Cases

  • Non-trading days: use trading calendar, not calendar days
  • IPO dates: trim to actual listing date (data before is invalid)
  • Suspended stocks: forward-fill last price or mark as NaN
  • Pre/after-hours: decide whether to include or filter

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.