Currencies, Shares, etc.
Currencies and shares are special commodities which have value without unit of measurement.
Examples of currencies and shares are: EUR, USD, NOKIA, etc. Currencies and shares could be used as plain values without quantity unit.
Currency and share name has to be a valid ID
element (same rules applies as with account names).
Examples of valid names are €
, $
, ¥
, ACME·INC
, EUR
, etc. See
Character Sets for full list of all supported signs, scripts and languages.
Transactions with mixed currencies or shares
Transactions with mixed currencies without value positions are not allowed.
Example of mixed currency transaction without value positions:
2017-05-01 'this is not valid Expences:Ice·Cream 500 NOK Assets:Cash -200 SEK Assets:Cash -32.47 EUR
Mixed currencies and shares must be converted to common base with value positions:
2017-05-01 'this is valid txn with NOK, SEK and EUR Expences:Ice·Cream 500 NOK @ 0.1065 EUR Assets:Cash -200 SEK @ 0.1039 EUR Assets:Cash -32.47 EUR
Positions
Positions are additional information for postings. Positions attach value information to otherwise plain currency, share, etc. posting.
Position tells valuation of that posting at the time of transaction.
Value (Closing) position
When you exchange currency, close stock position or define value to commodity, you can provide value (closing) position to the posting.
Closing position can be provided either with Unit Price @
or with Total Price =
.
For example following purchases are made in foreign currencies, which are later converted to EUR.
2017-04-01 'Ice cream in Sweden with Credit Card expenses 200 SEK l:credit·card 2017-04-01 'Ice cream in Norway with Credit Card expenses 500 NOK l:credit·card 2017-04-01 'SEK/EUR exchange transaction by CC-company with Unit Price '@' ; Unit Price with '@' l:Credit·Card 200 SEK @ 0.1039 EUR l:Credit·Card -20.78 EUR 2017-04-01 'NOK/EUR exchange transaction by CC-company with Total Price '=' ; Total Price with '=' l:credit·card 500 NOK = 53.25 EUR l:credit·card -53.25 EUR
If you know used exchange ratio, you can record that in single transaction:
2017-04-01 'Ice cream in Sweden with Credit Card expenses 200 SEK = 20.78 EUR l:credit·card 2017-04-01 'Ice cream in Norway with Credit Card expenses 500 NOK l:credit·card -53.25 EUR = -500 NOK
Opening position
You can record opening positions with transaction data, but those are not processed at the moment. This is planned enhancement, see Profit and Loss (PnL) tracking below.
2017-01-01 Assets:Shares 1 ACME {120 EUR} Assets:Cash
Profit and Loss (PnL)
Profit and Loss (PnL) tracking is not currently implemented. You can record opening position with closing position for future profit and loss calculation.
2017-01-01 Assets:Shares 1 ACME {120 EUR} @ 123 EUR Assets:Cash