In this paper, we model an agent-based economy in which heterogeneous agents (firms and a bank) interact in the financial markets. The heterogeneity is due to the balance sheet conditions and to size. In our simulations, at the aggregate level, output displays changes in trend and volatility giving rise to complex dynamics. The average solvency and liquidity ratios peak during recessions as empirical analysis shows. At the firm level the model generates: i) firm sizes left-skewed distributed, ii) growth rates Laplace distributed. Furthermore, small idiosyncratic shocks can generate large aggregate fluctuations.