Common Documentation


Why another (free) accounting program?
Single or double entry accounting or...
The "stock"
All is an exchange...
... with somebody or something ... (the actor)
... or a decantation
The "antimatter" in famflows (an exchange with nothing)


In this part of the documentation I will explain the general concepts that make famflows different from all the others accounting programs which I have seen so far and I will try to explain the general idea which makes famflows useful (in the author's opinion, of course :) ) to the management of the family balance.

Why another (free) accounting program?

A bit of history

Famflows started as a "proof of concept" in January 2009, after several years of happy gnucash use.

I personally started to use gnucash as an end user back in 2002 and I happily used it till January 2009, when I felt the need of something different. I was happy with gnucash and I tracked with it my family's incomes and expenditures. The problem which I felt is that gnucash, like all double entry accounting programs, considers all things money.

For example if you own a car, this is an "asset" (in accounting terms this is a value of your house, because you could sell it for money). In accounting you cannot say: "I have an asset of one car", but you must estimate it.

This can be done, of course, because if your car is not very old there are tables where, given the model and the year, you get a value. But this value is only a "theory".

It can be useful for a business, because you pay taxes based on your incomes and assets (assets loose value with time and so you pay less taxes to compensate for this depreciation; this is a rather complex and burocratic matter), but for a family this is not so important.

Single or double entry accounting or...

In general the current personal finances programs available today (free or not) can be divided into single or double entry accounting.

Single entry accounting

In the single entry world a user tracks her expenditures simply telling them in a table, like this:

item April Expenses:
Food $ 300.00
Car $ 150.00
Children $ 500.00

Total $ 950.00
Income $ 1050.00
Savings $100.00

The single entry mode is very simple. In fact it is a simple table where in the rows are the expenditures (food, cinema, car, children...) and in the columns we have the periods (usually months) where we put our expenses.

Usually there is an additional row where one can put her earnings and, with a simple subtraction, we immediately know the net balance of the month.

This system is very simple and intuitive. Every one that has tried to track her family balance at first probably has started (maybe with a spreadsheet like Excel or OpenOffice Calc) a single entry system.

These are its greatest advantages. This simplicity, however, does not allow a "self-check". What if we forget something? We won't notice until the end of the month, where we see that we have saved 100$... but, if we notice that our bank account has not grown by 100$ something is not correct... but where?

Another disadvantage is that the single entry accounting is not able to track things like assets (for example a car, a home) or liabilities (like a mortgage or the credit card payments).

Double entry accounting

I am not going to explain the double entry system in detail. The gnucash tutorial is good at this. For our purpouses it is sufficient to highlight its main concept.

The main concept is simple: every "positive" movement must be balanced by a "negative" one.

For example if we spend 50$ at the supermarket there is certainly a "negative movement" in our wallet: if we had in our wallet 69$, after the supermarket we will have 19$.

But this is balanced by a "positive" movement in our "expenses", that is, our expenses have grown.

In double entry "jargon" the negative movement is called "debit", the positive one is called "credit".

So, in the end we will have

Account: pocket cash credit debit total
... 0 0 $69.00
Supermarket 0 $50.00 $19.00

And for the other account:

Account: supermarket expenses credit debit total
... 0 0 $100.00
Supermarket $50.00 0 $150.00

From this simple example we can see the power of double entry: the self check mechanism: because we are not only saying "I have spent $50.00 at the supermarket", but we are also saying: "I have $19.00 in my wallet". And this is easy to check: just open the wallet and count the money left.

If it is $19, ok. But for example it could be 18$. What happened? Probably we forgot something... we think... "Ah... I bought a coffee at the bar".

So we remember to put another expense:

Account: pocket cash credit debit total
... 0 0 $69.00
Supermarket 0 $50.00 $19.00
Bar 0 $1.00 $18.00

But... we are in double entry! We must find another account to credit to balance this "transaction".

Probably we would have an account called "recreation expenses"

Account: recreations expenses credit debit total
(past movements) 0 0 $12.49
Bar $1.00 0 $13.49

You see the point? By splitting the transaction in two equal sides we have achieved an expressive power:

1) We are saying that in our wallet there are $18 left.

2) We are saying where the money has gone: $50.00 to the supermarket and $1.00 to the bar.

Both informations at the cost of simply duplicating a number.

Famflows balance system

Famflows starts as a double entry accounting program, I believe that the power of double entry accounting is far superior to a single entry system. Also famflows, in fact, is a "balanced" system. The main difference is that we have not "omogenous" transactions.

Let's make an example.

We have in our wallet $15.00. We buy 10 eggs for $1.00.

In gnucash we would write:

