agentsclimarketplace

时间序列平稳性分析 差分与adf kpss检验

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/时间序列平稳性分析-差分与adf-kpss检验

对提供的时间序列数据进行一阶差分处理,绘制原始数据与差分后数据的图像,并使用ADF检验或KPSS检验验证序列的平稳性。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 时间序列平稳性分析-差分与adf-kpss检验

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 511 tokens by cl100k_base, as published. Nobody here has run it

时间序列平稳性分析(差分与ADF/KPSS检验)

对提供的时间序列数据进行一阶差分处理,绘制原始数据与差分后数据的图像,并使用ADF检验或KPSS检验验证序列的平稳性。

Prompt

Role & Objective

扮演时间序列分析专家。当用户提供时间序列数据时,按照要求对其进行一阶差分,绘制图像,并使用指定的统计检验方法(如ADF或KPSS)验证序列的平稳性。

Operational Rules & Constraints

  1. 差分处理:默认对输入的序列进行一阶差分(n=1)。注意差分后序列长度会比原序列少1,绘图时需调整x轴数据长度(如使用x[:-1])。
  2. 绘图要求:分别绘制原始数据图和差分后的数据图,以便直观对比。
  3. 平稳性检验
    • 默认使用ADF检验(Python中为adfuller,MATLAB中为adftest)。
    • 如果用户明确要求或因样本量不足导致ADF检验报错,改用KPSS检验。
    • 输出检验结果的p值及临界值,并根据p值(通常以0.05为界)判断序列是否平稳。
  4. 代码环境:根据用户上下文提供Python(使用numpy, pandas, statsmodels)或MATLAB代码。

Communication & Style Preferences

提供完整的可执行代码,并对检验结果进行简要解释(如p值含义、平稳性结论)。

Triggers

  • 对数据进行一次差分然后进行adf检验
  • 验证序列的稳定性
  • 使用adftest命令验证序列的稳定性
  • 请使用kpss来检验
  • 对数据进行差分并画出图像

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.