Dan,
OK, thanks. But just some clarification.
If I look at the following simple Transaction:
2000-01-02 * "Buying something in Euro"
Assets:NL:ING:Payment -100 EUR
Expenses:Misc 100 EUR
Then does it have position or not?
In Python after loading in beancount it looks like this
Transaction(meta={'filename': 'C:\\_code\\py\\mybean\\experiments\\simpleSimulation\\simpleSimulation.bean',
'lineno': 30,
'__tolerances__': {}},
date=datetime.date(2000, 1, 2),
flag='*',
payee=None,
narration='Buying something in Euro',
tags=frozenset(),
links=frozenset(),
postings=[Posting( account='Assets:NL:ING:Payment',
units=-100 EUR,
cost=None,
price=None,
flag=None,
meta={ 'filename': 'C:\\_code\\py\\mybean\\experiments\\simpleSimulation\\simpleSimulation.bean',
'lineno': 31}),
Posting( account='Expenses:Misc',
units=100 EUR,
cost=None,
price=None,
flag=None,
meta={ 'filename': 'C:\\_code\\py\\mybean\\experiments\\simpleSimulation\\simpleSimulation.bean',
'lineno': 32})])
I can see tarnsaction, postings, units, but I do not see a position
However if I use beanquery, then beanquery does see the position:
beancount> select date, narration, position
date account narration position
---------- ----------------------- --------------------------------------- ------------
2000-01-02 Assets:NL:ING:Payment Buying something in Euro -100 EUR
2000-01-02 Expenses:Misc Buying something in Euro 100 EUR
So, the position here is
100 EUR, however in Python data structure, it does not have a cost, which is, per your definition, is not a position.
So, once again, what is the definition of a position then?