transaction account credit debit
bought 10 eggs
pocket money 0 1.00
eggs 1.00 0

As always we have a balanced transaction. Our pocket money has diminished by one dollar and our expenses for eggs have grown by one dollar.

Time passes... we buy other eggs.

And... eggs' price can rise. This is called "inflation".

10 eggs now cost $1.20

We can write:

transaction account credit debit
bought 10 eggs
pocket money 0 1.20
eggs 1.20 0

At the end of the year we may see, for example, that during the year we have spent, for example, $30.60 in eggs.

*How many* eggs have we bought?

This question is difficult to answer in gnucash, gnucash, like all the double entry systems, is good to track "money", not quantities. It can say that we have spent a certain amount of $ in eggs, not how many eggs, at least not directly.

If the price of eggs has remained constant during the year we could simply make a division... but prices can fluctate in time and in space (the same item in different shops could cost different).

In famflows, instead, the main concept is not the balanced transaction, with equal sides ($1 on one side and $1 on the other); the main concept is the exchange.

Something enters and something exits from our home. In this case $1 has exited and 10 eggs have entered.

In famflows we would write:

1 $ has exited 10 eggs have entered

That is: we have exchanged a coin (in this case a $1 coin) for 10 eggs. This exchange has been possible because there exist somebody (an actor, in famflows terms), that is willing to accept coins in exchange for eggs.

The "price" is simply the exchange rate between eggs and $, as in the classical economy. This exchange rate is fixed by the actor and we accept it (otherwise we won't buy eggs but milk or other food). In famflows there is no concept of "book", like in the stock market exchange, where you bid some value and somebody else asks. In famflows the exchange rate (the price) is supposed to be fixed in some way (for the vast majority of things we have no choice, either we buy gasoline — for example — at the fixed price or we won't use the car... we don't have any contractual force).

So, to summarize, in famflows we don't have money transactions, we have, instead, exchanges, it is not "barter", even when we "buy" something in fact we are exchanging something for something else.

But... if all in famflows is an exchange... where do the things go? Where they come from? We see the problem here:

we must obey the principle of conservation of matter.

The $1 coin must come from somewhere (the wallet in our case)

The eggs that we buy must go somewhere (probably in the fridge...)

The "stock"

In a double entry accounting system the main "object" is the account. The "account" is where the transactions are recorded. Every transaction must insist on at least two accounts: one is credited and one is debited. A transaction can have also multiple "splits" (three or more) in any case the "golden rule" is:

Sum of credits = sum of debits.

Of course if we have only two splits the credit is equal to the debit.

In famflows the account is substituted by the "stock" concept. The stock is where we take the matter to exchange (for example money) and to which we put the things that we have exchanged in return.

In famflows every thing comes from or goes to a stock.

Account types and stock types

I apologize, this manual is taking the shape of a "confrontation" between gnucash (or, better, a double entry system) and famflows. I do not intend to start a sort of a "religion war": a double entry system is necessary for running a business, and gnucash is very good at it.

But to explain a different thing sometimes it is better to make a difference between a known matter.

In any case, I go on.

We were explaining that in famflows the basic object is not the account but the stock. I chose the word "stock" because I felt that it renders better the idea of somthing that is able to collect things, a sort of box with a label.

As in accounting we have different account types, also in famflows we have different stock types. But the way of distinguish them is different.

In accounting we have two basic account types: "positive" and "negative", and each of these types can be divided in accounts for the patrimony and accounts for the balance.

So we have in practice 4 account types which we can summarize in a table:

\ negative positive
patrimony liability asset
balance income expense

It seems strange, but the income is a "negative" account (in the sense that the credit and debits sides are "swapped") like a liability and the expense is positive like a asset.

In famflows stocks are not divided in positive or negative. Every stock is "positive", if you add to a stock you will end up with a positive amount1.

The difference in famflows is that there are different types of things that can be stocked.

The first difference is:

- are the things in the stock distinguishable?

Let's consider for example eggs. For us, consumers, all eggs are equal. We count 6 eggs in the fridge... we are counting homogenous things. The same applies with money. 1 Euro is equal to another Euro. We can count Euros, and they are indistinguishable... it is like a flow, in fact sometimes we say that money is liquid, because it is undistiguishable, it is like river...

... we can have a flow of water (a river), a flow of money, or (with a little fantasy) a flow of eggs that are entering our home.

But not all the things can be treated like a flow, or, better, they, usually, do not accumulate. For example a car... usually there is only a couple of cars in a family. Maybe a couple of Televisions. But these two cars are distinguishable, maybe one is old and it is used only for day by day movements. The other is "nice" and used for more formal occasions. One TV is big and flat, the other is small and curved.

We can count them, we can say "We have 2 cars", but this sentence is not the same as "We have 4 eggs in the fridge", because the "stock" of cars is composed of things which are "different", and only for simplicity we unify. Instead eggs are, for all practical purpouses, equals (of course we can have small and big eggs, but usually this is not the case, if we think about sugar, for example, this is true: a kilo of sugar is not distinguishable by another kilo).

Another example could be a "service". Let's consider the rent of the house. If we pay 500 Euro per month to live in our house this is an exchange (in famflows everything is an exchange). We exchange 500 Euro with the right to live in this house one more month. This right is the thing. And all these things are not distinguishable. We have a constant flow of "one right per month" that enters our home (and a constant flow of 500 Euro per month that exits).

But... why we must pay every month the rent? For the same reason because we must continue to buy eggs: because there are things that wear out.

This leads to the second difference:

- are the things in the stock perishable?

For example: money and eggs. They are both undistinguishable, so, for the first question, they are similar. But they are not similar for the second one: if we put 30 Euro in a box and we forget it for years and we reopen it we will find the same 30 Euro... if we put 30 eggs in a box and we forget it for years and then we reopen it... :)

