2018/01/01 * Opening Balance
    Assets:Checking                             $100.00
    Equity:Opening Balances

2018/01/01 * Budget
    [Assets:Checking]                           = 0
    [Assets:Budget:Food:Groceries]              $20.00
    [Assets:Budget:Food:Restaurants]            $80.00

2018/01/02 * Groceries
    Assets:Checking                             = $80.00
    Expenses:Groceries

$ hledger -f- check

#test bal
#              $80.00  Assets
#             $100.00    Budget:Food
#              $20.00      Groceries
#              $80.00      Restaurants
#             $-20.00    Checking
#            $-100.00  Equity:Opening Balances
#              $20.00  Expenses:Groceries
#--------------------
#                   0
#end test
#
#test bal -R
#              $80.00  Assets:Checking
#            $-100.00  Equity:Opening Balances
#              $20.00  Expenses:Groceries
#--------------------
#                   0
#end test
#