← Firm Size

Log Market Cap Curated

Natural logarithm of market capitalization. Preferred when market-based size is more relevant than book size.

Textbook formula: ln(Share Price x Shares Outstanding)
Curated note

Firm size as the log of market equity: shares outstanding times the share price, taken either at the fiscal year end from the accounting data or from the stock-price files (where the absolute value of the price is used, because a bid-ask midpoint is reported as a negative price). Asset-pricing code usually takes it LAGGED — size at portfolio formation, or at the end of the prior month — so that returns are not mechanically related to it. A few packages flip its sign so that sorting runs from large to small.

  • log(me) — the size control in cross-sectional return and corporate regressions
  • log(LAG(me)) — asset pricing: size known at formation, before the return is measured
147
replication packages compute it
2
distinct measurements, written 77 ways
28%
of packages read winsorize or trim it

How the code actually computes it

Each row is one measurement. The many ways code writes a lagged value are one measurement, quarterly items are the annual measurement at quarterly frequency, and percent / log / rescaling are tags, not new measurements. Open a row for the spellings, each shown as written in its example.

Market equity 146 packages
annual 138 · quarterly 9 · 76 spellingslog · 142log(1+x) · 18used lagged · 17rescaled · 5sign flipped · 1
Spelling in the code, as writtenFrequencyPackages
log(me)log annual21
LOG(MCAP)log annual13
log(mv)log annual13
log(Mktcap)log annual12
log(mve)log annual10
log( MarketCap)log annual6
ln(prcc_f*csho)log annual6
ln(csho*prcc_f)log annual4
log(mkvalt)log annual3
log(shrout*abs(prc))log annual3
np.log(1+data.mcap)log(1+x) annual2
np.log(1+weight['me'])log(1+x) annual2
log(abs(prcc_f*csho))log annual2
LOG(CSHOQ*PRCCQ)log quarterly2
ln(lag_MV)logused lagged annual2
log(prc*shrout)log annual2
-1*log(me)logsign flipped annual1
ifelse(csho * prcc_f != 0, log(csho * prcc_f), NA) annual1
ifelse(cshoq * prccq != 0, log(cshoq * prccq), NA) quarterly1
ifelse(me > 0, -1 * log(me), NA) annual1
log(1 + csho * prcc_f)log(1+x) annual1
log(1+mktcap)log(1+x) annual1
log(1+mv)log(1+x) annual1
log(1+mve)log(1+x) annual1
log(1+prccq*cshoq)log(1+x) quarterly1
log(abs(PRCC_F)*CSHO)log annual1
log(c.csho*c.prcc_f+1)log(1+x) annual1
ln(CGD_MV)log annual1
log(crsp_mktcap)log annual1
log(csho*abs(prcc_f))log annual1
log(initialsample$csho*initialsample$prcc_f+1)log(1+x) annual1
log(csho_lag*prcc_f_lag)logused lagged annual1
log(fyme)log annual1
log(l.me)logused lagged annual1
log(lagged_mktcap)logused lagged annual1
log(lagmcap)logused lagged annual1
log(lagmcap+1)log(1+x)used lagged annual1
ln(Lagmktcap)logused lagged annual1
log(lcsho*lprcc_f)logused lagged annual1
ln(Lmarketcap)logused lagged annual1
np.log(crsp_w['lme'])logused lagged annual1
ln(Lmktcap)logused lagged annual1
log(lmv)logused lagged annual1
ln(LmvE)logused lagged annual1
ln(market_cap)log annual1
log(market_capitalization+1)log(1+x) annual1
ln(market_eq)log annual1
log(dataset.MARKETCAP*1000)logrescaled annual1
ln(mcap*10^6)logrescaled annual1
ln(mcap+1)log(1+x) annual1
log(MCap_USD)log annual1
np.log(main0['ME_2019'])log annual1
log(me_lag1)logused lagged annual1
log(meq)log annual1
Log(MkCap)log annual1
log(MkCapm)log annual1
ln(mkt_capq)log quarterly1
log(mkt_equity)log annual1
log(mktcap/1000000)logrescaled annual1
ln(mktcap1)logused lagged annual1
ln(mktcap_crsp)log quarterly1
ln(mktsize + 1)log(1+x) mixed1
log(mktvalue)log quarterly1
ln(mkvaltq)log quarterly1
log(mv + 1)log(1+x) annual1
ln(mv_c+1)log(1+x) annual1
log(mv_equity)log annual1
log(mve_c)log annual1
log(mve_compustat)log annual1
log(mve_m)logused lagged annual1
log(MVEQ)log quarterly1
ln(pr_mv)log annual1
ln(prccq*csho)log mixed1
log(revenue+1)log(1+x) annual1
log(shrout * 10^3 * abs(prc))logrescaled annual1
ln(shrout*prc*1000)logrescaled annual1
gen size = log(mktcap/1000000)
Total(market equity) 1 package
annual 1 · quarterly 0 · 1 spellinglog · 1
Spelling in the code, as writtenFrequencyPackages
ln(Tot)log annual1
gen lnmcap=ln(Tot)

