[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72WEV411PV1EFWK74YXZPBN":3,"skill-same:01M72WEV411PV1EFWK74YXZPBN":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M72WEV411PV1EFWK74YXZPBN","prep-ml-data",null,"Transform bar data into ML-ready features and labels and summarize basic insights. Use when any skill or user request needs a feature\u002Flabel dataset as input to model training or evaluation.","homelessrain\u002FAgenticAlphaLab","homelessrain","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7471268?v=4","01M72WEMXZ7F29SZBGAB55YZF2","01M72WEMYMT55HAV9978KZ8NHZ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fprep-ml-data\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: prep-ml-data\ndescription: Transform bar data into ML-ready features and labels and summarize basic insights. Use when any skill or user request needs a feature\u002Flabel dataset as input to model training or evaluation.\n---\n\n# prep-ml-data\n\nTransform OHLCV bar data into an ML-ready dataset with features and labels, cache the result to `data\u002Fml\u002F`, and summarize basic insights. This skill is a building block — other skills (research, evaluate) delegate here when they need a prepared dataset.\n\n## Inputs\n\nParse these from the user's request:\n\n| Parameter | Description |\n|---|---|\n| `symbol` | Ticker string or list |\n| `start` \u002F `end` | Date range `YYYY-MM-DD` |\n| `features` | Natural language description of features to compute (e.g. \"returns, volume ratio, rolling volatility\") |\n| `label` | Natural language description of the label (e.g. \"direction up with 1% threshold over next 120 bars\") |\n\nIf the user doesn't specify features or label, ask before proceeding.\n\n## Preferred approach: ML data processor classes\n\nPrefer these over assembling the pipeline manually. They handle bar fetching, flattening, feature\u002Flabel transforming, and joining minute + daily features in one call. Live in `utils\u002Fml_data_processor.py`.\n\n**`MinuteAndDailyMLDataProcessor`** — single symbol. Fetches minute bars (for labels + short-term features) and daily bars (for longer-horizon features joined on the previous trading day).\n\n```python\nfrom utils.ml_data_processor import MinuteAndDailyMLDataProcessor\n\nproc = MinuteAndDailyMLDataProcessor(\n    symbol='QQQ',\n    bar_fetcher=None,                  # defaults to AlpacaBarFetcher\n    label_transformer=None,            # defaults to DirectionLabelTransformer()\n    minute_feature_transformer=None,   # defaults to OLHCVFeatureTransformer()\n    daily_feature_transformer=None,    # defaults to OLHCVFeatureTransformer()\n    generate_labels=True,              # set False for inference\n)\ndf = proc.run('2026-01-01', '2026-05-01')\n\n# Access column names via properties\nlabel_col   = proc.label_column     # e.g. 'label'\nfeature_cols = proc.feature_columns  # list of all minute + daily feature col names\n```\n\nOutput columns use `_minute` \u002F `_daily` suffixes to distinguish granularity. The `datetime` column is always present and is the join key.\n\n**`MultipleSymbolMinuteAndDailyMLDataProcessor`** — multiple symbols, joined on `datetime`.\n\n```python\nfrom utils.ml_data_processor import MinuteAndDailyMLDataProcessor, MultipleSymbolMinuteAndDailyMLDataProcessor\n\nmulti = MultipleSymbolMinuteAndDailyMLDataProcessor(\n    symbols=['QQQ', 'SQQQ'],\n    list_of_ml_data_processors=[\n        MinuteAndDailyMLDataProcessor('QQQ'),\n        MinuteAndDailyMLDataProcessor('SQQQ'),\n    ],\n)\ndf = multi.run('2026-01-01', '2026-05-01')\n\nlabel_col    = multi.label_column\nfeature_cols = multi.feature_columns\n```\n\n## Available label transformers\n\nUse these directly when building a custom processor or working outside the processor classes. Both live in `utils\u002Flabel_transformer.py`.\n\n**`DirectionLabelTransformer`** — binary label: within the next `lookforward_period` bars, did the max gain reach `up_delta` AND the max loss stay below `down_delta`? This is a simultaneous max\u002Fmin check, not path-dependent.\n```python\nfrom utils.label_transformer import DirectionLabelTransformer\ntransformer = DirectionLabelTransformer(\n    price_column='close',\n    label_column='label',\n    positive_label='up',       # 'up' or 'down'\n    up_delta=0.01,             # 1% max-gain threshold\n    down_delta=0.01,           # 1% max-loss exclusion threshold\n    lookforward_period=120,    # bars ahead to look\n)\ndf = transformer.transform(df)\n```\nRecommended baseline: `up_delta=down_delta=0.01`, `lookforward_period=120` → ~9% positive rate on QQQ 1-min bars. Avoid `lookforward_period=30` at 1% (positive rate ~1.4%, too sparse).\n\n**`VolatilityLabelTransformer`** — binary label: within the next `lookforward_period` bars, did the max gain OR max loss reach `change_delta`? Fires ~2× more often than direction at the same parameters.\n```python\nfrom utils.label_transformer import VolatilityLabelTransformer\ntransformer = VolatilityLabelTransformer(\n    price_column='close',\n    label_column='label',\n    change_delta=0.01,\n    lookforward_period=120,\n)\ndf = transformer.transform(df)\n```\nAt ≥1% threshold, volatility ≈ direction-up OR direction-down with negligible whipsaw contamination. Use volatility when you care about any large move; use direction when you need a directional signal.\n\n## Available feature transformers\n\nUse these directly when building a custom processor. Lives in `utils\u002Ffeature_transformer.py`.\n\n**`OLHCVFeatureTransformer`** — derives a rich feature set from OHLCV columns. Requires a `datetime` column (not index); the processor classes handle this automatically via `_flatten()`.\n\nFeatures produced:\n- **Lag features** — raw OHLCV values at lags 0–9\n- **Bar-over-bar change** — diff ratio and log-ratio for each OHLCV column\n- **Moving-average ratios** — price\u002Fvolume relative to MA windows {5, 10, 20, 50, 100, 200}, both ratio and log-ratio\n- **Technical indicators** — RSI (lengths 14\u002F20\u002F30\u002F50\u002F100\u002F200), MACD line\u002Fhistogram\u002Fsignal\n- **Time features** — `hour_of_day` and `day_of_week`\n\n```python\nfrom utils.feature_transformer import OLHCVFeatureTransformer\n\n# Flatten MultiIndex bar df first\ndf = df.reset_index().rename(columns={'timestamp': 'datetime'})\n\ntransformer = OLHCVFeatureTransformer()\ndf = transformer.transform(df)\nfeature_cols = transformer.feature_columns  # list of added feature column names\n```\n\n## Steps (when using the processor classes)\n\n1. **Instantiate and run** the appropriate processor class above.\n\n2. **Drop rows with NaNs** introduced by rolling windows or the lookforward shift:\n   ```python\n   df = df.dropna(subset=proc.feature_columns + [proc.label_column])\n   ```\n\n3. **Save three files to `data\u002Fml\u002F`**:\n   ```python\n   import os\n   base = f'data\u002Fml\u002F{symbol}_{start}_{end}_minute'\n   os.makedirs('data\u002Fml', exist_ok=True)\n\n   features_path = f'{base}_features.parquet'\n   labels_path   = f'{base}_{label_description}_labels.parquet'\n   joined_path   = f'{base}_{label_description}_joined.parquet'\n\n   df[proc.feature_columns].to_parquet(features_path)\n   df[[proc.label_column]].to_parquet(labels_path)\n   df[proc.feature_columns + [proc.label_column]].to_parquet(joined_path)\n   ```\n\n4. **Summarize and report**:\n   - Paths written: features, labels, joined\n   - Shape of each file\n   - Label distribution (value counts + positive rate)\n   - NaN rows dropped (before vs after dropna)\n   - When called by another skill, return all three paths: `features_path`, `labels_path`, `joined_path`\n\n## Notes\n\n- `data\u002Fml\u002F` is gitignored — cache files are local only.\n- The processor extends the fetch range automatically: ±1 day for minute bars (covers rolling warmup and lookforward tail), −365 days for daily bars (covers MA-200 warmup). The output is filtered back to the requested `start`\u002F`end`.\n- Daily features are joined on the *previous* trading day to avoid same-day data leakage.\n- Output columns: minute features end in `_minute`, daily features in `_daily`. Use `proc.feature_columns` to get the full list rather than inferring from column names.\n- For label column name, use `proc.label_column` rather than hardcoding `'label'`.\n","# prep-ml-data\n\nTransform OHLCV bar data into an ML-ready dataset with features and labels, cache the result to `data\u002Fml\u002F`, and summarize basic insights. This skill is a building block — other skills (research, evaluate) delegate here when they need a prepared dataset.\n\n## Inputs\n\nParse these from the user's request:\n\n| Parameter | Description |\n|---|---|\n| `symbol` | Ticker string or list |\n| `start` \u002F `end` | Date range `YYYY-MM-DD` |\n| `features` | Natural language description of features to compute (e.g. \"returns, volume ratio, rolling volatility\") |\n| `label` | Natural language description of the label (e.g. \"direction up with 1% threshold over next 120 bars\") |\n\nIf the user doesn't specify features or label, ask before proceeding.\n\n## Preferred approach: ML data processor classes\n\nPrefer these over assembling the pipeline manually. They handle bar fetching, flattening, feature\u002Flabel transforming, and joining minute + daily features in one call. Live in `utils\u002Fml_data_processor.py`.\n\n**`MinuteAndDailyMLDataProcessor`** — single symbol. Fetches minute bars (for labels + short-term features) and daily bars (for longer-horizon features joined on the previous trading day).\n\n```python\nfrom utils.ml_data_processor import MinuteAndDailyMLDataProcessor\n\nproc = MinuteAndDailyMLDataProcessor(\n    symbol='QQQ',\n    bar_fetcher=None,                  # defaults to AlpacaBarFetcher\n    label_transformer=None,            # defaults to DirectionLabelTransformer()\n    minute_feature_transformer=None,   # defaults to OLHCVFeatureTransformer()\n    daily_feature_transformer=None,    # defaults to OLHCVFeatureTransformer()\n    generate_labels=True,              # set False for inference\n)\ndf = proc.run('2026-01-01', '2026-05-01')\n\n# Access column names via properties\nlabel_col   = proc.label_column     # e.g. 'label'\nfeature_cols = proc.feature_columns  # list of all minute + daily feature col names\n```\n\nOutput columns use `_minute` \u002F `_daily` suffixes to distinguish granularity. The `datetime` column is always present and is the join key.\n\n**`MultipleSymbolMinuteAndDailyMLDataProcessor`** — multiple symbols, joined on `datetime`.\n\n```python\nfrom utils.ml_data_processor import MinuteAndDailyMLDataProcessor, MultipleSymbolMinuteAndDailyMLDataProcessor\n\nmulti = MultipleSymbolMinuteAndDailyMLDataProcessor(\n    symbols=['QQQ', 'SQQQ'],\n    list_of_ml_data_processors=[\n        MinuteAndDailyMLDataProcessor('QQQ'),\n        MinuteAndDailyMLDataProcessor('SQQQ'),\n    ],\n)\ndf = multi.run('2026-01-01', '2026-05-01')\n\nlabel_col    = multi.label_column\nfeature_cols = multi.feature_columns\n```\n\n## Available label transformers\n\nUse these directly when building a custom processor or working outside the processor classes. Both live in `utils\u002Flabel_transformer.py`.\n\n**`DirectionLabelTransformer`** — binary label: within the next `lookforward_period` bars, did the max gain reach `up_delta` AND the max loss stay below `down_delta`? This is a simultaneous max\u002Fmin check, not path-dependent.\n```python\nfrom utils.label_transformer import DirectionLabelTransformer\ntransformer = DirectionLabelTransformer(\n    price_column='close',\n    label_column='label',\n    positive_label='up',       # 'up' or 'down'\n    up_delta=0.01,             # 1% max-gain threshold\n    down_delta=0.01,           # 1% max-loss exclusion threshold\n    lookforward_period=120,    # bars ahead to look\n)\ndf = transformer.transform(df)\n```\nRecommended baseline: `up_delta=down_delta=0.01`, `lookforward_period=120` → ~9% positive rate on QQQ 1-min bars. Avoid `lookforward_period=30` at 1% (positive rate ~1.4%, too sparse).\n\n**`VolatilityLabelTransformer`** — binary label: within the next `lookforward_period` bars, did the max gain OR max loss reach `change_delta`? Fires ~2× more often than direction at the same parameters.\n```python\nfrom utils.label_transformer import VolatilityLabelTransformer\ntransformer = VolatilityLabelTransformer(\n    price_column='close',\n    label_column='label',\n    change_delta=0.01,\n    lookforward_period=120,\n)\ndf = transformer.transform(df)\n```\nAt ≥1% threshold, volatility ≈ direction-up OR direction-down with negligible whipsaw contamination. Use volatility when you care about any large move; use direction when you need a directional signal.\n\n## Available feature transformers\n\nUse these directly when building a custom processor. Lives in `utils\u002Ffeature_transformer.py`.\n\n**`OLHCVFeatureTransformer`** — derives a rich feature set from OHLCV columns. Requires a `datetime` column (not index); the processor classes handle this automatically via `_flatten()`.\n\nFeatures produced:\n- **Lag features** — raw OHLCV values at lags 0–9\n- **Bar-over-bar change** — diff ratio and log-ratio for each OHLCV column\n- **Moving-average ratios** — price\u002Fvolume relative to MA windows {5, 10, 20, 50, 100, 200}, both ratio and log-ratio\n- **Technical indicators** — RSI (lengths 14\u002F20\u002F30\u002F50\u002F100\u002F200), MACD line\u002Fhistogram\u002Fsignal\n- **Time features** — `hour_of_day` and `day_of_week`\n\n```python\nfrom utils.feature_transformer import OLHCVFeatureTransformer\n\n# Flatten MultiIndex bar df first\ndf = df.reset_index().rename(columns={'timestamp': 'datetime'})\n\ntransformer = OLHCVFeatureTransformer()\ndf = transformer.transform(df)\nfeature_cols = transformer.feature_columns  # list of added feature column names\n```\n\n## Steps (when using the processor classes)\n\n1. **Instantiate and run** the appropriate processor class above.\n\n2. **Drop rows with NaNs** introduced by rolling windows or the lookforward shift:\n   ```python\n   df = df.dropna(subset=proc.feature_columns + [proc.label_column])\n   ```\n\n3. **Save three files to `data\u002Fml\u002F`**:\n   ```python\n   import os\n   base = f'data\u002Fml\u002F{symbol}_{start}_{end}_minute'\n   os.makedirs('data\u002Fml', exist_ok=True)\n\n   features_path = f'{base}_features.parquet'\n   labels_path   = f'{base}_{label_description}_labels.parquet'\n   joined_path   = f'{base}_{label_description}_joined.parquet'\n\n   df[proc.feature_columns].to_parquet(features_path)\n   df[[proc.label_column]].to_parquet(labels_path)\n   df[proc.feature_columns + [proc.label_column]].to_parquet(joined_path)\n   ```\n\n4. **Summarize and report**:\n   - Paths written: features, labels, joined\n   - Shape of each file\n   - Label distribution (value counts + positive rate)\n   - NaN rows dropped (before vs after dropna)\n   - When called by another skill, return all three paths: `features_path`, `labels_path`, `joined_path`\n\n## Notes\n\n- `data\u002Fml\u002F` is gitignored — cache files are local only.\n- The processor extends the fetch range automatically: ±1 day for minute bars (covers rolling warmup and lookforward tail), −365 days for daily bars (covers MA-200 warmup). The output is filtered back to the requested `start`\u002F`end`.\n- Daily features are joined on the *previous* trading day to avoid same-day data leakage.\n- Output columns: minute features end in `_minute`, daily features in `_daily`. Use `proc.feature_columns` to get the full list rather than inferring from column names.\n- For label column name, use `proc.label_column` rather than hardcoding `'label'`.\n",{"name":5,"description":7},"main","a47531f7a62a9287c52975509849e5133c5d0bb3",".claude\u002Fskills\u002Fprep-ml-data","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab","https:\u002F\u002Fgithub.com\u002Fhomelessrain","2026-07-06 12:26:24",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add homelessrain\u002FAgenticAlphaLab --skill prep-ml-data",{"tool":35,"command":36},"bunx","bunx skills add homelessrain\u002FAgenticAlphaLab --skill prep-ml-data",{"tool":38,"command":39},"pnpm","pnpm dlx skills add homelessrain\u002FAgenticAlphaLab --skill prep-ml-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fprep-ml-data\u002FSKILL.md",true,[],[44,51,58,65,72,79],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M72WF2S9VJNWP98VWAK1DCXV","reuse","look through all agent-generated code and extract\u002Frefactor it into reusable scripts and code components.","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Freuse\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M72WF0F78HQ0TS9QF10NVA8J","research","Conduct a ML research iteration given a hypothesis or direction. Implements new model variants or feature changes, trains and tests them, and writes a structured report. The main entry point for agentic ML research.","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M72WEXY7ZWKDM12ARSBZZQ8E","recap","distill insights and next steps from past research reports.","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecap\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M72WESF15A9RHPK673TZQE7S","fetch-bars","Fetch OHLCV bar data for one or more symbols using AlpacaBarFetcher or YahooBarFetcher and cache the result to disk. Use when any skill or user request needs raw bar data as input.","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffetch-bars\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M72WEQGB5NMWZXG5VJ523D71","evaluate","Evaluate ML models.","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fevaluate\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M72WEPDTK8XGQZSRAPYJ2V2X","eda","https:\u002F\u002Fgithub.com\u002Fhomelessrain\u002FAgenticAlphaLab\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Feda\u002FSKILL.md",[],[]]