Re: Accounting for bond call/redemption

2023-04-28 Thread JPP
Why wouldn't a call count as a capital loss?  I also like the approach of 
splitting the purchase into two transactions, but I might make the premium 
another asset instead of an expense.

2018/03/01 * Buy some Foo bonds at a 5% premium 
Assets:Bonds  10,000 Foo @ $1.00
Assets:Bond-Premium   10,000 Foo @ $0.05
Assets:Cash   $-10,500 

Then depending on your local tax rules, you could reduce the bond premium 
asset either by amortizing/expensing it each year over the life of the 
bond, or book it as a loss all at once in the case of a sale or a call.


On Thursday, April 27, 2023 at 9:43:58 PM UTC-4 psionl0 wrote:

> I would probably record the transactions as follows:
>
> 2018/03/01 * Buy some Foo bonds at a 5% premium 
> Assets:Bonds   10,000 Foo @ $1.00
> Expenses:Premium   10,000 Foo @ $0.05
> Assets:Cash$-10,500 
>
> and later
>
> 2023/02/15 * Sell Foo bonds 
> Assets:Cash $10,000 
> Income:Bond Sales   -10,000 Foo  @ $1.00 
> Assets:Bonds-10,000 Foo  @ $1.00
> Expenses:Cost of Bonds Sold  10,000 Foo  @ $1.00
>
> The premium has been taken care of when you first bought the bonds and 
> does not need to be dealt with again.
>
> If you sell the bonds at a different price then that is automatically 
> taken care of by recording the selling price of the bonds.
>
> Your capital gain will be the bond sales less the cost of bonds sold less 
> the premium on the bonds bought.
> On Thursday, April 27, 2023 at 9:29:17 PM UTC+8 Richard M Kreuter wrote:
>
>> Hi all, 
>>
>> I've had no luck finding detailed discussion or examples of how to 
>> account for bonds (and perhaps other similar commodities) in Ledger. 
>>
>> Suppose you buy a bond, Foo, at a 5% premium (i.e., 1.05 times par), and 
>> you want to represent the premium in the lot price for Ledger's 
>> reporting purposes. So you write it down as, say, 
>>
>> # Let's ignore any transaction fees/commissions/costs. 
>> 2018/03/01 * Buy some Foo bonds at a 5% premium 
>> Assets:Brokerage 10,000 Foo @ $1.05 
>> Assets:Cash $-10,500 
>>
>> I believe that if you should sell those bonds later, you might record 
>> that as 
>>
>> 2023/02/15 * Sell Foo bonds 
>> Assets:Cash $10,000 
>> Assets:Brokerage -10,000 Foo {$1.05} [2018/03/01] @ $1.00 
>> Income:Capital Losses $500 
>>
>> However, suppose that instead of selling, the bond is ultimately called 
>> or redeemed (i.e., the issuer returns to you the par value, 
>> $10,000). How should you record that in the journal in order for the 
>> redemption transaction (a) to balance and (b) to leave you with zero 
>> units of the lot you originally purchased? It seems as if one way to do 
>> it is this: 
>>
>> 2023/02/15 * Redemption for Foo 
>> Assets:Cash $10,000 
>> X $500 
>> Assets:Brokerage -10,000 Foo {$1.05} [2018/03/01] @ $1.00 
>>
>> but that leaves me with the question of what sort of account X should 
>> be, i.e., how to record where the $500 went. (I believe that the $500 is 
>> not a Capital Loss, but I might be mistaken.) 
>>
>> Alternatively, I suppose it would be possible to log a separate posting 
>> representing the premium at the time of purchase, i.e., have the Buy and 
>> Redemption transactions look like this, 
>>
>> 2018/03/01 * Buy some Foo 
>> Assets:Brokerage 10,000 Foo @ $1.00 
>> Y $500 
>> Assets:Cash $-10,500 
>>
>> 2023/02/15 * Redemption for Foo 
>> Assets:Cash $10,000 
>> Assets:Brokerage -10,000 Foo {$1.00} [2018/03/01] @ $1.00 
>>
>> but in this case I still don't know what sort of account Y should be; 
>> and using $1.00 for Foo's lot price at purchase time would tend to 
>> squander Ledger's ability to compute capital gains / losses. 
>>
>> Any insights/recommendations? 
>>
>> Thanks in advance, 
>> Richard 
>>
>

-- 

--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/9c3dd41b-8b7e-43c2-b1dd-c21a1fec1a38n%40googlegroups.com.


Ledger mode source code

2023-04-04 Thread JPP
Is there a way to install the emacs Ledger mode outside of installation 
from source?

I am using Windows 10 and Emacs 27.1  I was unable to build Ledger from 
source, so I downloaded the binary for version 3.1.3 instead.  The ledger 
mode manual says that the Emacs source code is included with the source 
distribution of ledger, but since I didn't build it from source, I don't 
have access to Ledger mode.  Does the emacs lisp code exist somewhere 
separate where I can install it?  I looked through the Github page but 
didn't see any lisp files.

Thank you in advance for any help.

-- 

--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/62d727e8-6ec3-41f2-88d1-ee80846137a2n%40googlegroups.com.


Negate a string in a report-query with PRINT

2020-02-12 Thread JPP
I was hoping someone could advise me on a problem.  I have two ledger files 
where there is some overlap in one particular account.  I would like to 
combine the two files - without the overlap - and sort the entries by 
date.  It seems that PRINT would be ideal for this, since I can append the 
first file to the second and then sort by date when printing.  But I am 
having trouble with eliminating the overlap.  What I would like to do is 
eliminate the redundant account in the first file before I append it to the 
second, but when I try to PRINT with a negating regex, it doesn't work.  So 
when I type:

ledger print not "Account:Redundant" > new_file

It sill has "Account:Redundant" entries in new_file.

How do I use PRINT while negating a string?  Thanks in advance for any 
advice.

-- 

--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/22be1400-ec02-4f69-b01f-66f3af913d27%40googlegroups.com.