We establish sharp asymptotically optimal strategies for the problem of online prediction with history dependent experts. The prediction problem is played (in part) over a discrete graph called the d dimensional de Bruijn graph, where d is the number of days of history used by the experts. Previous work Drenska and Kohn (arXiv:2007.12732, 2020) established \(O(\varepsilon )\) optimal strategies for \(n=2\) experts and \(d\le 4\) days of history, while Drenska and Kohn (J Nonlinear Sci 30. 30(1), 137–173, 2020) established \(O(\varepsilon ^{1/3})\) optimal strategies for all \(n\ge 2\) and all \(d\ge 1\), where the game is played for N steps and \(\varepsilon =N^{-1/2}\). In this paper, we show that the optimality conditions over the de Bruijn graph correspond to a graph Poisson equation, and we establish \(O(\varepsilon )\) optimal strategies for all values of n and d.