A runs test for stock-market prices with an unobserved trend - Nils Herger (Swiss National Bank, Study Center Gerzensee, 2024)
To analyze whether stock-market prices follow a random walk, the algebraic sign of their returns has been compared with a coin toss, which is a prominent example for a Bernoulli trial with equiprobable outcomes. Like coin tosses, signed returns lend themselves for a simple runs test for randomness. However, they typically comprise an unobserved trend, and therefore represent Bernoulli trials whose theoretical outcome probability is not easily known. Fortunately, the Von Neumann algorithm can transform Bernoulli trials with unknown outcome probabilities into equiprobable outcomes. Thus, a runs test on correspondingly transformed returns can handle an unobserved stock-market trend.
Keywords: C14; C22; G11; G14; 330; coin tossing; stock-market prices; random walk; runs test; Von Neumann algorithm