We develop a pathwise cost-adjusted master inequality for functionally generated portfolios when proportional transaction costs follow a stochastic, possibly price-correlated diffusion. The inequality separates the excess-growth component from a cumulative cost term and remains valid under piecewise-constant rebalancing on a mesh of size \(\Delta\) . A non-monotone dependence of terminal log-relative wealth on \(\Delta\) is established: increasing trading frequency initially improves performance until stochastic cost drag dominates. Large-scale Monte Carlo experiments (5,000 paths across baseline and transient spread-shock regimes with spreads temporarily reaching 80 bps) validate the predicted sublinear \(\mathcal {O}(\sqrt{t})\) accumulation of cumulative costs and quantify a break-even (zero-crossing) time near day 400 under baseline parameters. An empirical backtest on CRSP small-cap equities (1994-2024), using intraday bid-ask spreads as an empirical proxy for cost volatility, reports post-cost annual excess return of 3.6 and 2.9 percentage points for diversity- and entropy-weighted portfolios relative to the value-weighted benchmark. Cross-sectional distributional evidence indicates a positively skewed terminal edge and resilience to temporary liquidity deterioration. The results document (i) a tractable path-wise decomposition under stochastic frictions, (ii) a quantitatively relevant discretization / cost trade-off, and (iii) persistent empirical performance consistent with the theoretical mechanism.