  We use pathwise It\^o calculus to prove two strictly pathwise versions of the
master formula in Fernholz' stochastic portfolio theory. Our first version is
set within the framework of F\"ollmer's pathwise It\^o calculus and works for
portfolios generated from functions that may depend on the current states of
the market portfolio and an additional path of finite variation. The second
version is formulated within the functional pathwise It\^o calculus of Dupire
(2009) and Cont \& Fourni\'e (2010) and allows for portfolio-generating
functionals that may depend additionally on the entire path of the market
portfolio. Our results are illustrated by several examples and shown to work on
empirical market data.
