  In this paper, martingales related to simple random walks and their maximum
process are investigated. First, a sufficient condition under which a function
with three arguments, time, the random walk, and its maximum process becomes a
martingale is presented, and as an application, an alternative way of deriving
the Kennedy martingale is provided. Then, a complete characterization of a
function with two arguments, the random walk and its maximum, being a
martingale is presented. This martingale can be regarded as a discrete version
of the Az\'ema--Yor martingale. As applications of discrete Az\'ema--Yor
martingale, a proof of the Doob's inequalities is provided and a discrete
Az\'ema--Yor solution for the Skorokhod embedding problem for the simple random
walk is formulated and examined in detail.
