This paper provides a framework to endogenize rates of return for risk-free bonds and risky capital in an overlapping generation model. The rate of return on capital is endogenized by introducing idiosyncratic production shocks to avoid computation challenges associated with aggregate production shocks in the literature. The framework enables the interaction between financial markets and macroeconomic conditions in a production economy. Based on this framework, the paper first examines life-cycle portfolio choice without demographic change, and illustrates that several factors such as borrowing costs, labor income and production risk play important roles in life-cycle portfolios. The paper then investigates the impacts of population aging on macroeconomic conditions, life-cycle behaviors and financial market structures. The results show that population aging leads to higher capital-labor ratios, and reduces the rates of return on both assets. The bond market shrinks significantly, and capital decreases if the fertility rate declines but increases if the mortality rate declines, leading to structural change in financial markets. The impacts on life-cycle variables are quite different in the fertility and mortality cases particularly at the late stage of life.