stata-accounting-research

stata-accounting-research is a skill for Claude Code, Codex from wentorai/research-plugins. It costs 16 tokens per session (4,094 once invoked), scanned A, original, MIT.

A guide to common STATA code patterns for empirical accounting and finance research. It covers data preparation, earnings-quality models, event studies, difference-in-differences, and instrumental-variable analysis.

In plain words
What is it for?
Use it to clean accounting datasets, study earnings announcements or regulatory changes, test audit and tax questions, and run robustness analyses.
Why use it?
It provides established examples for research designs that can otherwise require substantial statistical and programming knowledge. STATA is a statistics program widely used in academic social-science research.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to clean accounting datasets, study earnings announcements or regulatory changes, test audit and tax questions, and run robustness analyses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wentorai/research-plugins/stata-accounting-research
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wentorai/research-plugins --skill stata-accounting-research
Clone the repo
git clone --depth 1 https://github.com/wentorai/research-plugins

Made for: Claude Code, Codex.

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 stata-accounting-research

README.md
[![agentmods](https://agentmods.dev/badge/skills/wentorai/research-plugins/stata-accounting-research/github.svg)](https://agentmods.dev/skills/wentorai/research-plugins/stata-accounting-research)
Your own site
<a href="https://agentmods.dev/skills/wentorai/research-plugins/stata-accounting-research"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/stata-accounting-research/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 stata-accounting-research

Your own site · 80×15
<a href="https://agentmods.dev/skills/wentorai/research-plugins/stata-accounting-research"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/stata-accounting-research.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,094 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00016 $0.04094
Opus 5 $0.00008 $0.02047
Sonnet 5 $0.00003 $0.00819
Haiku 4.5 $0.00002 $0.00409

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

Security

Grade A, and why

stata-accounting-research 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 7d 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.

skills/domains/finance/stata-accounting-research/SKILL.md · 453 lines

How it starts

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

STATA Accounting Research Guide

Overview

Empirical accounting research relies heavily on STATA for data manipulation, statistical analysis, and robustness testing. The field has developed standardized methodological approaches -- earnings quality models, event studies, difference-in-differences for regulatory changes, and instrument variable strategies for endogeneity -- that are implemented in a relatively stable set of STATA patterns.

This guide provides the core STATA code patterns used in top accounting journals (The Accounting Review, Journal of Accounting Research, Journal of Accounting and Economics, and Review of Accounting Studies). These patterns are drawn from commonly used research designs in financial reporting, auditing, tax, and managerial accounting research.

Whether you are estimating discretionary accruals, conducting an event study around an earnings announcement, testing the effect of auditor rotation on audit quality, or implementing a regulatory shock analysis, these patterns provide tested, reviewable STATA implementations.

Data Preparation

Loading and Cleaning COMPUSTAT Data

* ============================================================
* COMPUSTAT Annual Data Preparation for Accounting Research
* Standard preparation used across most empirical accounting papers
* ============================================================

* Load COMPUSTAT annual data
use "compustat_annual.dta", clear

* Keep relevant variables
keep gvkey fyear datadate at sale cogs xsga dp ib oancf act lct che dlc ///
     csho prcc_f ceq re dltt txp xrd ppegt ppent invt rect

* Set panel structure
destring gvkey, replace
xtset gvkey fyear

* --- Basic cleaning ---
* Drop financial firms (SIC 6000-6999) and utilities (SIC 4900-4999)
drop if inrange(sic, 6000, 6999) | inrange(sic, 4900, 4999)

* Require minimum observations
bysort gvkey: gen nobs = _N
drop if nobs < 3
drop nobs

* --- Generate common variables ---
* Total accruals (balance sheet approach)
gen total_accruals = (D.act - D.che) - (D.lct - D.dlc) - dp

* Total accruals (cash flow approach, preferred)
gen total_accruals_cf = ib - oancf

* Scale by lagged total assets
gen lag_at = L.at
gen ta_scaled = total_accruals_cf / lag_at
gen sale_scaled = sale / lag_at
gen ppe_scaled = ppent / lag_at
gen dsale = D.sale / lag_at
gen drec = D.rect / lag_at
gen roa = ib / lag_at

* Market value of equity
gen mve = csho * prcc_f

* Book-to-market ratio
gen btm = ceq / mve

* Leverage
gen leverage = (dlc + dltt) / at

* Firm size
gen size = ln(at)

* --- Winsorize at 1% and 99% ---
foreach var of varlist ta_scaled sale_scaled ppe_scaled roa btm leverage size {
    winsor2 `var', replace cuts(1 99)
}

* Label variables
label var ta_scaled "Total accruals / lagged assets"
label var roa "Return on assets"
label var btm "Book-to-market ratio"
label var leverage "Total debt / total assets"
label var size "Log(total assets)"

save "compustat_clean.dta", replace

Read the full file on GitHub · 453 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. 7d ago First seen · 453 lines · 16 tokens per session scan A 5fcb2a24da22

Subscribe to this mod's changes

stata-accounting-research is a skill published in the GitHub repository wentorai/research-plugins (291 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 4,094 once invoked, about $0.0001 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-09-03.

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