packages feed

penny-bin-0.6.0.0: man/penny-commodities.7

.TH penny-commodities 7

.SH NAME
penny-commodities - tracking multiple commodities with Penny

.SH INTRODUCTION

Using
.B penny
is easy if you only want to track one commodity--most likely your home
country's currency. Things get a little more complicated if you want
to track more than one commodity, such as stocks, bonds, real estate,
or depreciable assets like vehicles. You probably want to keep track
of how much the commodity cost and the ultimate capital gain or loss.

This man page will tell you how to make entries in your ledger file
for commodity purchases, and how you can use
.B penny
to gather the information you need. You will also want to examine the
.I stocks.pny
file, which is in the
.I examples
directory of the
.I penny-bin
tarball. It contains many examples.

.SH ALL TRANSACTIONS MUST BE BALANCED

This means that the sum of all debits of a given commodity must equal
the sum of all credits of the same commodity. So, what if you want to
buy a commodity, like a stock? You could not record a transaction like
the following one, because it is not balanced:

.EX
# 2012-01-01 Purchase stock
#     Assets:Brokerage             < 100 LUV
#     Assets:Checking              > $1000.00
.EE

The transaction above is not balanced. Penny will never allow you to
create unbalanced transactions. Here is how I recommend solving this
problem:

.EX
2012-01-01 Purchase stock
    Assets:Brokerage       < 100 LUV
    Assets:Checking        > $1000.00
    Basis:LUV:2012-01-01   > 100 LUV
    Basis:LUV:2012-01-01   < $1000.00
.EE

This transaction is balanced. You will also find it helpful to record
a price:

.EX
@ 2012-01-01 LUV $10.00
.EE

This tells
.B penny
that on that date, one share of LUV was worth $10.00.
.B penny
will only know this if you tell it so; it will not infer this
information from the transactions you enter. Currently prices are only
used by the
.I convert
report, as we will see shortly.

.SH GAINS AND LOSSES BEFORE SALE

You have bought shares of YHOO at various times and you have entered
prices for them in your ledger file:

.EX
2012-09-17 Buy stock
    Assets:Brokerage           < 100 YHOO
    Basis:YHOO:2012-09-17      > 100 YHOO
    Assets:Checking            > $1568.00
    Basis:YHOO:2012-09-17      < $1568.00

@ 2012-09-17 YHOO $15.68

2012-11-16 Buy stock
    Assets:Brokerage           < 100 YHOO
    Basis:YHOO:2012-11-16      > 100 YHOO
    Assets:Checking            > $1786.00
    Basis:YHOO:2012-11-16      < $1786.00

@ 2012-11-16 YHOO $17.86

2012-12-18 Buy stock
    Assets:Brokerage           < 100 YHOO
    Basis:YHOO:2012-12-18      > 100 YHOO
    Assets:Checking            > $1982.00
    Basis:YHOO:2012-12-18      < $1982.00

@ 2012-12-18 YHOO $19.82

@ 2012-12-20 YHOO $19.69
.EE

You want to see how your investment is doing. Run the following
command:

.EX
penny -a Basis:YHOO convert stocks.pny
.EE

This shows you the current gain or loss on each purchase
transaction. A credit indicates that your investment has gained value;
a debit indicates a loss in value.

.SH GAINS AND LOSSES AFTER SALE

When you sell your commodity, record debits and credits agains the same
.I Basis
account that you used when purchasing the commodity.

.EX
2012-01-03 Buy stock
    Assets:Brokerage          < 100 UNP
    Assets:Checking           > $10800.00
    Basis:UNP:2012-01-03      > 100 UNP
    Basis:UNP:2012-01-03      < $10800.00

2012-12-28 Sell stock
    Assets:Brokerage          > 100 UNP
    Assets:Checking           < $12354.00
    Basis:UNP:2012-01-03      < 100 UNP
    Basis:UNP:2012-01-03      > $12354.00
.EE

Then you can see the profit or loss on the sale by using the
.I balance
report:

.EX
penny -a Basis:UNP bal stocks.pny
.EE

This shows a credit balance, indicating a capital gain.

Alternatively, if you don't want to figure out which
.I Basis
account to use when selling your commodity, simply use a
.I Proceeds
account, and then let
.BR penny-selloff (1)
calculate the gain or loss for you:

.EX
2012-01-03 Buy stock
    Assets:Brokerage          < 100 C
    Assets:Checking           > $3072.00
    Basis:C:2012-01-03        > 100 C
    Basis:C:2012-01-03        < $3072.00

2012-12-03 Sell stock
    Assets:Brokerage          > 100 C
    Assets:Checking           < $3901.00
    Proceeds:C:2012-12-03     < 100 C
    Proceeds:C:2012-12-03     > $3901.00
.EE

And then run
.BR penny-selloff :

.EX
penny-selloff Proceeds:C:2012-12-03 stocks.pny
.EE

It will create a transaction for you which will show you the total
capital gain or loss.

.SH TRACKING CAPITAL ASSETS

You could also use Penny to track a capital asset such as your
home. This example will get you started:

.EX
2012-12-31 Buy a house
    {Assets:Real Estate}        < HouseA 1
    Liabilities:Mortgage        > $ 80000.00
    Assets:Savings              > $ 20000.00
        'Down payment
    Basis:House1:2012-12-31     > HouseA 1
    Basis:House1:2012-12-31     < $ 100000.00

@ 2012-12-31 HouseA $100000.00
.EE

.SH BUGS
Report any bugs in the programs or documentation to
.MT omari@smileystation.com
Omari Norman
.ME

.SH SEE ALSO
.BR penny-suite (1)