There are of course exceptions: there are thieves, for example; somebody can steal our belongings... but in general an egg is not similar to a coin.

In famflows we have three kind of stocks based on the previous questions (we could have four, but one type is not used).

1) Undistinguishable and unperishable:

this is an Asset. Examples: money, coins in general, livestock (an animal does perish, but this is another matter, for the short term a cow, for example, is an asset). We are not talking of pets. Pets are not livestock, but they are usually family members.

2) Distinguishable and unperishable

This is also an Asset, for this reason we have only three types and not four. Example: homes, pictures, jewellery, stamps... anything that has an intrinsic value and can be distinguished (One picture is different from another picture, one stamp by another... ).

3) Undistinguishable and perishable

This is a consumable: eggs, services, litres of gasoline, milk, month of rent.

4) Distinguishable and perishable

This is a "depreciable", for example a car, or a TV set. These things are like an asset, but they usually loose value with time. We don't consume a car, but the car does wear out. In this stock type we can add for example tools, computers, all things that have a limited lifetime, but that are not "consumed" in the way we consume food or, for example, a toner.

Materials and units:

For now we have seen that famflows does not use the "account" concept, like in double entry accounting, but it uses the "stock" concept.

There is another difference.

In double entry accounting every account (asset, liability, income or expense) has the same "material": money. We can have different currencies, but in every case all the accounts are counted in money. EUR, USD, GBP, whatever, but the "material" is money. This is the limitation (and strength) of the model itself. If all is money, all can be comparable and computable.

We can compare a car and a boat, for example, because they are both expressed in money. We can subtract a picture from a house, for example... because we have a picture worth 10,000$ and we own a house worth 100,000$ but with a loan of 70,000$ left... so our "net worth" is "one home - one mortgage + one picture" = 100,000 - 70,000 + 10,000 = 40,000$.

These things could not be done if we don't express all things in the same "material": money.

But this is also its disadvantage: we are forced to give a value to all the "assets" we have and to update this value during time (a home can gain or loose value, a car, a boat, a picture... the same).

In famflows this problem does not exist because every stock can be counted with a different material. For example the "egg stock" will be counted in "eggs". The "milk stock" will be counted in "liters of milk".

In famflows the relationship between stock and material is one to many: we can have many stocks with the same material, every stock is associated to one (and only one) material.

Every material is associated to one (and only one) unit.

The reason why we can have more than one stock with the same material is simple: because, expecially for the "asset" stocks, we physically put the objects in different places. For example we can have "Euro" in pocket or in the bank. They are "euro", the same material, but in different places.

But there are other examples: for example, suppose that a family has two homes; this family will consume electricity in two different places, so, in famflows, we will have a material (electricity), whose unit is kwh ( 1 kwh = 3.6E6 Joule), and we will have two stocks where we put this energy: one for each house we own.

Limitation of the model

Famflows is a model. Every model has some limitation

Endless supply

Not all is tracked, of course. Only the exchanges which we consider important. For example we breath. The act of breathing is an "exchange" from the stock of oxygen in the atmosphere to our internal stock (the oxygen in our blood) and we return CO2.

So, breathing is, simplicistically, an exchange with the actor called "atmosphere":

in: x kg O2

out: y kg CO2

This exchange could be traced in famflows... but it is useless, because, for now, we don't associate with it a real economical exchange (where for economical we intend something which is limited in supply).

Internal production, net consume, export

