I present a stock-flow consistent macroeconomic agent-based model for the production cycle. It is in fact a stochastic process for firm evolution. It generates several interrelated scaling laws for quantities like firm size, firm growth rate and temporal fluctuations. They can be described theoretically and cannot all be explained by multiplicative noise models. Stochasticity comes from competition of firms in markets for a finite resource.
A more realistic scenario of this model includes heterogeneity, which leads to additional relative firm growth following replicator equations. The effect on the scaling exponents is analyzed numerically and theoretically. It makes the model more plausible in terms of economic theory and in time evolution, and the scaling exponents are closer to those found empirical data. Since the model is stock-flow consistent, it also produces debt-driven endogeneous cycles in economic activity and other aggregate quantities.