Missing observations

Among the 147 of 147 packages we have read: what the code does when this measure, or an input it is built from, is missing. A package can do more than one.

15 · 10%
Drop the observation
rows with the measure or an input missing are deleted
me (12), prc (4), prcc_f (2), mktcap1 (2), size (2)
drop if marketcap==0 | marketcap==.
1 · 1%
Set missing to 0
an imputation: missing read as zero (typical for R&D)
lnmv (2)
replace lnmv=0 if lnmv==. & dummy_failed_sop==1
7 · 5%
Fill from elsewhere
an alternative definition, another source, a carried or interpolated value
mv (4), size (3), mktvalue (3), ln_mktcap (1), mkvaltq (1)
replace size=l.size if missing(size) & ~missing(sizelag)
127 · 86%
Nothing explicit
missing values fall out in estimation (listwise)

Outliers: winsorizing and trimming

41 of the 147 packages we have read (28%) winsorize or trim this variable — 1 of them trim (delete) rather than winsorize; 13 do it within groups (by year, typically). The rest leave it as computed.

Cuts are percentiles (1/99 = the 1st and 99th). "default cuts" = the command's default, e.g. winsor2 uses 1/99. A package that cuts the variable two ways counts once under each.

Used as outcome vs control

Of the packages that compute this measure and put its variable in a model, how many estimate it as the outcome (dependent variable) and how many use it as a regressor (a control, or the variable of interest) — in all their estimations, and within each design's models. A package can do both; one count per package.

modelspackages outcome ▮ vs regressor ▮as outcomeas regressor
all estimations 49
6% · 3
4 models
3 outcome models in the code
94% · 46
752 models
4 regressor models in the code
Difference-in-differences 2
0% · 0
0 models
100% · 2
19 models
2 regressor models in the code
  • ESG Shocks in Global Supply Chains Review of Financial Studies 2026 · pkg 266
    qui eststo: reghdfe Dtrade  treatpost  post  $x  if poissonsample==1,ab(pair indyear case  ) cl(case#shppanjivaid)
    As we read it — macros filled in / loop expanded (an interpretation, not the file's text):
    qui eststo: reghdfe Dtrade treatpost post size mtb lev rd invest cash if poissonsample==1,ab(pair indyear case ) cl(case#shppanjivaid)
  • Reciprocity in Corporate Tax Compliance—Evidence from Ozone Pollution Journal of Accounting Research 2023 · pkg 12662
    CFHLL_stata.do:380 · c.reg2##(c.median_income c.income_inequality c.education c.age c.urban c.rel c.social_capital c.statetaxrate c.temp c.wind c.dptemp c.prec1 c.cloud c.roa c.lev c.nol c.change_nol c.foreign_income c.equity_income c.ppe c.intangible c.rd c.ads c.sga c.size c.mb c.instown_perc)
    qui xi: reghdfe cash_etr3 c.treat##c.post c.reg2##(c.median_income c.income_inequality c.education c.age c.urban c.rel c.social_capital c.statetaxrate c.temp c.wind c.dptemp c.prec1 c.cloud c.roa c.le …
Instrumental variables 2
0% · 0
0 models
100% · 2
3 models
2 regressor models in the code
Matching 1
0% · 0
0 models
100% · 1
3 models
1 regressor model in the code
Panel fixed effects 30
3% · 1
2 models
1 outcome model in the code
97% · 29
453 models
4 regressor models in the code

A lag of the outcome on its own right-hand side (roa on L.roa) is not counted as a regressor use. A measure found by its estimation, formula or data source (a CAR summed over an event window, a beta kept from a regression, a KZ index) is looked up by the variable that code produces (car126d_ff4, beta); a generic output such as _rmse or resid is not. Designs are the recipe designs; "all estimations" covers every model in the package.

As a regressor (control or variable of interest)
In those models, counted in packages:
Fixed effects: gvkey (7), fyear (5), date (4), permno (4), year (4), sic2 (3)
Clustering: permno (13), date (4), gvkey (3), fyear (2), year (2), `naics_temp' (1)
Estimators: panel_fe (34), ols (14), binary (4), fama_macbeth (3), count (2), iv (2)
As the outcome (dependent variable)
In those models, counted in packages (50% of the models are in one package):
Fixed effects: fyear (1), gvkey (1)
Clustering: none recorded
Estimators: rolling_regression (2), panel_fe (1)

Foundational works

What the papers whose code computes this measure cite most (share of those papers citing each).

Papers whose code computes it