个人数字生活一览。距离上次发布类似的文章已经 3 年了,这三年变化当然很大。受 Julian Shapiro 启发,以后每季度对个人工具库进行更新。
主要使用 IFTTT 和 Pinboard 进行管理,所有的信息存档在 Pinboard,因为购买了 Archive 账户,全文搜索也是可能。
命名是计算科学中最难的两件事,Beancount 的账户的命名尤其困难。对于从其他记账工具迁移过来的用户,直接将原先的账户结构迁移过来当然是可以的。但是 Beancount 这种文本记账工具,对于账户的处理几乎没有成本,可以任性地添加更多的账户。直接复制原来工具的账户结构可能无法完全发挥 Beancount 的能力。
我个人为 Beancount 的账户命名有提供以下几点指导:
最后附上一些其他记账工具默认的账户命名,可供参考。
MoneyWiz 默认账户名
Automobile
Accessories
Car Insurance
Gas/Fuel
Lease
Maintenance
Other
Parking
Bills
Cable
Electricity
Gas
Internet/Broadband
Mobile Phone
Other
Phone
Water
Clothing
Accessories
Clothes
Jewelry
Other
Shoes
Digital
Apps
Books
Movies
Music
Other
Podcasts
TV Shows
Food & Dining
Dining/Eating Out
Groceries
Other
Health Care
Dental
Eye Care
Health Insurance
Medical
Other
Pharmacy
Housing
Furniture/Accessories
Home Insurance
Maintenance
Mortgage
Other
Rent
Leisure
Entertainment
Fitness/Sport
Other
Personal Care
Loans
Other
Taxes
Transportation
Travel
mint-categories https://www.mint.com/mint-categories
Expenses (all types)
1. Rent/Mortgage
a. Home Owners Association Dues
b. Rental Insurance
c. Home Owners Insurance
2. Fixed Expenses
a. Utilities
b. Gas
c. Electric
d. Water/Trash/Sewer
e. Cable/Internet/Phone
f. Cell Phone
g. Credit Cards
h. Car Expenses
i. Maintenance
j. Gas
3. Extra Expenses
a. Grocery (Food)
b. Clothes/Shoes/Hygiene
c. Extra for Home Expenses
4. Savings
a. Savings Account. Speak with employer; some saving plans can pull from paycheck before taxes. That means less of your paycheck is taxable.
b. Create an Emergency Fund; it should be at least 6 months of expenses. Emergencies can happen and drain a well-established savings account
5. Taxes
a. No explanation needed
6. Fun Cash
a. Out with friends
b. Movies
c. Vacations
GnuCash
Adjustment
Auto
Fees
Gas
Parking
Repair and Maintenance
Bank Service Charge
Books
Cable
Charity
Clothes
Computer
Dining
Education
Entertainment
Music/Movies
Recreation
Travel
Gifts
Groceries
Hobbies
Insurance
Auto Insurance
Health Insurance
Life Insurance
Laundry/Dry Cleaning
Medical Expenses
Miscellaneous
Online Services
Phone
Public Transportation
Subscriptions
Supplies
Taxes
Federal
Medicare
Other Tax
Social Security
State/Province
Utilities
Electric
Garbage collection
Gas
Water
beancount-boilerplate-cn 这个项目中的账户命名也可以参考。
对于使用 Beancount 记录投资帐目的人来说,如何评估自己的投资回报一直是一个未解决的问题 。前一段时间 Beancount 的开发者 Martin 写了一个计算回报率的小工具1,姑且可以算是 v3 版本功能的一个小前瞻,尝试使用之后,虽然目前还是比较粗糙的脚本,但是基本可以计算出来年化的投资回报率了。Beancount 用户 Redio 也写了详细的 Review2,可以作为第一个文档的补充,使用时参考。
fava_investor 3 是另一个试图在 fava 中进行投资回报可视化的插件,目前处于开发中,由于我的投资帐目比较复杂,目前没有办法成功运行。对于简单的投资帐目(例如不包含数字货币),可以尝试使用。
另外还有一些比较小的工具,例如beancount_portfolio_allocation4是一个根据当前市值计算持有资产比例的脚本,方便用来进行资产重新配置。我在此插件的基础上,进行了一些简单的修改,重新命名为beancount_portfolio_report5,用于输出当前各类资产的市值、回报和总体回报率(非年化)。
beancount-boilerplate-cn 有部分净值计算的工具,但是同样不适合我这种比较复杂的投资记账。没有尝试。
beancount.io 在网站上也提供了 Stock Analysis 工具,可惜没有看到开源,处于数据安全顾虑,目前没有体验。从 demo 来看完成度还是比较高的。侧重点在于比较不同风险资产的盈利情况。
读者可以根据自己的实际情况,选用上述工具,进行投资回报的计算。其实我理想中的功能,是类似且慢小账本,绘出净值变化曲线,自动计算回报率,以及和大盘指数进行对比。对于 Beancount 来说,前二者需要的数据都是存在的,大盘指数这个可以通过 beanprice
指定来源来进行对比。只能期待 v3 版本早日出来了。
关于资产价格。计算投资回报的前提是 Beancount 账本文件中有对应资产的价格数据,大部分用户可能没有这个数据或者数据不全,可以使用 bean-price
或者 beanprice
6 (分离出来的新版本)进行资产价格获取。现在新版本的 beanprice
已经支持时间段的价格获取,补全资产的历史价格问题应该不大。
Asset allocation plugin for fava/beancount (personal finance software) https://github.com/redstreet/fava_investor true
Reports on portfolio asset allocations in beancount. Useful for risk analysis and for rebalancing purposes. https://github.com/ghislainbourgeois/beancount_portfolio_allocation true
Reports on portfolio performance in beancount. Useful for risk analysis. https://github.com/wogong/beancount_portfolio_report true
beanprice https://github.com/beancount/beanprice true