Why Reflect Losses at Zero?
A loss amount cannot be negative, so a kernel centered on an observed loss near zero places some of its smoothing weight outside the possible range. The ordinary kernel density estimate therefore tends to understate density near the boundary. Reflection addresses this by adding a mirror contribution from each observed loss. It can correct the leading boundary deficit, but it does not guarantee an accurate estimate in every situation.
Assume \(X_1,\ldots,X_n\) are independent observations from a continuous loss distribution with density \(f_X(y)\) for \(y\geq 0\). For the basic reflection method, take a symmetric kernel \(K\), normalized so that its integral over the real line is one, and bandwidth \(h>0\). In the calculations below, the kernel has support \([-1,1]\), which makes the boundary calculations especially transparent.
The mirror contribution adds back kernel weight that would otherwise lie below zero. It is not an instruction to double the whole estimate: the estimator already contains both terms, and its denominator remains \(nh\). Reflection is most naturally understood as smoothing the even extension of the density, which assigns the value \(f_X(|z|)\) to a real argument \(z\).
Calculating the Reflected Estimate
At \(x=0\), symmetry of the kernel makes the two contributions for one observation equal: $$ \widehat f_R(0)=\frac{2}{nh}\sum_{i=1}^n K\left(\frac{X_i}{h}\right). $$ Only observations within one bandwidth of zero contribute when \(K\) is supported on \([-1,1]\). An observation exactly at the edge of that support contributes according to the kernel’s value there; for the uniform kernel used below, that value is \(1/2\).
Worked Example: Estimating Density at Zero
A hypothetical portfolio has three exact, nonnegative losses of \(\$0.10\), \(\$0.40\), and \(\$0.90\), measured in dollars. Estimate the density at \(x=0\) using bandwidth \(h=\$0.50\) and the uniform kernel \(K(u)=1/2\) for \(|u|\leq 1\), and \(K(u)=0\) otherwise. Densities are reported per dollar.
Method. Apply the reflected estimator at zero. The scaled observations are \(0.10/0.50=0.20\), \(0.40/0.50=0.80\), and \(0.90/0.50=1.80\). The first two lie in the kernel support and the third does not.
At zero, each in-support observation contributes \(2K(u)=2(1/2)=1\) to the sum. Thus the sum of contributions is \(1+1+0=2\), and the denominator is \(nh=3(0.50)=1.50\) dollars.
Check. The estimate is nonnegative and has the units of inverse dollars, as a density should. A common mistake is to divide by \(2nh\) because two kernel terms appear in the numerator. That would give \(2/3.00=0.67\) per dollar, incorrectly halving the estimate; the two terms are already part of the reflected estimator, whose denominator is \(nh\).
Why Reflection Reduces Boundary Bias
For a nonnegative loss, the expectation of the ordinary kernel estimate at zero is $$ E[\widehat f(0)]=\int_0^\infty K(u)f_X(hu)\,du, $$ where symmetry of \(K\) was used to change variables. If \(f_X\) is continuous at zero and the kernel is symmetric with support \([-1,1]\), this approaches \(f_X(0)/2\) as \(h\) becomes small: only half of the kernel lies on the nonnegative side. The reflected estimator adds the missing half.
The reflected estimate has expectation $$ E[\widehat f_R(0)]=2\int_0^1 K(u)f_X(hu)\,du. $$ Because \(2\int_0^1K(u)\,du=1\), a density that is nearly constant over the bandwidth has an estimate near its boundary value. The following expansion gives the more precise bias.
To justify the result, expand the density on the nonnegative side: $$ f_X(hu)=f_X(0)+hu f_X'(0)+\frac{h^2u^2}{2}f_X''(0)+o(h^2) $$ for \(0\leq u\leq 1\). Substitute into the expectation integral and integrate term by term. The constant term is \(2f_X(0)\int_0^1K(u)\,du=f_X(0)\). The linear term is \(2h f_X'(0)\int_0^1uK(u)\,du\), and the quadratic term is \(h^2f_X''(0)\int_0^1u^2K(u)\,du\). Subtracting \(f_X(0)\) gives the stated expansion.
For the uniform kernel, \(m_{1,+}=\int_0^1u/2\,du=1/4\) and \(m_{2,+}=\int_0^1u^2/2\,du=1/6\). If \(f_X'(0)=0\), the quadratic bias coefficient is therefore \(f_X''(0)/6\). A zero derivative alone does not imply a nonzero quadratic coefficient: for a density that is constant near zero, both derivatives vanish there and reflection can have zero boundary bias.
Worked Example: Exact Boundary Expectation for an Exponential Loss
Suppose a hypothetical loss has an exponential distribution with rate \(\lambda=2\) per dollar, so \(f_X(y)=2e^{-2y}\) for \(y\geq0\) and \(f_X(0)=2\) per dollar. Find the expected reflected estimate at zero for the uniform kernel and bandwidth \(h=\$0.25\), then compare it with the true boundary density.
Method. Integrate the reflected expectation, rather than substituting sample observations. Here \(K(u)=1/2\) on \([0,1]\), so $$ E[\widehat f_R(0)]=2\int_0^1\frac12\,2e^{-2(0.25)u}\,du =2\int_0^1e^{-0.5u}\,du. $$
Integrating gives \(2[-2e^{-0.5u}]_0^1=4(1-e^{-0.5})\). Since \(e^{-0.5}\approx0.6065307\), the expectation is \(4(0.3934693)=1.5738772\) per dollar. Rounded to four decimal places, it is \(1.5739\) per dollar. The bias is \(1.5738772-2=-0.4261228\), or \(-0.4261\) per dollar to four decimal places.
Check. The density decreases immediately to the right of zero, so the reflected estimate has a negative leading bias. Indeed, \(f_X'(0)=-4\) and the first-order term is \(2(0.25)(-4)(1/4)=-0.5\). The second-order term is \(h^2 f_X''(0)/6=(0.25)^2(8)/6=0.0833\), giving the approximation \(2-0.5+0.0833=1.5833\). The exact value is close, and the difference is due to higher-order terms. The trap is to assume reflection eliminates every bias term; it corrects the missing kernel mass, not the effect of a changing density.
Reflection Near Zero and Its Normalization
Reflection does not merely improve the value at exactly zero. It can also restore the expected estimate near the boundary when the density is locally flat. Consider a uniform loss distribution on \([0,2]\), whose density is \(1/2\) per unit, using the uniform kernel with \(h=0.50\). At \(x=0.25\), the ordinary kernel term is nonzero for losses \(0\leq y\leq0.75\). The mirror term is nonzero for \(0\leq y\leq0.25\). Since \(K/h=(1/2)/(1/2)=1\), these terms have unit weight wherever they are nonzero.
The expected ordinary estimate is therefore \(0.75(1/2)=0.375\). The expected reflected estimate is \(0.375+0.25(1/2)=0.500\), equal to the true density. This exact agreement occurs because the density is constant over the relevant neighborhood and the upper endpoint at 2 is more than one bandwidth away. It is not a general guarantee of exactness for nonconstant densities.
For a symmetric kernel, the reflected estimate also preserves total mass on the nonnegative axis, provided the observations are nonnegative and the kernel integrates to one. For a fixed observation \(X_i\), integrating its two contributions over \(x\geq0\) gives the kernel mass on either side of \(X_i/h\), and those two masses sum to one. Thus the full reflected estimate integrates to one. This normalization is useful, but it does not prove that its local shape is accurate.
Worked Example: Checking the Reflection Calculation Near Zero
Continue with a hypothetical uniform loss on \([0,2]\), density \(1/2\), the uniform kernel, and bandwidth \(h=0.50\). Calculate the expected reflected estimate at \(x=0.25\) and identify the error from omitting the mirror term.
Method. For the ordinary term, the kernel condition is \(|(0.25-y)/0.50|\leq1\), equivalent to \(-0.25\leq y\leq0.75\). Intersecting with the loss support gives an interval of length \(0.75\). Its expected contribution is \(0.75(1/2)=0.375\).
For the mirror term, \(|(0.25+y)/0.50|\leq1\) gives \(-0.75\leq y\leq0.25\). Intersecting with \([0,2]\) gives length \(0.25\), so its expected contribution is \(0.25(1/2)=0.125\). Adding the two contributions gives \(0.375+0.125=0.500\) per unit, matching the true density.
Check. Omitting the mirror term leaves \(0.375\), a downward error of \(0.125\). The calculation also shows why simply doubling the ordinary estimate is not generally the right method: the mirror term has its own range of observations and must be evaluated at its own kernel argument.
When Reflection Can Distort the Density
Reflection is a boundary correction, not a universal repair. It imposes a particular shape on the extended density: the density to the left of zero is taken to be the mirror image of the density to the right. That extension is continuous at zero when \(f_X\) is continuous there, but if \(f_X'(0)\neq0\), its slope changes sign across zero. The cusp in the extension explains the first-order boundary bias.
Several conditions deserve attention:
- A continuous density is being estimated. If losses have a point mass at zero, the displayed estimator smooths that mass as if it were part of a density. It does not identify the probability of a zero loss separately, and the resulting estimate near zero may be dominated by the atom.
- The boundary really is zero. If the observed positive values are truncated by a reporting threshold, reflection at zero does not correct the selection that removed smaller losses. Truncation and boundary smoothing are different issues.
- The density is sufficiently smooth near zero. A sharp change in slope, a jump in the density, or a narrow feature on a scale comparable to \(h\) can make the mirror shape a poor local approximation.
- There is not another nearby boundary being ignored. Reflection at zero does not correct leakage at a finite upper endpoint. If the bandwidth reaches that endpoint, mass can still be smoothed outside the valid range.
- The bandwidth is appropriate. A large \(h\) can blur the shape and allow the mirror contribution to affect points well beyond the immediate boundary neighborhood. A small bandwidth reduces smoothing bias but increases sampling variability.
At zero, under the usual smooth-density conditions, the leading variance is of order \(1/(nh)\), as for kernel estimation in the interior, although its constant differs. In particular, the two reflected terms for one observation are dependent; they must be treated as a single summand when calculating variance. Reflection therefore addresses a boundary bias problem but does not remove the bandwidth tradeoff.
Check Your Understanding
Use the reflected estimator and the stated assumptions in each problem. Answers are provided so you can check the calculations.
- For losses \(0.10, 0.30, 0.80\), use the uniform kernel and \(h=0.40\) to estimate the density at \(x=0.20\). (Answer: \(1.25\) per loss unit.)
- A loss is uniform on \([0,4]\). With the uniform kernel and \(h=0.50\), what is the expected reflected estimate at zero? (Answer: \(0.25\) per loss unit.)
- A loss has exponential density \(f_X(y)=1.5e^{-1.5y}\). Using the uniform kernel and \(h=0.20\), calculate the exact expected reflected estimate at zero. Round to four decimal places. (Answer: \(1.2959\) per loss unit.)
- For the uniform kernel, suppose \(f_X'(0)=-3\) and use \(h=0.10\). Calculate the first-order boundary bias term. (Answer: \(-0.1500\) per loss unit.)
- A portfolio has a positive probability of a reported loss exactly equal to zero, as well as a continuous distribution of positive losses. Is the reflected continuous-density estimator alone sufficient to estimate both components? Explain. (Answer: No; it smooths the zero observations but does not separately estimate the point mass and continuous density.)