Connect an exponential-family response to predictors through a mean link; interpret Poisson count rates, exposure offsets, dispersion and noncanonical links.
Generalised linear model
A generalised linear model (GLM) models an outcome's conditional distribution using an exponential-family response and connects its conditional mean to a linear predictor through a link function. It lets a quant model trade counts as positive expected counts or defaults as probabilities, while interpreting coefficients on a chosen link scale.
The defining equation is
μi=E[Yi∣xi],ηi=β0+xi⊤β,g(μi)=ηi.
Here μi is the conditional expectation, ηi is the linear predictor, and g is the link. Predictions on the outcome scale use the inverse link: μi=g−1(ηi). “Linear” refers to the coefficients in ηi; fixed predictors such as squared leverage or interactions can still appear in a GLM. Minnesota's theory notes describe the mean/link construction.
A family controls more than the mean
In the usual independent-observation GLM, each conditional response has an exponential-family density or probability mass function. For unit observation weights, a common form is
f(yi∣θi,ϕ)=exp{ϕyiθi−b(θi)+c(yi,ϕ)}.
The natural parameter θi determines the mean; b is the cumulant function; c supplies the remaining normalisation. Under the standard regularity conditions,
μi=b′(θi),Var(Yi∣xi)=ϕb′′(θi)=ϕV(μi).
The variance functionV describes how conditional variance changes with the mean. The dispersionϕ scales it. Gaussian responses have V(μ)=1 and ϕ=σ2; Bernoulli responses have V(μ)=μ(1−μ) and ϕ=1; Poisson responses have V(μ)=μ and ϕ=1. These are distributional assumptions, rather than consequences of choosing a link. Minnesota: exponential-family properties.
A canonical link sets the linear predictor equal to the natural parameter: ηi=θi. Other links are valid GLM choices too. The CMU notes, §2.4, explicitly distinguish these cases.
Response
Link g(μ)
Inverse link
Status
Gaussian
μ
η
Canonical identity
Bernoulli
log{μ/(1−μ)}
1/(1+e−η)
Canonical logit
Bernoulli
Φ−1(μ)
Φ(η)
Noncanonical probit
Poisson
logμ
eη
Canonical log
Poisson
μ
η
Noncanonical identity; requires positive fitted means
Here Φ is the standard normal cumulative distribution function. Bernoulli logit and probit both produce probabilities in (0,1), but have different coefficient scales. A Poisson identity link needs restrictions to keep means positive; a log link enforces positivity for every real score. The official R family documentation lists these supported family/link combinations.
One hour, two counts, and a log link
Consider a fictional trade-count model. Y counts trades in a fixed one-hour window. The dimensionless predictor x is observed at the start of that window. Specify
Y∣x∼Poisson(μ(x)),logμ(x)=log2+0.3x.
At x=0, the expected count is 2. At x=1,
μ(1)=2e0.3≈2.6997,μ(0)μ(1)=e0.3≈1.3499.
A one-unit increase in x multiplies the expected count by about 1.35, holding other predictors and exposure fixed. It does not add 0.3 trades. A fractional expected count is valid even though each realised count is an integer.
Fictional Poisson GLM: the one-hour linear predictor is log(2) plus 0.3x, while the count mean is 2 exp(0.3x). One-hour means at x equal to 0 and 1 are 2.00 and 2.70; the dashed two-hour mean curve is twice the solid one-hour curve.
Original specified model, not fitted market data. The link makes the one-hour score linear; the inverse link makes the count mean positive. The second curve changes exposure while preserving the hourly rate.
Under this Poisson distribution assumption, conditional variance also equals 2.6997 at x=1. The log link alone does not imply that equality. Nor does it imply that the variance of counts pooled across different predictor values equals their pooled mean.
When observation windows vary, let ei>0 be exposure measured as the number of hours. A constant-rate-within-window specification uses
The offset has coefficient fixed at one. At x=1, two hours gives an expected 5.3994 trades, while the modelled rate remains 2.6997 trades per hour. Counts and rates have different units; replacing counts by noninteger counts-per-hour and fitting an ordinary Poisson response discards this observation structure. Proportional exposure scaling assumes the same modelled rate applies throughout the longer window. Penn State's rate-model treatment derives the offset construction.
The link acts on the mean
A Poisson log-link GLM fits logE[Y∣x]. Regressing logY on x by ordinary least squares instead targets a different quantity, encounters undefined values when Y=0, and generally does not recover the same conditional mean by exponentiation. In general, E[logY∣x]=logE[Y∣x] when the former exists.
Standard GLM fitting uses maximum likelihood estimation, usually with an iterative algorithm such as iteratively reweighted least squares. Its changing weights come from the family and link; this is not a single least-squares regression on transformed observed responses. See R's fitting documentation.
Before treating a fitted count or default model as a forecast, check what the specification leaves unresolved:
Overdispersion: conditional count variation exceeding the Poisson mean can reflect omitted heterogeneity or a wrong distribution. Quasi-Poisson allows Var(Y∣x)=ϕμ without specifying a full Poisson likelihood; a negative-binomial model supplies a different count distribution. Changing dispersion does not repair the conditional mean automatically. R family documentation.
Dependence: adjacent trade windows or repeated observations on a borrower can remain correlated after conditioning. Ordinary independent-observation likelihood standard errors then need reconsideration; changing the link does not remove dependence. The statsmodels GEE overview describes a framework for correlated observations.
Calibration and timing: a probability in (0,1) need not match observed default frequencies. Check held-out calibration at the intended horizon, and use only predictor values available at the forecast timestamp. An end-of-window trade statistic cannot support a start-of-window forecast without information leakage. Probability calibration documentation explains the comparison between predicted probabilities and observed frequencies.
A different specified model is logμ=loge+log3−0.2x, with exposure e measured in hours. At x=1, what are the expected count for a half-hour window and the expected hourly rate? Is loge a coefficient to estimate?
Answer. The rate is 3e−0.2≈2.4562 trades per hour. The expected half-hour count is 0.5×2.4562≈1.2281 trades. The exposure offset has coefficient fixed at one; estimating that coefficient would change the proportional-exposure assumption.