On Fri, Jun 27, 2014 at 5:36 PM, Jostein Berntsen <[email protected]>
wrote:

> On 24.06.14,22:08, Rick F wrote:
> > "Allowing the cost to show up in
> >
> >   both places would break the accounting equation; this transaction must
> balance."
> >
> >
> > So I've been thinking about this and I think that is the fundamental
> problem.  Technically, commission (at least in the U.S.) isn't an expense,
> it's an asset.  It sounds strange, but think about it.  In the U.S., the
> commission counts toward the cost basis and the cost basis is recorded with
> the asset.  It's the whole depreciate vs. expense issue in accounting.
> >
> >
> > I'm not sure how, but I think the solution is somewhere down that road.
>  Maybe creating a fake asset that is the commission per share, maybe a
> sub-asset.
> >
> >
> > The thing is, this isn't a new problem.  This isn't a ledger problem so
> much as an accounting problem.  Accountants (in the U.S. at least) already
> have to deal with this situation.  Does anyone know how accountants deal
> with this currently?
> >
> >
> > Rick
> >
> >
> > On Saturday, June 14, 2014 10:50:32 AM UTC-7, Martin Blais wrote:
> > >
>
> Would this then be the best way to calculate it?
>

Nope.
(Explanations below.)


; Initial openings at 2014/01/012014-01-01 Opening Balance
>   Assets:Bank:Check Account                      5000,00 €
>   Equity:Opening Balance
>
>
> ; Details of shares at 2014/01/01
> ;P 2014-01-01 00:00:00   ShareA 20 €
> ;P 2014-01-01 00:00:00   ShareB 100 €
> 2014-01-01 Details for shares
>   Equity:Opening Balance:Initial Investments
>   Assets:Investments:Stocks:ShareA    15 ShareA @ 20 €
>   Assets:Investments:Stocks:ShareB    5 ShareB @ 100 €
>

That's correct, if you're just starting your Ledger.
Thereafter, instead of an Equity account you'd be using a cash account and
likely there would be a commissions account.




>
> ; Details of shares at 2014/04/01
> P 2014-04-01 00:00:00   ShareA 30 €
> P 2014-04-01 00:00:00   ShareB 120 €
>
> ; Selling 2 ShareB at 2014/04/01
> 2014-04-01 Selling 2 ShareB
>         Assets:Investments:Stocks:ShareB                   -2 ShareB @ 100
> €
>         Assets:Commission            -9,90 €
>         Assets:Cash                        2 ShareB @ 120 €
>      Income:Investment Gains
>

Why are you depositing "2 ShareB" in a Cash account?
A cash account can only contain cash.

You sell 2 ShareB at the 100 EUR lot, so that should be using the lot
disambiguation "{}" syntax, not the price "@" syntax. You're selling two of
the 100 EUR lots that you have in the account:


>         Assets:Investments:Stocks:ShareB                   -2 ShareB {100
> €}
>

The commission is incorrect too, a commission is an expense, not an asset
and should be positive:


>         Expenses:Commission            9,90 €
>

Assets are things you have. You can't resell your commissions; it makes no
sense. A commission is clearly an expense.

Then you credit the account with the corresponding amount of cash, that is
2 x 120 = 240 - 9.90 = 230.10 EUR

        Assets:Cash                        230.10 €
>

That amount would be given to you by your import process or by you looking
at your account statement (if you do it manually). You probably should not
compute this yourself, it's best to use the actual amount reported from the
statement from the institution--that's the real amount, and doing this
provides a check on your data entry.

The legs above sum to: (-2) x 100 + 9.90 + 230.10 = 40 EUR, so in order to
balance, the remaining gains leg should be:


>      Income:Investment Gains      -40 €


You can, of course, leave the amount off of this one and Ledger/Beancount
will compute it automatically.

This does not capitalize the commissions.
I already outlined a method to achieve this and a proposal to extend
Beancount and Ledger's semantics to be able do that in
https://docs.google.com/document/d/1F8IJ_7fMHZ75XFPocMokLxVZczAhrBRBVN9uMhQFCZ4/edit#heading=h.axc1rmv8ctni

In the meantime, in Ledger, you could probably hack a non-balancing
transaction using virtual postings. Beancount does not support virtual
postings, so if you really insist on the PnL without commissions you would
have to enter the adjusted amounts manually (as in the doc) or just live
with the PnL excluding commissions until the proposal is implemented.



; Details of shares at 2014/05/02
> P 2014-05-01 00:00:00   ShareA 70 €
> P 2014-05-01 00:00:00   ShareB 120 €
>
> Selling 2 ShareA at 2014/05/01
> 2014-04-02 Selling 4 ShareA
>     Assets:Investments:Stocks:ShareA     -4 ShareA @ 20 €
>     Assets:Commission                   -9,90 €
>     Assets:Cash                           2 ShareA @ 120 €
>      Income:Investment Gains
>

This is wrong here too, it should be like this, follow the same
prescriptions as above:

2014-05-01 Selling 4 ShareA
>     Assets:Investments:Stocks:ShareA     -4 ShareA {20 €}
>     Expenses:Commission                   9,90 €
>     Assets:Cash                           270.10 €
>      Income:Investment Gains
>

... and the gains would be: 270.10 + 9.90 + (-4) x 20 = -200 EUR

Read my doc, all the detail is already there. I made an effort to write it
in simple terms that anyone could understand and took time to write this
long discussion of P/L. If you don't understand a section, please highlight
it and add a comment.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to