The Arthashastra written by Kautilya had prescribed detailed rules on accounting and auditing of public finances.
For one example highlighting demographics, see Etienne Gagnon, Benjamin K. Johannsen, and David Lopez-Salido (2016), “Understanding the New Normal: The Role of Demographics,” Finance and Economics Discussion Series 2016-080 (Washington: Board of Governors of the Federal Reserve System, October), https://www.federalreserve.gov/econresdata/feds/2016/files/2016080pap.pdf.