forked from beancount/beancount
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
blais
committed
May 26, 2008
1 parent
37bc766
commit f5e3874
Showing
8 changed files
with
714 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?xml version="1.0" encoding="iso-8859-1" ?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> | ||
<title>Notes on Capital Gains</title> | ||
<link rel="stylesheet" href="../style.css" type="text/css" /> | ||
</head> | ||
<body> | ||
|
||
<div id="project-header"> | ||
<a href="/"><img src="/home/furius-logo-w.png" id="logo"></a> | ||
<div id="project-home"><a href="..">Project Home</a></div> | ||
</div> | ||
|
||
<div class="document" id="notes-on-capital-gains"> | ||
<h1 class="title">Notes on Capital Gains</h1> | ||
|
||
<blockquote> | ||
<p>From "Filippo Tampieri" <<a class="reference" href="mailto:filippo.tampieri@gmail.com">filippo.tampieri@gmail.com</a>> | ||
To "Martin Blais" <<a class="reference" href="mailto:blais@furius.ca">blais@furius.ca</a>> | ||
Cc "John Wiegley" <<a class="reference" href="mailto:johnw@newartisans.com">johnw@newartisans.com</a>> [Add] | ||
Subject Re: Here is one valid way to book capital gains Show full header | ||
Use #1. | ||
Also, you have to use the "average" purchased price for the asset. In other words, if you bought 100 AAPL at USD40/share, then bought another 100 AAPL at USD60/share, and finally sold 50 AAPL at USD70/share, you do not get to choose which lot you are selling from; instead, you have to think of having 200 AAPL at USD50/share; that's your cost basis; so when you sell the 50 AAPL at USD70/share, you are making USD20 a share (and are left with 150 AAPL at USD50/share). | ||
I actually prefer to think in terms of total costs. It is easier to understand, easier to program, and easier to account for commission costs. | ||
So, the example becomes: you bought 100 AAPL at USD4,000, then you bought another 100 AAPL at USD6,000, and finally sold 50 AAPL at USD3,500. Just before the sale, you had 200 AAPL at USD10,000; after the sale, you are left with 150 AAPL at USD6,500. | ||
Super-simple. | ||
Splits and stock exchanges are also very simple. Say, AAPL now splits 2:1, then I will have 300 AAPL at USD6,500; finally, something happens and they are exchanged for EEPL at 3:2 and I am left with 450 EEPL at USD6,500. See the cost basis never changes. | ||
For tax reporting in a different currency, say CAD, you simply have to replace all USD figures with CAD figures using the exchange rate at the date of the transaction where the USD currency is used (when you buy and when you sell), then you run all the transactions from scratch to update your holdings and realized gains (and you will have your report in the new currency). | ||
My software does all this, but it is extremely simple.</p> | ||
<p>On Fri, Apr 25, 2008 at 1:36 PM, Martin Blais <<a class="reference" href="mailto:blais@furius.ca">blais@furius.ca</a>> wrote:</p> | ||
<blockquote> | ||
<p>Thanks for the clarification.</p> | ||
<p>For calculating the gain, do you</p> | ||
<p>1) convert the cost to CAD, convert the proceeds to CAD, then take the | ||
difference? | ||
(removing the commissions before converting each time)</p> | ||
<p>or</p> | ||
<p>2) calculate the capital gains in foreign currency (e.g. USD), minus the | ||
commission costs, and then convert at the rate when you closed your | ||
position?</p> | ||
<p>On Fri, 25 Apr 2008 13:21:50 -0400, "Filippo Tampieri" | ||
<<a class="reference" href="mailto:filippo.tampieri@gmail.com">filippo.tampieri@gmail.com</a>> said: | ||
> I'll try to be more clear. | ||
> For us living in Canada, the tax reporting currency is CAD. | ||
> The currency of the stock account is the currency used to buy the stock. | ||
> You | ||
> probably have a USD investment account and a CAD investment account. | ||
> So, if you buy AAPL in USD in your USD investment account, you will have | ||
> to | ||
> report realized gains to Canada Revenue in CAD. | ||
> | ||
> | ||
> On Fri, Apr 25, 2008 at 11:50 AM, Martin Blais <<a class="reference" href="mailto:blais@furius.ca">blais@furius.ca</a>> wrote: | ||
> | ||
> > Your description makes it sound like I'll have to take care of all this | ||
> > manually... | ||
> > | ||
> > Which is the reporting currency, and which is the account currency? I'm | ||
> > not sure which is which, the words aren't clear to me. If you buy a | ||
> > foreign stock, do you declare the gains in the stock's native currency, | ||
> > or in converted amount in CAD? | ||
> > | ||
> > | ||
> > | ||
> > | ||
> > On Fri, 25 Apr 2008 11:16:23 -0400, "Filippo Tampieri" | ||
> > <<a class="reference" href="mailto:filippo.tampieri@gmail.com">filippo.tampieri@gmail.com</a>> said: | ||
> > > The compute capital gains from US investments that are taxed in Canada, | ||
> > > you | ||
> > > will need to keep track of the date of each purchase so that you can | ||
> > > correctly compute your releazed gains/losses in the reporting currency | ||
> > > rather than the currency of the account (or transaction). Also, you will | ||
> > > have to provide for the possibility of stock exchanges (i.e. you bought | ||
> > > XXX, | ||
> > > but later that was exchange for YYY - due to a merger, for example - and | ||
> > > finally you sold YYY); this has happened a few times to my investments | ||
> > > over | ||
> > > the last few years. Finally, how do you account for splits? You may have | ||
> > > the | ||
> > > split ratio, but many brokers report splits by simply showing some amount | ||
> > > of | ||
> > > shares going into your accout at no cost (e.g. you have 100 shares of | ||
> > > AAPL; | ||
> > > they split 3:2; your account statement may show 50 shares of AAPL @ $0.00 | ||
> > > going into your account). | ||
> > > | ||
> > > | ||
> > > On Fri, Apr 25, 2008 at 12:17 AM, Martin Blais <<a class="reference" href="mailto:blais@furius.ca">blais@furius.ca</a>> wrote: | ||
> > > | ||
> > > > ... in the absence of "true" tracking of positions and trades. | ||
> > > > This is not tooo bad, all I have to do is find the amounts of the | ||
> > > > commissions at both ends of the trade. | ||
> > > > | ||
> > > > | ||
> > > > | ||
> > > > def test_with_commissions(self): | ||
> > > > | ||
> > > > # Booked capital gains. | ||
> > > > lgr = ledger_str(self.def_accounts + """ | ||
> > > > | ||
> > > > 2008-01-10 * Bought some shares. | ||
> > > > Assets:Broker 10 AAPL @ 120.00 USD | ||
> > > > Expenses:Commissions 9.95 USD | ||
> > > > Assets:Bank -1209.95 USD | ||
> > > > | ||
> > > > 2008-01-11 * Sold some shares. | ||
> > > > Assets:Broker -10 AAPL {120.00 USD} @ 125.00 USD | ||
> > > > Assets:Bank 1240.05 USD ;; actual amount deposited | ||
> > > > (easy to find on statement) | ||
> > > > Expenses:Commissions 9.95 USD ;; actual commission for | ||
> > > > closing the trade | ||
> > > > Income:CapitalGains ;; automatically computed gain | ||
> > > > (from share cost above) | ||
> > > > [Income:CapitalGains] 19.90 USD ;; offset for commissions to | ||
> > > > open and close this trade, manually entered | ||
> > > > [Expenses:Deductible-Costs] ;; an account that track costs | ||
> > > > for closed trades | ||
> > > > | ||
> > > > """, 'booked-gains') | ||
> > > > assert len(lgr.transactions) == 2 | ||
> > > > | ||
> > > > commisions = 2*Decimal('9.95') | ||
> > > > for accname, amount in ( | ||
> > > > ('Assets:Bank', Decimal('50')-commisions), | ||
> > > > ('Expenses:Commissions', commisions), | ||
> > > > ('Income:CapitalGains', -(Decimal('50')-commisions)), | ||
> > > > ): | ||
> > > > assert (lgr.get_account(accname).total == Wallet('USD', | ||
> > > > amount)) | ||
> > > ></p> | ||
</blockquote> | ||
</blockquote> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.