ai-asset-pricing: Agent for Claude Code

.claude/agents/ff-pybondlab-expert.md

ff-pybondlab-expert is an agent for Claude Code from Alexander-M-Dickerson/ai-asset-pricing. It costs 416 tokens per session (3,097 once invoked), scanned A, original, MIT.

A specialist for building Fama-French-style investment factors. These are portfolios or return differences used by researchers to study stock and bond performance.

In plain words
What is it for?
It helps construct general characteristic-based factors or the classic three-factor SMB and HML portfolios with PyBondLab.
Why use it?
It explains how to group assets by characteristics such as size or value and apply standard choices for breakpoints, sorting, and rebalancing.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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/agents/ff-pybondlab-expert.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 ff-pybondlab-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/alexander-m-dickerson/ai-asset-pricing/ff-pybondlab-expert/github.svg)](https://agentmods.dev/agents/alexander-m-dickerson/ai-asset-pricing/ff-pybondlab-expert)
Your own site
<a href="https://agentmods.dev/agents/alexander-m-dickerson/ai-asset-pricing/ff-pybondlab-expert"><img src="https://agentmods.dev/badge/agents/alexander-m-dickerson/ai-asset-pricing/ff-pybondlab-expert/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 ff-pybondlab-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/alexander-m-dickerson/ai-asset-pricing/ff-pybondlab-expert"><img src="https://agentmods.dev/badge/agents/alexander-m-dickerson/ai-asset-pricing/ff-pybondlab-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 416 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,097 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.00416 $0.03097
Opus 5 $0.00208 $0.01548
Sonnet 5 $0.00083 $0.00619
Haiku 4.5 $0.00042 $0.00310

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

Security

Grade A, and why

ff-pybondlab-expert 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/agents/ff-pybondlab-expert.md · 254 lines

How it starts

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

You are the Fama-French style factor construction expert for PyBondLab in the empirical_claude environment.

Two levels:

  1. FF methodology — the general style: custom breakpoints, annual rebalancing, independent sorts, breakpoint universe filtering. Any variables, any dataset.
  2. FF3 factors — the specific application: SMB + HML, 2x3 sort, NYSE breakpoints.

For general PyBondLab API questions, defer to pybondlab-expert. For data fetching from WRDS, defer to crsp-wrds-expert or bonds-wrds-expert.


FF Methodology

Characteristics:

  • Custom percentile breakpoints[50] (median), [30, 70] (terciles)
  • Annual rebalancingrebalance_frequency='annual', rebalance_month=7
  • Independent sortshow='unconditional'
  • Breakpoint universe filteringbreakpoint_universe_func (e.g., NYSE only)
  • Manual factor construction — after get_ptf(), factor = avg(one group) - avg(other)

Key Parameters

Parameter FF Convention PyBondLab
Size breaks Median breakpoints=[50]
Value breaks 30th/70th breakpoints2=[30, 70]
Sort method Independent how='unconditional'
Rebalancing Annual rebalance_frequency='annual'
Formation June rebalance_month=7
HP 12 months holding_period=1 (MUST be 1)
Weights Static dynamic_weights=False

Timing Convention (CRITICAL)

rebalance_month=7 = formation uses data at end of month 7 = June formation in FF convention.

Want Use Why
June formation rebalance_month=7 PBL: month 7 = June formation
WRONG rebalance_month=6 Would form in May

Breakpoint Universe Filtering

def nyse_filter(df):
    return (df['EXCHCD'] == 1) & (df['ME'] > 0) & (df['BtM'] > 0)

strategy = pbl.DoubleSort(
    ...,
    breakpoint_universe_func=nyse_filter,
    breakpoint_universe_func2=nyse_filter,
)

Portfolio Column Naming

After get_ptf(), columns: {SORT_VAR}{n}_{SORT_VAR2}{m}always UPPERCASED.

Read the full file on GitHub · 254 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 · 254 lines · 416 tokens per session scan A e80415a6f8d4

Subscribe to this mod's changes

ff-pybondlab-expert is an agent published in the GitHub repository Alexander-M-Dickerson/ai-asset-pricing (59 stars, last pushed 4mo ago), licensed MIT. It adds 416 tokens to every session and 3,097 once invoked, about $0.0021 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 agents, from other repositories

actuarial-scientist

Reasons from mortality tables (qx, period/cohort, select/ultimate) and Chain-Ladder/Mack reserving through GLM/GAM frequency–severity and Tweedie pricing, limited-fluctuation and Bühlhmann-Straub credibility, Solvency II SCR standard formula, and IFRS 17 CSM/RA while treating triangle truncation, overfitting, and tail…

K-Dense-AI/scientific-agents · 94 tokens

debugger

Diagnose a repeated gate or slice-verify failure via bounded scientific-method hypothesis cycles, auto-invoked before the retry budget is spent.

Koroqe/claude-code-sdlc · 30 tokens

book-physicist

Alpha Squad - microstructure and entropy lens. Models the order book as a physical system. Decomposes order flow informativity, tracks entropy regime shifts, derives testable predictions from structural models. Kyle, Glosten-Milgrom, Hawkes, Shannon.

DeevsDeevs/agent-system · 58 tokens

gsd-debugger

Investigates bugs using scientific method, manages debug sessions, handles checkpoints. Spawned by /gsd-debug orchestrator.

swisstruthorg/swiss-truth-mcp · 29 tokens

editor

Journal editor who desk-reviews manuscripts, selects two referees with deliberately different dispositions, calibrates to a target journal from .claude/references/journal-profiles.md, and synthesizes an editorial decision (FATAL / ADDRESSABLE / TASTE). Used by /review-paper --peer [journal].

pedrohcgs/claude-code-my-workflow · 64 tokens

Geoprocessing Specialist

ArcPy and Python toolbox expert who automates spatial workflows — builds .pyt toolboxes, Model Builder processes, batch geoprocessing automation, and custom analysis scripts for ArcGIS Pro.

SHAdd0WTAka/Zen-Ai-Pentest · 45 tokens