This paper presents a novel theoretical framework to model the evolution of a dynamic portfolio (i.e., a portfolio whose weights vary over time), considering a given investment policy. The framework is based on graph theory and quantum probability. Embedding the dynamics of a portfolio into a graph, each node of the graph representing a plausible portfolio, we provide the probabilities for a dynamic portfolio to lie on different nodes of the graph, characterizing its optimality in terms of returns. The framework embeds cross-sectional phenomena, such as the momentum effect, in stochastic processes, using portfolios instead of individual stocks. We apply our methodology to an investment policy similar to the momentum strategy of Jeegadeesh and Titman (1993). We find that the strategy symmetry is a source of momentum.