Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Plain Text Accounting (March 2020)

Introduction to Plain Text Accounting (March 2020)

Plain Text Accounting is the practice of maintaining a ledger in a format that values human readability, accountant auditability, and version control. The ledger-like ecosystem enables recording of purchases and transfers and investments, versioning of ledger-files to provide an audit trail, and performing analysis to produce registers, balance sheets, profit and loss statements, track billable time and paid time off, and lots of other reports. In this presentation, you’ll learn some basic accounting principles, ledger tool usage, and why you might choose plain text accounting over Quicken, QuickBooks, Mint.com, or You Need a Budget.

Colin Dean

March 25, 2020
Tweet

More Decks by Colin Dean

Other Decks in Technology

Transcript

  1. #plaintextaccounting plaintext accounting Double-entry accounting using the ledger ecosystem @colindean

    1
  2. About Me Colin Dean Software Engineer & Community Builder 2

  3. #plaintextaccounting Experience with ledger 2012 - 2014 Timetracking & Cryptocurrencies

    3
  4. #plaintextaccounting Experience with ledger 2016 Paid Time Off 4 https://github.com/colindean/pto-tracker

  5. #plaintextaccounting Experience with ledger 2017-2019 Personal and non-profit accounting 5

  6. #plaintextaccounting Experience with ledger 2019-present Business and non-profit accounting Personal

    accounting Work time and PTO tracking 6
  7. #plaintextaccounting Agenda • Why accounting? • Double-entry accounting • Why

    Ledger? • Ledger format and its tools • Tricks 7
  8. #plaintextaccounting Why accounting? 8

  9. #plaintextaccounting To know what you have 9

  10. #plaintextaccounting What you can access immediately + What others owe

    you - What you owe others What you have 10
  11. #plaintextaccounting Benefits of tracking • Know what you • have

    across all accounts • had at some point in the past • owe and are owed • can spend 11
  12. #plaintextaccounting Legally required for most businesses 12

  13. 13

  14. #plaintextaccounting Double-entry accounting • Terminology • Account • Debit •

    Credit • Transaction 14
  15. #plaintextaccounting A label describing an amount of something Account (even

    if that amount is 0) 15
  16. #plaintextaccounting Five common categories of accounts 16 (for personal finance)

  17. #plaintextaccounting 17 Assets Income Liabilities Expenses Wallet Bank accounts Investments

    Loans credited Loans owed Mortgage Credit cards Student loans Paychecks Gifts received Interest Dividends Groceries Taxes Gifts given Donations
  18. #plaintextaccounting Equity 18 For everything else, there’s Opening Balances Cashback

    Untrackable errors
  19. #plaintextaccounting The addition of value to an account Credit 19

  20. #plaintextaccounting The deduction of value from an account Debit 20

  21. #plaintextaccounting A collection of credits and debits with a timestamp

    to describe when the transaction is effective Transaction 21
  22. #plaintextaccounting One transaction Credit Debit Deduct from accounts Add to

    accounts 22
  23. #plaintextaccounting Double-entry accounting Transaction Credit Debit 23

  24. #plaintextaccounting Double-entry accounting Transaction Credit Debit Credit Debit 24

  25. #plaintextaccounting Balance transactions Credit Debit 0 25

  26. #plaintextaccounting Balance transactions Credit Debit 0 -100 + 100 =

    0 26
  27. #plaintextaccounting Balance transactions Credit Debit 0 -100 523 -252 15

    -186 -538 + 538 = 0 Johnny Susie Naga Bank Wallet 27
  28. #plaintextaccounting Transactions must always be balanced 28

  29. #plaintextaccounting Programs 29

  30. #plaintextaccounting 30

  31. #plaintextaccounting 31

  32. #plaintextaccounting 32 “YNAB”

  33. #plaintextaccounting 33 GNUCASH NU ASH

  34. #plaintextaccounting ledger 34

  35. 35 https://en.wikipedia.org/wiki/Comparison_of_accounting_software

  36. 36 https://en.wikipedia.org/wiki/Comparison_of_accounting_software

  37. #plaintextaccounting Why ledger? 37

  38. #plaintextaccounting Manual entry at first • Intimate knowledge of every

    transaction • Envelopes are cash only • Bank exports are card and check only 38
  39. #plaintextaccounting … then automate • Use bank exports processed through

    ledger or ledger-autosync, etc. • Use tools for payee renaming • Consider paid tools like Plaid • Don’t forget greenback transactions 39
  40. #plaintextaccounting Track everything. • USD? Commodity. • BTC? Commodity. •

    VSTAX? Commodity. • TSLA? Commodity. • House? Commodity. 40
  41. #plaintextaccounting It’s just text. • Manual typing is worst case

    scenario. • No special editor required. • Give it to your accountant! 41
  42. #plaintextaccounting Developer-friendly • Simple format to parse and construct •

    Versionable with meaningful diffs and audits • Standard developer tools for everything. • Syntax highlighting, continuous integration, etc 42
  43. #plaintextaccounting Ledger format • Timestamp • Payee • Accounts with

    positive numbers for credit • Accounts with negative numbers for debit • Optional: comments 43
  44. 44 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet -3.00

  45. 45 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet -3.00

  46. 46 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet -3.00

  47. 47 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet -3.00

  48. 48 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet -3.00

  49. 49 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet -3.00

  50. 50 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet -3.00

  51. 51 2017-06-26 Commonplace Coffee Expenses:Restaurants:Coffee 3.00 Assets:Cash:Wallet

  52. 52 2017-06-27 Commonplace Coffee ; cold brew Expenses:Restaurants:Coffee 3.00 Liabilities:CreditCards:Costco

  53. 53 2017-06-27 Commonplace Coffee ; cold brew Expenses:Restaurants:Coffee 3.00 Liabilities:CreditCards:Costco

  54. 54 2017-06-27 Commonplace Coffee ; cold brew Expenses:Restaurants:Coffee 3.00 Liabilities:CreditCards:Costco

  55. 55 2017-06-30 Spacely Sprockets ; payday! Income:SpacelySprockets -2000.00 Assets:Cash:Bank:Checking 2000.00

  56. 56 2017-07-15 Spacely Sprockets ; payday! Income:SpacelySprockets -2000.00 Assets:Cash:Bank:Checking 2000.00

    2017-07-15 Transfer to Savings Assets:Cash:Bank:Checking -100.00 Assets:Cash:Bank:Savings 100.00
  57. 57 2017-07-30 Spacely Sprockets ; payday with taxes Income:SpacelySprockets -2735.00

    Expenses:Taxes:Federal:EIT 459.00 Expenses:Taxes:Federal:FICA 192.00 Expenses:Taxes:State:EIT 84.00 Assets:Cash:Bank:Checking 2000.00
  58. 58 2017-07-30 Spacely Sprockets ; payday with taxes Income:SpacelySprockets -2735.00

    Expenses:Taxes:Federal:EIT 459.00 Expenses:Taxes:Federal:FICA 192.00 Expenses:Taxes:State:EIT 84.00 Assets:Cash:Bank:Checking 2000.00
  59. #plaintextaccounting Running ledger 59

  60. 60 2017-06-26 Opening Balances Assets:Cash:Bank:Checking 500.00 Assets:Cash:Bank:Savings 1500.00 Liabilities:CreditCards:Costco -61.25

    Equity:OpeningBalances 2017-06-27 Commonplace Coffee ; cold brew Expenses:Restaurants:Coffee 3.00 Liabilities:CreditCards:Costco
 2017-07-15 Spacely Sprockets ; payday! Income:SpacelySprockets -2000.00 Assets:Cash:Bank:Checking 2000.00 2017-07-15 Transfer to Savings Assets:Cash:Bank:Checking -100.00 Assets:Cash:Bank:Savings 100.00
  61. 61 ledger -f exercise1.ledger balance 4000 Assets:Cash:Bank 2400 Checking 1600

    Savings -1938.75 Equity:OpeningBalances 3 Expenses:Restaurants:Coffee -2000 Income:SpacelySprockets -64.25 Liabilities:CreditCards:Costco -------------------- 0
  62. 62 ledger -f exercise1.ledger accounts Assets:Cash:Bank:Checking Assets:Cash:Bank:Savings Equity:OpeningBalances Expenses:Restaurants:Coffee Income:SpacelySprockets

    Liabilities:CreditCards:Costco
  63. 63 ledger -f exercise1.ledger payees Commonplace Coffee Opening Balances Spacely

    Sprockets Transfer to Savings
  64. 64 ledger -f exercise1.ledger register 17-Jun-26 Opening Balances Assets:Cash:Bank:Checking 500

    500 Assets:Cash:Bank:Savings 1500 2000 Liabilities:CreditCards:Costco -61.25 1938.75 Equity:OpeningBalances -1938.75 0 17-Jun-27 Commonplace Coffee Expenses:Restaurants:Coffee 3 3 Liabilities:CreditCards:Costco -3 0 17-Jul-15 Spacely Sprockets Income:SpacelySprockets -2000 -2000 Assets:Cash:Bank:Checking 2000 0 17-Jul-15 Transfer to Savings Assets:Cash:Bank:Checking -100 -100 Assets:Cash:Bank:Savings 100 0
  65. 65 ledger -f examples.ledger balance 9547.97 Assets:Cash 9550.47 Bank 6436.35

    Checking 3114.12 Savings -2.5 Wallet -3318.84 Equity:OpeningBalances 744 Expenses 9 Restaurants:Coffee 735 Taxes 700 Federal 500 EIT 200 FICA 35 State:EIT -6735 Income:SpacelySprockets -238.13 Liabilities:CreditCards:Costco -------------------- 0
  66. #plaintextaccounting balance and register alone aren’t that useful 66

  67. #plaintextaccounting Expenses minus Income Positive means that expenses are higher

    than income. Cashflow 67
  68. 68

  69. 69 ledger -f examples.ledger balance ^Income ^Expenses 744 Expenses 9

    Restaurants:Coffee 735 Taxes 700 Federal 500 EIT 200 FICA 35 State:EIT -6735 Income:SpacelySprockets -------------------- -5991
  70. #plaintextaccounting Assets minus Liabilities Net worth 70

  71. 71

  72. #plaintextaccounting As of 2014, ~50% of Americans have zero net

    worth 72 https://www.marketplace.org/2014/04/21/wealth-poverty/about-half-america-has-zero-net-wealth
  73. 73 ledger -f examples.ledger balance ^Assets ^Liabilities 9547.97 Assets:Cash 9550.47

    Bank 6436.35 Checking 3114.12 Savings -2.5 Wallet -238.13 Liabilities:CreditCards:Costco -------------------- 9309.84
  74. #plaintextaccounting Commodities 74

  75. 75 2017-07-01 Vanguard Assets:Cash:Bank:Checking -1000 USD Assets:Investments:Vanguard:RothIRA 8.03535 VTI @

    124.45 USD 2017-07-16 Vanguard Assets:Cash:Bank:Checking Assets:Investments:Vanguard:RothIRA 0.90535 VTI @ 125.56 USD
  76. 76 2017-07-01 Vanguard Assets:Cash:Bank:Checking -1000 USD Assets:Investments:Vanguard:RothIRA 8.03535 VTI @

    124.45 USD 2017-07-16 Vanguard Assets:Cash:Bank:Checking Assets:Investments:Vanguard:RothIRA 0.90535 VTI @ 125.56 USD
  77. 77 P 2017/07/01 16:00:00 VTI 124.45 USD P 2017/07/03 16:00:00

    VTI 125.75 USD P 2017/07/05 16:00:00 VTI 128.89 USD P 2017/07/07 16:00:00 VTI 139.66 USD P 2017/07/09 16:00:00 VTI 133.45 USD P 2017/07/11 16:00:00 VTI 128.58 USD
  78. 78 ledger -f exercise2.ledger --price-db exercise2.pricedb bal -V --end 7/2

    0 Assets -1000 USD Cash:Bank:Checking 1000 USD Investments:Vanguard:RothIRA -------------------- 0
  79. 79 ledger -f exercise2.ledger --price-db exercise2.pricedb bal -V --end 7/4

    10 USD Assets -1000 USD Cash:Bank:Checking 1010 USD Investments:Vanguard:RothIRA -------------------- 10 USD
  80. 80 ledger -f exercise2.ledger --price-db exercise2.pricedb bal -V --end 7/4

    10 USD Assets -1000 USD Cash:Bank:Checking 1010 USD Investments:Vanguard:RothIRA -------------------- 10 USD
  81. 81 ledger -f exercise2.ledger --price-db exercise2.pricedb bal -V --end 7/6

    36 USD Assets -1000 USD Cash:Bank:Checking 1036 USD Investments:Vanguard:RothIRA -------------------- 36 USD
  82. 82 ledger -f exercise2.ledger --price-db exercise2.pricedb bal -V --end 7/8

    122 USD Assets -1000 USD Cash:Bank:Checking 1122 USD Investments:Vanguard:RothIRA -------------------- 122 USD
  83. 83 ledger -f exercise2.ledger --price-db exercise2.pricedb bal -V --end 7/10

    72 USD Assets -1000 USD Cash:Bank:Checking 1072 USD Investments:Vanguard:RothIRA -------------------- 72 USD
  84. 84

  85. #plaintextaccounting Other transaction features • Virtual transactions - ledger within

    an account • Stock lot pricing - designate basis or lot date • Command directives - default accounts, etc. • Balance assertions - declare a balance at a date • Asset allocation - see bond/equity allocation 85
  86. #plaintextaccounting Other features • Budgeting • Forecasting • Timekeeping 86

  87. #plaintextaccounting Budgeting • Periodic transactions • Command line options •

    --budget • --add-budget • --unbudgeted 87
  88. 88 ~ Monthly Expenses:Restaurants:Coffee 30.00 USD Expenses:Restaurants:Lunch 100.00 USD Expenses:Coworking

    50.00 USD Expenses:Groceries 600.00 USD Expenses:Phone 100.00 USD Expenses:House:Utilities 150.00 USD Liabilities:Mortgage 600.00 USD Expenses:Movies 50.00 USD Expenses:Auto:Insurance 150.00 USD Expenses:Auto:Gasoline 120.00 USD Expenses:Taxes 3000.00 USD Expenses 200.00 USD ; all other expenses Assets
  89. 89 2017-06-01 Mortgage Liabilities:Mortgage 580.00 USD Assets:Cash:Bank:Checking 2017-06-26 Commonplace Coffee

    Expenses:Restaurants:Coffee 3.00 USD Assets:Cash:Wallet 2017-06-26 Whole Foods Expenses:Restaurants:Lunch 15.00 USD Liabilities:CreditCards:Costco
  90. 90 ledger -f exercise3.ledger --monthly register --add-budget -p "june 2017”

    17-Jun-01 - 17-Jun-30 Assets 4567.00 USD 4567.00 USD Expenses -200.00 USD 4367.00 USD Expenses:Auto:Gasoline -120.00 USD 4247.00 USD Expenses:Auto:Insurance -150.00 USD 4097.00 USD Expenses:Coworking -50.00 USD 4047.00 USD Expenses:Groceries -600.00 USD 3447.00 USD Expenses:House:Utilities -150.00 USD 3297.00 USD Expenses:Movies -50.00 USD 3247.00 USD Expenses:Phone -100.00 USD 3147.00 USD Expenses:Restaurants:Coffee -27.00 USD 3120.00 USD Expenses:Restaurants:Lunch -85.00 USD 3035.00 USD Expenses:Taxes -3000.00 USD 35.00 USD Liabilit:CreditCards:Costco -15.00 USD 20.00 USD Liabilities:Mortgage -20.00 USD 0
  91. #plaintextaccounting Forecasting • Constantly apply periodic transactions to see future

    value of accounts 91
  92. 92 ledger -f exercise3.ledger --forecast "T>{\$-500.00}" register ^assets ^liabilities 17-Jun-01

    Mortgage Liabilities:Mortgage 580.00 USD 580.00 USD Assets:Cash:Bank:Checking -580.00 USD 0 17-Jun-26 Commonplace Coffee Assets:Cash:Wallet -3.00 USD -3.00 USD 17-Jun-26 Whole Foods Liabilit:CreditCards:Costco -15.00 USD -18.00 USD 17-Jul-30 Spacely Sprockets Assets:Cash:Bank:Checking 2000.00 USD 1982.00 USD 18-Jan-01 Forecast transaction Assets -2300.00 USD -318.00 USD 17-Aug-01 Forecast transaction Liabilities:Mortgage 600.00 USD 282.00 USD 17-Aug-01 Forecast transaction Assets -5150.00 USD -4868.00 USD 17-Sep-01 Forecast transaction Liabilities:Mortgage 600.00 USD -4268.00 USD 17-Sep-01 Forecast transaction Assets -5150.00 USD -9418.00 USD
  93. #plaintextaccounting Time Keeping 93

  94. 94 i 2017/06/23 09:15:00 CodeAndSupply:Talks [Plain Text Accounting] o 2017/06/23

    10:00:00 i 2017/07/09 20:15:00 CodeAndSupply:Talks [Plain Text Accounting] o 2017/07/10 00:06:48 i 2017/07/11 22:00:00 CodeAndSupply:Email [Uptime Sponsorship] o 2017/07/11 22:15:00 i 2017/07/11 22:15:00 CodeAndSupply:Talks [Plain Text Accounting] o 2017/07/12 00:06:00
  95. 95 ledger -f timekeeping.ledger bal 6.71h CodeAndSupply 15.0m Email [Uptime

    Sponsorship] 6.46h Talks [Plain Text Accounting] -------------------- 6.71h
  96. 96 ledger -f timekeeping.ledger bal —end 5/13 10.00h Away 1.00h

    DoctorAppt 9.00h Vacation 18.00h Billable 17.25h Development [Front end] 45.0m Meeting 7.00h Nonbillable:Training -------------------- 35.00h
  97. 97 ledger -f timekeeping.ledger reg --end 5/13 17-May-09 (Billable:Meeting) 45.0m

    45.0m 17-May-09 (B:Development [Front end]) 8.25h 9.00h 17-May-10 (B:Development [Front end]) 9.00h 18.00h 17-May-11 (Away:Vacation) 9.00h 27.00h 17-May-12 (Nonbillable:Training) 7.00h 34.00h 17-May-12 (Away:DoctorAppt) 1.00h 35.00h
  98. #plaintextaccounting Other features • Query language - mostly regex but

    some others • Python integration - web-based entry and scripting 98
  99. #plaintextaccounting ledger-cli.org 99 ledger-cli.org/docs.html

  100. #plaintextaccounting Ecosystem 100

  101. #plaintextaccounting #plaintextaccounting 101

  102. #plaintextaccounting plaintextaccounting.org 102

  103. 103

  104. 104

  105. 105

  106. 106

  107. 107 Treemap of my 2017 Expenses in Fava, the web

    UI for Beancount
  108. 108

  109. #plaintextaccounting Treat Transactions As Code • Version it with git,

    etc. • Setup continuous integration to catch entry errors • Setup continuous deployment • Deploy transaction record inside a container running Fava for quick web analysis • Send summaries to Slack! 109
  110. 110

  111. #plaintextaccounting Takeaways • Accounting informs us of how much we

    have. • Bookkeeping is the practice of tracking transactions. • Double-entry accounting requires balanced transactions. 111
  112. #plaintextaccounting Takeaways • There are many tools. • ledger is

    the most well-known plain text accounting tool. • There is a whole ecosystem and community around it. 112
  113. #plaintextaccounting Takeaways • Text lends itself to easier management. •

    Manual entry may seem tedious but it enables intimate knowledge of one’s finances. • Use the tools you know to manage your finances and build automation that works for you – and share it with the world! 113
  114. #plaintextaccounting Is ledger the best? 114

  115. 115

  116. #plaintextaccounting Use the best tool for you 116

  117. #plaintextaccounting Go forth and save! 117

  118. #plaintextaccounting Attributions • Rich Uncle Pennybags © Hasbro. Artist unknown.

    • Logos are property of respective and obvious owners. 118
  119. @colindean 119

  120. #plaintextaccounting plaintextaccounting.org 120 /r/plaintextaccounting @LedgerTips irc://chat.freenode.net/ledger http://j.mp/plaintextaccounting-codeandsupply-2017