We count the eggs that we have exchanged during a period of time, we divide by the interval and we can estimate a certain average flow of eggs. This, in the majority of homes, is equal to the amount of eggs consumed. But this could be not true, for example, for a family that has also some eggs.

Internal exchanges and trasformations

In famflows we don't track internal exchanges. For example we buy eggs, eggs are eaten and they disappear (well, they finish partly in the atmosphere as the "C" in CO2, partly as water as the vapor we breath, partly in urine and faeces)... these are transformations but they happen inside the family; well, even inside ourselves.

Famflows, as the name implies, only tracks "family" flows. That is flows which are visible at the boundary between the family and the outside.

And not all the flows are tracked. As we said before, for example, we usually don't track the flow of air our family breath, neither for example the flow of information and the advance in knowledge of our families.

Of course, as the model is adaptable, we could have a "worldflow" program, where for example we track the flows of our planet in relation to the sun and the Solar System.

In famflows the boundary is the "family" and the flows happen at the interface between the family and the outside.

All is an exchange...

In famflows we have exchanges where in a double entry accounting we have transactions. The differences between an exchange and a transaction are:

a transaction has on both sides money, an exchange has a different material on both sides, we cannot have an exchange with the same material on both sides... apart from an anti-material, which we will explain later.

a transaction can have multiple splits. For example we can buy a car which costs 8,000 Euro, but we must pay also 20% VAT. So we have a transaction with three splits and not two:

Asset:Car            | Credit    | Debit       	| Total
bought  car          | 8,000     | 0            | 8,000

Asset:Bank account   | Credit    | Debit       	| Total
...    	       	     | 	       	 |     	       	| n
bougth car	     | 0       	 | 9,600       	| (n)-9,600

Expenses:VAT         | Credit    | Debit        | Total
bougth car	     | 1,600   	 | 0            | 1,600

In this example I have the VAT registered like an "expense". This is true for a private, for a professionist (or a firm) VAT is an Asset, because it is then subtracted by the VAT which the firm force to pay to its customers.

In famflows we cannot have an exchange with multiple splits; this is not a limitation, but by design (nevertheless in the future we could have a sort of exchange group, where an exchange set is related, but they will continue to be independent objects).

In famflows, this is the rule, every exchange is balanced... so, every other grouping will be only "semantical", but not "mathematical".

But there is another difference which renders a transaction (in gnucash or in another double entry system) and an exchange in famflows different: the actor.

... with somebody or something ... (the actor)

In famflows every exchange, as the name implies, is with somebody or something, which we call Actor (the term has nothing to do with the "actor" in a movie or the "Actor" concept in UML). The Actor in famflows is simply the counterpart of an exchange.

Famflows has been designed to track the flows that enter and exit a boundary. In the common case the boundary is the home. So, in the common case, an actor is everything which does not live in the home with which we exchange something.

Examples of actors are: shops, relatives, friends, the state, the electrical company... as in a double entry system we can be more detailed or less when we design our accounts' tree, also in famflows we can be more or less precise when we design our actors' tree.

So, for example, we could have a generic actor called "shops", and we register with this actor all the things that we buy (that we receive in exchange for money, in famflows language), or we can be more precise and we divide the "shops" in supermarkets, small shops, shops in a city or in another, etc...

Returning to our former example of buying a car, instead of having a transaction with three splits (car, bank, VAT) we have a couple of related exchanges but, each one of these two, is balanced.

We give 8,000 $ to the cars' shop and it gives us one car. We give 1,600 $ to the State and it gives us... nothing (I am speaking as a private, as I said before for a private VAT is simply an expense, a tax).

Well, it is not true that we don't receive anything from the state: we should receive protection, health care, education for kids. These are flows which in any case enter the home. But it is not easy to say what part of those 1,600 goes to schools, army, debts, bailouts, etc... we could simply say that those 1,600$ are a part of the price to be Italians (or Americans, or French... whatever). And this price is not a una tantum, but like a rent: every year we pay the right to be citizens of a particular country.

Anyhow, to model clearly this movement, we must talk about antimatter, which is the critical aspect of famflows.

... or a decantation

For now we have discussed about exchanges, that is movements of matters (or any other material) from one stock to another by means of an exchange with an external actor.

The exchange, in famflows, is simply the act that allows us to transform something in something else. Nothing magic: we all do it everyday. We exchange time for money (we work for somebody and we receive money). We exchange money for something else (food, energy, shelter, entertainement).

But, sometimes, we want to move things without an external actor. As in famflows the only way to transform things is with an exchange (and an exchange is, by design, composed of two different materials — one enters and one exits —), it is obvious that this movement, which we call decantation, without an external actor is composed of the same material which is "decanted" (like wine) from one stock to another of the same material.

