  We derive a nonparametric test for constant beta over a fixed time interval
from high-frequency observations of a bivariate \Ito semimartingale. Beta is
defined as the ratio of the spot continuous covariation between an asset and a
risk factor and the spot continuous variation of the latter. The test is based
on the asymptotic behavior of the covariation between the risk factor and an
estimate of the residual component of the asset, that is orthogonal (in
martingale sense) to the risk factor, over blocks with asymptotically shrinking
time span. Rate optimality of the test over smoothness classes is derived.
