Re: Building on FreeBSD 10.0

2014-06-25 Thread Jostein Berntsen


On Tuesday, June 24, 2014 9:12:29 PM UTC+2, Chris Leyon wrote:

 Jostein, 

 Thank you for suggestion.  I tried the new add_definitions line as you 
 indicated but there was no change - the same errors occur as before. 

 Chris 



  
Is there a boost package included with FreeBSD or in their repositories? 
Can you try to reinstall this? Ref. to this error from your installation:

-- Performing Test BOOST_REGEX_UNICODE_RUNS - Failed 

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: Building on FreeBSD 10.0

2014-06-25 Thread thierry
On Wednesday, June 25, 2014 8:24:42 AM UTC+2, Jostein Berntsen wrote:


 -- Performing Test BOOST_REGEX_UNICODE_RUNS - Failed 


 This error can be seen on Debian too, and it does not prevent to build 
successfully. I personally now ignore it.

-- 

--- 
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-25 Thread Martin Blais
On Wed, Jun 25, 2014 at 1:08 AM, 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.

 Commission is definitely not an asset.
I think I see what you mean though, and I think what you mean is this
(please correct me if I'm wrong):

  2014-06-25 * Buying into a position
Assets:Investments:Cash  -1009.95 USD
Assets:Investments:Stock  10 STOCK {100 USD}
Expenses:Commissions   9.95 USD

  2014-06-25 * Cost basis adjustment for commission
Assets:Investments:Stock  -10 STOCK {100 USD}
Assets:Investments:Stock   10 STOCK {100.995 USD}
Income:Investments:Rebates  -9.95 USD

Now, the way that I carried out the cost basis adjustment above looks a bit
inconvenient: remove all shares and replace them by new ones at the
adjusted cost. This is because it is just what is supported in
Beancount/Ledger right now. In the example above, I use a rebate account
to absorb the cost adjustment: you would _not_ declare this as taxable
income, it's just there for balancing the transaction.

  2014-08-04 * Selling haf of my position
Assets:Investments:Stock  -5 STOCK {100.995 USD}
Assets:Investments:Cash   540.05 USD
Expenses:Commissions 9.95 USD
Income:Investments:Gains  -35.075 USD

On the sale you don't have to make an adjustment, because the shares have
been converted to cash.

Does this make sense?

So, the lesson from your comment is that it might be useful to create a
syntax dedicated to easily make a cost basis adjustment. That syntax should
transform into this (copied from above):

  2014-06-25 * Cost basis adjustment for commission
Assets:Investments:Stock  -10 STOCK {100 USD}
Assets:Investments:Stock   10 STOCK {100.995 USD}
Income:Investments:Rebates  -9.95 USD

The same syntax could be used to make other types of cost basis adjustments.

I'll be updating my proposal with this comment:
https://docs.google.com/document/d/1F8IJ_7fMHZ75XFPocMokLxVZczAhrBRBVN9uMhQFCZ4/



 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 solution you're implying is to make a cost-basis adjustment.


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'm curious now... did anyone ever check how GnuCash or QuickBooks deals
with it?





Rick


 On Saturday, June 14, 2014 10:50:32 AM UTC-7, Martin Blais wrote:

 On Fri, Jun 13, 2014 at 9:57 AM, Martin Blais bl...@furius.ca wrote:

 On Fri, Jun 13, 2014 at 9:01 AM, Rick F ri...@farnbach.com wrote:

 The method used in the cookbook, is not correct.


 That's not exactly true: it's correct if your definition of capital gain
 does not take into account commissions. I used the definition that excludes
 capital gains in order to keep things simple (the level of discussion I
 chose in that doc is that congruent with trying to explain P/L clearly,
 intro level). Whether you should be able to exclude commissions or not from
 your gains is a matter tax law, and it depends on your own situation.

 Thanks for bringing up the topic, though, I admit I did forget to
 explain it. I'll add a separate section about commissions. I'm well aware
 of this.

 At the moment, I simply subtract the commissions from the gains for
 reporting. The gains and commissions get counted in separate accounts
 (which is mostly fine, except for the prorating detail you bring up below).
 You can subtract the total commissions from total gain for a good
 approximation of gains-without-commissions. Most of my trading accounts
 already provide a suitable 1099 so I use my own accounting on these
 accounts for tax planning and cross-checking against their calculations,
 and I use the 1099 forms for tax reporting.



 The cookbook uses the example of buying 10 shares of IBM at $160 and
 then selling those shares at $170.  Without commissions, that would amount
 to a realized gain of $100, $1700 (the sales price) - $1600 (the cost
 basis).  With commissions, however, the reportable gain is really $1700
 (the sales price) - $9.95 (commission on the sale) - $1600 (basis) -
 $9.95 (commission on purchase) = $80.10.  The method in the cookbook
 only accounts for the sale commission when figuring the capital gain.


 Actually, that's incorrect, the 

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

2014-06-25 Thread Martin Blais
On Wed, Jun 25, 2014 at 11:14 AM, Martin Blais bl...@furius.ca wrote:

 On Wed, Jun 25, 2014 at 1:08 AM, 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.

 Commission is definitely not an asset.
 I think I see what you mean though, and I think what you mean is this
 (please correct me if I'm wrong):

   2014-06-25 * Buying into a position
 Assets:Investments:Cash  -1009.95 USD
 Assets:Investments:Stock  10 STOCK {100 USD}
 Expenses:Commissions   9.95 USD

   2014-06-25 * Cost basis adjustment for commission
 Assets:Investments:Stock  -10 STOCK {100 USD}
 Assets:Investments:Stock   10 STOCK {100.995 USD}
 Income:Investments:Rebates  -9.95 USD

 Now, the way that I carried out the cost basis adjustment above looks a
 bit inconvenient: remove all shares and replace them by new ones at the
 adjusted cost. This is because it is just what is supported in
 Beancount/Ledger right now. In the example above, I use a rebate account
 to absorb the cost adjustment: you would _not_ declare this as taxable
 income, it's just there for balancing the transaction.

   2014-08-04 * Selling haf of my position
 Assets:Investments:Stock  -5 STOCK {100.995 USD}
 Assets:Investments:Cash   540.05 USD
 Expenses:Commissions 9.95 USD
 Income:Investments:Gains  -35.075 USD

 On the sale you don't have to make an adjustment, because the shares have
 been converted to cash.


Actually, I screwed up a bit in the sell example above, sorry about that.
You would _also_ have to make an adjustment to the sale side, but you would
adjust the gains there. Like this (tested, this time):

2014-01-01 open Assets:Investments:Cash
2014-01-01 open Assets:Investments:Stock
2014-01-01 open Expenses:Commissions
2014-01-01 open Income:Investments:Rebates
2014-01-01 open Income:Investments:Gains

2014-06-25 * Buying into a position
  Assets:Investments:Cash   -1009.95 USD
  Assets:Investments:Stock10 STOCK {100 USD}
  Expenses:Commissions  9.95 USD

2014-06-25 * Cost basis adjustment for commission
  Assets:Investments:Stock   -10 STOCK {100 USD}
  Assets:Investments:Stock10 STOCK {100.995 USD}
  Income:Investments:Rebates   -9.95 USD


2014-08-04 * Selling half of my position
  Assets:Investments:Stock-5 STOCK {100.995 USD}
  Assets:Investments:Cash 540.05 USD
  Expenses:Commissions  9.95 USD
  Income:Investments:Gains

2014-08-04 * Cost basis adjustment for commission
  Income:Investments:Rebates   -9.95 USD
  Income:Investments:Gains


Resulting trial balance from Beancount:

|-- Assets
|   `-- Investments
|   |-- Cash -469.90 USD
|   `-- Stock 504.98 USD
|-- Expenses
|   `-- Commissions19.90 USD
`-- Income
`-- Investments
|-- Gains -35.08 USD
`-- Rebates   -19.90 USD


The method I suggest in the document just does the adjustment transaction
in the same transaction as the sale.
They're equivalent.

What I like about your suggestion is the idea of making cost basis
adjustments simpler.
Maybe something like this could be implemented eventually:

2014-06-25 * Cost basis adjustment for commission
  Assets:Investments:Stock10 STOCK {100 USD - 100.995 USD}
  Income:Investments:Rebates   -9.95 USD

Or even better, without having to specify the merged amount!

2014-06-25 * Cost basis adjustment for commission
  Assets:Investments:Stock   -10 STOCK {100 USD}   ; disambiguate
  Assets:Investments:Stock10 STOCK {}  ; let system auto-fill
  Income:Investments:Rebates   -9.95 USD

-- 

--- 
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.