For example: we can have money in pocket and in the bank. These are two stocks of the same material. When we withdraw money from bank we are simply transferring money from one stock to another... in theory there is an external actor (the bank) that gives us the money, but in practice it is like an "internal" movement between two stocks we own.

This is true also if the withdrawal is not free. For example, if we are abroad, there is usually a small fee to withdraw cash. Let us assume that it is 2%.

For example we withdraw 100 $ with 2 $ fee from our bank (or credit card) account (stock).

In double entry accounting we will have:

Asset:Pocket mone    | Credit    | Debit       	| Total
Withdraw             | 100       | 0            | 100

Asset:Bank account   | Credit    | Debit       	| Total
...    	       	     | 	       	 |     	       	| n
withdraw       	     | 0       	 | 102 	       	| (n)-102

Expenses:bank fee    | Credit    | Debit        | Total
withdraw       	     | 2       	 | 0            | 2

As you see we have a transaction splitted in three parts. The bank account is diminished by 102 $ but our pocket money has only got 100, because the bank has wanted a price for this decantation.

In famflows we can render this same movement with an exchange and a decantation. The exchange is with the bank: we give to the bank 2 $ and it gives us the possibility to decant 100 $ from our account to our pocket.

Actor         | quantity in    | quantity out |	Stock in     | Stock out
bank          | 1 decantation  | 2 $          |	decantations | bank stock

Decantation   | from           | to           | quantity decanted
       	      |	bank stock     | my pocket    | 100$

In this example we see that by means of the first exchange we have "bought" the right to make the following decantation. It is like we are storing our money in a cellar owned by the bank and we pay the bank every time we ask the bank the key to this cellar (in a certain sense this is really what's happening).

The "antimatter" in famflows (an exchange with nothing)

Sometimes we give something without anything else in exchange. Or, sometimes, we receive something without paying or giving anything else. For example we receive a presents from a friend, or maybe we find a 10$ note, or we win a lottery. Negative examples are instead: we lend a book which does not return or a thief robs us.

In all these examples there seems to be a unique flow that enters or exits our home. If we lend a book to a friend a book exits and nothing enters. A careful analysis of this exchange, however, shows us that, in reality, something is entering our house: the promise to re-have this book after some time.

So we are exchanging with our friend (the actor) a real book with a promise of a book. In this example the promise is to re-have the same book in the future, but we could also exchange the book with a promise of another book. The important fact is that we are exchanging a "real" present thing with a delayed thing of the same type. In famflows a delayed thing is called antimatter. The name is only evocative, there is not rocket science here...

An anti-book is a simply a book which is not here, a promise of a book. The same thing happens with money. 100 anti-euro are simply a promise to have 100 Euro. A credit in double entry accounting terms.

Antimatter can be created from nothing and can only be exchanged with an actor in equal amounts and material.

Now I list the previous examples and I translate them in matter/antimatter exchange language:

We receive a present from a friend

We receive a real present from a friend and we give to him a promise of a present in the future, we give an anti-present (in this case we see that the exchange is of the same matter, but the present in the future could be different... of course we don't return the same present to the same friend!).

We find a 10$ note walking in the street

What's the actor, first of all? The actor can be "God, Destiny, the Chaos", you name it... it is simply fortune. So, we are exchanging with Fortune. She gives us 10$ and we give to her 10 anti-$, that is a promise of 10$ in the future (shall we fulfill this promise? we will talk about that later).

A thief steals us a picture

The actor is the thief. This is a forced exchange, but in famflows it is treated in the same way. We are giving to him a picture and he gives to us a promise to rehave this picture in the future.

Of course, not all promises are fulfilled, in the case of the thief the probability of this fullfillment is rather low... what can we do?

Remember: anti matter in famflows is a promise to have something in the future. A promise is like a credit in accounting. If we give antimatter we are simply promising to give those things back, we are raising our debts. If we receive antimatter (voluntarly or forced) we are simply receiving credits from other actors... credits that someday we could claim in exchange for something real.

If an actor does not (or cannot) fulfill this promise we are simply loosing credit.

It is like the anti-matter is evaporating... if we have an anti-book, because we have lent a real book to a friend, this anti-book, slowly, evaporates into oblivion...

...after some weeks, months, etc... this friend will not remember to regive to us the book, if we don't claim it soon, it will be lost forever, like a thief (even if, probably, this friend had not the intention of stealing us a book... it is simply the fact that times cancels everything, expecially promises).

1. But there is antimatter... but let's not complicate things now.

Get Family Flows at Fast, secure and Free Open Source software downloads