Re: How to record and keep track of stock share ?

2014-06-27 Thread Bruce Schultz
On 25 June 2014 3:08:19 PM AEST, Rick F r...@farnbach.com 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?

I found this the other day. It details the flows between various accounts in a 
wide range of situations.

http://timriley.net/appahost/accountancy_model.pdf

I found it helpful so far in getting my head around fund accounting. Hopefully, 
others can get some value from it too.

Bruce


-- 
:B

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to record and keep track of stock share ?

2014-06-27 Thread Rick Farnbach
Great find. Breaks all financial transactions into a series of templates to be 
followed. I'll definitely use that book as a reference going forward. 

In regards to the current conversation, here's the relevant quote. 
Stock Cost = (Shares Purchased × Price Per Share) + Commissions + Other 
Transaction Fees

 Notice that the commission is capitalized, not expensed. That's clearly where 
we have been going wrong. 

Rick


Sent from my iPhone

 On Jun 27, 2014, at 7:25 AM, Bruce Schultz brul...@gmail.com wrote:
 
 On 25 June 2014 3:08:19 PM AEST, Rick F r...@farnbach.com 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?
 
 I found this the other day. It details the flows between various accounts in 
 a wide range of situations.
 
 http://timriley.net/appahost/accountancy_model.pdf
 
 I found it helpful so far in getting my head around fund accounting. 
 Hopefully, others can get some value from it too.
 
 Bruce
 
 
 -- 
 :B

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to record and keep track of stock share ?

2014-06-27 Thread Jostein Berntsen
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?

; 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:ShareA15 ShareA @ 20 €
  Assets:Investments:Stocks:ShareB5 ShareB @ 100 €

; 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:Cash2 ShareB @ 120 € 
 Income:Investment Gains

; 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  


Jostein


-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to record and keep track of stock share ?

2014-06-27 Thread Martin Blais
On Fri, Jun 27, 2014 at 4:00 PM, Rick Farnbach r...@farnbach.com wrote:

 Great find. Breaks all financial transactions into a series of templates
 to be followed. I'll definitely use that book as a reference going forward.

 In regards to the current conversation, here's the relevant quote.

 Stock Cost = (Shares Purchased × Price Per Share) + Commissions + Other
 Transaction Fees

  Notice that the commission is capitalized, not expensed. That's clearly
 where we have been going wrong.

There's no right or wrong, right is how you choose to look at it. Usually
you want to look at it the same way the tax man does, but you may also want
to be able to look at your PnL separately from its trading costs. Pulling
it out of a book doesn't legitimize it one way or another.

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to record and keep track of stock share ?

2014-06-27 Thread Martin Blais
On Fri, Jun 27, 2014 at 5:36 PM, Jostein Berntsen jber...@broadpark.no
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:ShareA15 ShareA @ 20 €
   Assets:Investments:Stocks:ShareB5 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:Cash2 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:Commission9,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:Cash230.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