How to Compute Average Annual Loss (AAL) from a Vulnerability Function and a Hazard Curve
Average annual loss is the single number most often used to summarise seismic risk. It drives insurance pricing, retrofit cost-benefit studies and the ranking of buildings in a portfolio. Computing it takes two ingredients and one integral. This post goes through each of them, with a short Python function you can adapt.
What is average annual loss?
Average annual loss (AAL), also called expected annual loss (EAL), is the expected value of the loss a structure suffers from earthquakes in one year, averaged over all the earthquakes that can affect the site.
It is usually expressed as a loss ratio, a fraction of the replacement cost, and multiplied by that cost when a monetary value is needed. An AAL is not the loss you will see in any particular year. Most years bring no loss at all; a rare year brings a large one. AAL spreads that long-run total evenly across the years.
What do you need?
1. A seismic hazard curve. The hazard curve, , gives the mean annual rate at which the intensity measure (IM) at the site exceeds a value . It comes from probabilistic seismic hazard analysis, for example with the OpenQuake engine. The inverse of the rate is the return period: at the L'Aquila site used in our study, the 475-year value of Sa(1.0 s) is 0.19 g, and of PGA is 0.31 g.
2. A vulnerability function. The vulnerability function, , gives the expected loss ratio at each level of intensity. You may have one directly, or you may build it from fragility curves and a damage-to-loss model; our explainer on what a fragility curve is and how it differs from a vulnerability curve shows how. For a component-based route, storey loss functions relate storey drift and floor acceleration directly to repair cost (O'Reilly and Shahnazaryan 2024).
The two must share the same IM, defined the same way. A vulnerability function in Sa(1.0 s) cannot be integrated with a PGA hazard curve. If they do not match, either compute the hazard in the model's IM or convert the model; see converting vulnerability models between intensity measures.
What is the equation for AAL?
The AAL is the expected loss at each intensity, weighted by how often that intensity occurs:
The term is the annual rate density of the IM: how many times per year, on average, the shaking falls in a small interval around . The hazard curve decreases with intensity, which is why the absolute value is taken. The same integral with a fragility curve in place of the vulnerability gives the annual rate of reaching a damage state; Cornell et al. (2002) give the closed-form version of that integral for a lognormal fragility and a power-law hazard curve.
How do you compute it numerically?
In practice the hazard curve is known at discrete IM values, so the integral becomes a sum:
- Define a grid of IM values, , covering the hazard curve from very low intensities to the point where the exceedance rate is negligible.
- Interpolate the hazard curve onto the grid, preferably in log-log space, where hazard curves are close to linear.
- For each interval, take the rate of occurrence, .
- Evaluate the vulnerability function at the midpoint of the interval.
- Multiply and sum:
A short Python function does this. It takes your own arrays, so plug in your hazard curve and vulnerability function:
import numpy as np
def average_annual_loss(hazard_im, hazard_rate, vuln_im, vuln_loss, n=1000):
"""AAL from a hazard curve and a vulnerability function sharing the same IM."""
im = np.logspace(np.log10(hazard_im[0]), np.log10(hazard_im[-1]), n)
# Hazard curve, interpolated in log-log space
rate = np.exp(np.interp(np.log(im), np.log(hazard_im), np.log(hazard_rate)))
# Rate of occurrence in each interval, and loss at its midpoint
d_rate = rate[:-1] - rate[1:]
im_mid = np.sqrt(im[:-1] * im[1:])
loss = np.interp(im_mid, vuln_im, vuln_loss, left=0.0, right=vuln_loss[-1])
return np.sum(loss * d_rate)
hazard_rate must be positive for the logarithm. Below its lowest IM the vulnerability function is taken as zero, and above its highest IM it is held at its last value. If your loss ratios are capped at 1, a total loss, that is a reasonable extrapolation.
What are the common mistakes?
Cutting off the low intensities. Low and moderate shaking is frequent, so even small expected losses there add up. In the IM conversion study, most of the annual loss accumulated at low intensities. Vulnerability curves stored on a coarse grid starting at 0.12 g missed that range, and were therefore not used for AAL. Start your grid well below the intensity at which losses begin.
Mixing IM definitions. The vulnerability function, the ground motion model and the hazard curve must all use the same IM, including the period of Sa(T) and the way the two horizontal components are combined.
Checking only the fragility. A converted fragility curve can look right and still produce a materially wrong AAL. If losses are your end product, check the AAL, and convert the vulnerability model directly rather than its fragility curves.
Where does AAL fit in a risk assessment?
AAL is one point summary of a fuller picture. The same ingredients give the annual rate of exceeding each damage state, and, with the full distribution of loss at each intensity rather than just its mean, a loss exceedance curve for a structure or a portfolio. For a portfolio, the hazard is simulated as correlated ground motion fields rather than a single site curve, and the AAL of the portfolio is the sum of the AALs of its assets. For portfolios whose models use different IMs, see converting fragility and vulnerability models between intensity measures.
Frequently asked questions
What is the formula for average annual loss?
AAL is the integral of the expected loss given the intensity measure, E[L | IM = im], multiplied by the absolute slope of the site hazard curve, |dλ(im)/dim|, over all intensities. Numerically, it is the sum over IM intervals of the expected loss at the interval midpoint times the difference in annual exceedance rate across the interval.
Is average annual loss the same as expected annual loss?
Yes. Both terms describe the expected value of the loss in one year, averaged over the long term. It is often reported as a ratio of the replacement cost.
Can I compute AAL from fragility curves instead of a vulnerability function?
Not directly. First combine the fragility curves with a damage-to-loss model to get the expected loss at each intensity, then integrate that vulnerability function with the hazard curve. The same hazard integral applied to a single fragility curve gives the annual rate of reaching that damage state instead.
References
- Cornell CA, Jalayer F, Hamburger RO, Foutch DA (2002) Probabilistic Basis for 2000 SAC Federal Emergency Management Agency Steel Moment Frame Guidelines. Journal of Structural Engineering 128(4): 526–533. doi:10.1061/(ASCE)0733-9445(2002)128:4(526)
- O'Reilly GJ, Ozsarac V, Shahnazaryan D (2026) Conversion of Seismic Fragility and Vulnerability Models to Alternative Intensity Measures for Regional Risk Analysis. Earthquake Spectra 42: e70098. doi:10.1002/esp4.70098
- O'Reilly GJ, Shahnazaryan D (2024) On the utility of story loss functions for regional seismic vulnerability modeling and risk assessment. Earthquake Spectra 40(3): 1933–1955. doi:10.1177/87552930241245940