Apparently, having financial statements wasn’t enough.
At some point, I had a reasonably complete personal accounting system.
There were journal entries, a general ledger, a balance sheet, an income statement, and a cash flow statement. Everything was reconciled, classified, and organized in Excel. For someone who only wanted to keep track of his personal finances, it was already a fairly questionable amount of effort.
But there was another problem.
Financial statements are very good at telling you what happened. They’re somewhat less convenient when you want to know why.
I could see how much I had spent during a particular month. What I couldn’t always see immediately was how those expenses had changed over time, which categories contributed the most, or how different parts of my financial position were connected.
So I started building an analysis panel.
The first attempts were made in Power BI. It was a useful introduction to interactive reporting, although eventually I wanted more flexibility over the underlying data and visualizations.
That’s when Python entered the picture.
With Pandas handling the data and Plotly producing the charts, I began building a dashboard where financial figures could be explored across different periods, categories, and reporting levels. And the financial statements gradually became something I could interact with rather than simply read.
The code was then uploaded to GitHub, and Streamlit made it possible to run the analysis through a web browser. What had started as an Excel workbook had somehow become a small web application.
And now, naturally, I’ve embedded it into another website.
Below is the Financial Analysis Panel, another stage in a project that has been going on for considerably longer than I originally expected.
Whether any of this has actually made me better at managing money is still open to discussion.
At least I now have several charts to help investigate the question.
个人财务分析面板
看来光有财务报表还是不够。
做到某个阶段的时候,我其实已经有了一套比较完整的个人财务核算系统。
从会计分录到总账,再到资产负债表、利润表和现金流量表,数据都在 Excel 里完成了分类、汇总和勾稽。对于一个最初只是想记记账的人来说,工作量已经多少有点不太正常了。
但后来又发现了一个问题。
财务报表可以告诉我发生了什么,却不总能方便地告诉我为什么。
比如,我可以知道某个月花了多少钱,但如果想进一步看看这些费用与以前相比有什么变化、哪些类别占了大头、不同财务项目之间又有什么联系,就需要在 Excel 里继续翻表、筛选、计算。
于是又开始折腾财务分析面板。
最早用的是 Power BI。它确实让我第一次感受到,原本躺在单元格里的数据也可以有另一种展示方式。不过用了一段时间以后,又觉得有些地方还不够灵活,尤其是数据处理和图表交互方面。
于是开始研究 Python。
用 Pandas 整理数据,用 Plotly 制作图表,逐渐把各个月份、各类科目和不同报表层级连接起来。财务报表也从原来只能阅读的表格,变成了可以筛选和探索的分析界面。
再后来,把代码上传到 GitHub,通过 Streamlit 部署成了可以在浏览器里访问的应用。最初的一份 Excel 工作簿,就这样慢慢变成了一个小型网页程序。
现在,它又被嵌入到了另一个网站里。
下面就是这套财务分析面板。它算是这个持续了好几年的个人项目中的又一个版本。
至于做了这么多分析以后,我的理财水平究竟有没有显著提高,目前还缺乏足够的证据支持。
不过至少,现在有不少图表可以用来研究这个问题了。
Demonstration data only. All transactions and financial balances are fictional.