ai-asset-pricing: Skill for Claude Code

.claude/skills/factor-construction/SKILL.md

factor-construction is a skill for Claude Code from Alexander-M-Dickerson/ai-asset-pricing. It costs 54 tokens per session (2,655 once invoked), scanned A, original, MIT.

A set of rules for forming stock portfolios and investment factors from time-based market and company data. It focuses on avoiding look-ahead bias, which happens when a calculation uses information that would not have been known at the time of the decision.

In plain words
What is it for?
Use it when constructing stock factors, sorting stocks into portfolios, or calculating long-short returns.
Why use it?
It helps prevent investment results from looking better than they could have been in real time. It checks signal timing, the stock universe, portfolio sorting, return alignment, and rebalancing rules.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Alexander-M-Dickerson/ai-asset-pricing's own configuration. It tells Claude Code how to work on ai-asset-pricing itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-asset-pricing configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Alexander-M-Dickerson/ai-asset-pricing. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Alexander-M-Dickerson/ai-asset-pricing/main/.claude/skills/factor-construction/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Alexander-M-Dickerson/ai-asset-pricing

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for factor-construction

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexander-m-dickerson/ai-asset-pricing/factor-construction/github.svg)](https://agentmods.dev/skills/alexander-m-dickerson/ai-asset-pricing/factor-construction)
Your own site
<a href="https://agentmods.dev/skills/alexander-m-dickerson/ai-asset-pricing/factor-construction"><img src="https://agentmods.dev/badge/skills/alexander-m-dickerson/ai-asset-pricing/factor-construction/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for factor-construction

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexander-m-dickerson/ai-asset-pricing/factor-construction"><img src="https://agentmods.dev/badge/skills/alexander-m-dickerson/ai-asset-pricing/factor-construction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,655 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.02655
Opus 5 $0.00027 $0.01327
Sonnet 5 $0.00011 $0.00531
Haiku 4.5 $0.00005 $0.00265

Measured 11d ago against content hash 285833cb5dec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

factor-construction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/factor-construction/SKILL.md · 247 lines

How it starts

The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Factor Construction Rules

These rules prevent look-ahead bias (LAB) when forming cross-sectional factors. LAB means using information beyond the portfolio formation date — it silently inflates factor returns and invalidates results.

LAB Audit Checklist

Run this checklist whenever forming portfolios or constructing factors. Flag any violation.

1. Signal is point-in-time at formation date t

  • Accounting signals use data available at t (raw Compustat: ≥4-month lag; JKP: already aligned)
  • Market data (price, ME, volume) uses end-of-period t values
  • Regression-based signals (beta, loading estimates) use windows ending at or before t
  • No .shift(-1) or forward-looking operation on the signal
  • Signal does not condition on future outcomes (e.g., future default, future delisting)

2. Universe defined at t

  • Stock universe uses only t-available information (listing status, exchange, share type at t)
  • Stocks that delist after t are included in the t-formation universe (you didn't know they'd delist)
  • Stocks that IPO after t are excluded from the t-formation universe
  • No survivorship conditioning (don't require stocks to exist for N future months)

3. Breakpoints computed at t

  • If using NYSE breakpoints: NYSE membership determined at t
  • Percentile cutoffs computed from the cross-section at t
  • No future data in breakpoint calculation

4. Returns from t+1

  • Portfolio holds from t+1 (month after formation)
  • VW returns use ME at t as weights (not t+1 ME)
  • Delisting returns compounded with final trading-day return in t+1

5. Output dating convention

  • Portfolio return series re-dated to the earning period (see convention below)

Core Convention: Lead Returns, Not Signals

Preferred approach: Keep signals at their natural date. Lead only the portfolio return series.

Step 1: At date t, sort stocks using signal known at t
Step 2: Compute portfolio return from stock returns at t+1
Step 3: Assign this return to date t+1 (the period it was earned)

Read the full file on GitHub · 247 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 247 lines · 54 tokens per session scan A 285833cb5dec

Subscribe to this mod's changes

factor-construction is a skill published in the GitHub repository Alexander-M-Dickerson/ai-asset-pricing (59 stars, last pushed 4mo ago), licensed MIT. It adds 54 tokens to every session and 2,655 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

monte-carlo

Use when the user wants Monte Carlo simulation of a PlanExe model — sampling from bounds to produce output distributions (mean/std/percentiles), threshold pass probabilities, and Pearson-correlation sensitivity rankings — given an extract-parameters-from-full JSON, a generate-bounds JSON, a generate-calculations…

PlanExeOrg/PlanExe · 71 tokens

cointegration-analysis

Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis.

agiprolabs/claude-trading-skills · 23 tokens

neqsim-utility-design

Screening-level utility-system DESIGN with NeqSim Java classes and the MCP designUtilities tool — fired steam Boiler, Deaerator, vapour-compression RefrigerationCycle, on-site NitrogenSystem generator, and multi-pressure SteamNetwork header cascade, plus the UtilitySystemDesigner aggregator that harvests demands from…

equinor/neqsim · 144 tokens

fin-paper-figure

Generate academic-quality figures (>=300 DPI) for economics and finance papers.

csmar432/finai-research · 14 tokens

quant-experiment-runtime

Quant research experiment executor: discover an offline source database under the workdir's code-repo, build a panel, run a Research Artifact's entry point to compute research-object values, and evaluate IC/ICIR/RANKIC/coverage metrics. Runtime = Experiment Executor; it runs a Research Artifact via a Python-native…

CamusGIT/EvoQuant · 179 tokens

fin-paper-writing

A workflow for turning a research outline and study design into a complete economics or finance paper. It coordinates drafting, figure creation, consistency checks, review rounds, LaTeX compilation, and submission checks.

csmar432/finai-research · 65 tokens