Time series cleaning

From aifinlab/FinClaw · View interactive version

Time series cleaning is an AI agent skill from the GitHub repository aifinlab/FinClaw. 用于时序标准化的时间序列数据整理原子 skill,适用于通用行业数据接入场景。

How to use this skill

Skill file

时间序列数据整理 Skill

数据来源

本 Skill 支持多种时间序列数据输入格式,核心数据来源包括:

1. 数据源类型

2. 时间序列类型

3. 数据格式要求

4. 数据特征

说明:本 Skill 不包含数据采集功能,需要用户提供时间序列数据。建议数据包含完整的时间信息,以便进行准确的数据整理。


功能

本 Skill 提供全面的时间序列数据整理能力,涵盖多种整理功能:

1. 数据清洗

2. 时间标准化

3. 数据标准化

4. 数据补全

5. 数据验证

6. 高级处理功能


使用示例

输出示例

{
  "source_info": {
    "data_source": "database",
    "table_name": "stock_prices",
    "time_field": "trade_date",
    "value_field": "close_price",
    "total_records": 10000
  },
  "cleaning_results": {
    "missing_values": {
      "count": 50,
      "percentage": 0.5,
      "handled": true,
      "method": "forward_fill"
    },
    "outliers": {
      "count": 20,
      "percentage": 0.2,
      "detected": true,
      "method": "iqr",
      "removed": false
    },
    "duplicates": {
      "count": 10,
      "percentage": 0.1,
      "removed": true
    }
  },
  "standardization_results": {
    "time_format": {
      "original": "YYYY-MM-DD",
      "standardized": "YYYY-MM-DD",
      "timezone": "UTC"
    },
    "value_format": {
      "original_unit": "元",
      "standardized_unit": "CNY",
      "precision": 2
    },
    "frequency": {
      "original": "daily",
      "standardized": "daily",
      "aligned": true
    }
  },
  "data_quality": {
    "completeness": 0.995,
    "accuracy": 0.98,
    "consistency": 0.97,
    "overall_score": 0.98
  },
  "cleaned_data": {
    "total_records": 9990,
    "time_range": {
      "start": "2024-01-01",
      "end": "2024-12-31"
    },
    "sample_data": [
      {
        "time": "2024-01-01",
        "value": 100.50,
        "quality": "good"
      },
      {
        "time": "2024-01-02",
        "value": 101.20,
        "quality": "good"
      }
    ]
  },
  "statistics": {
    "processing_time": "5.2s",
    "records_processed": 10000,
    "records_cleaned": 9990,
    "records_removed": 10
  }
}

注意事项与限制

1. 数据质量要求

2. 缺失值处理

3. 异常值处理

4. 时间标准化

5. 使用限制


参考资料

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.