johanley / end-game Goto Github PK
View Code? Open in Web Editor NEWPersonal finance simulator for retired Canadians.
License: Creative Commons Zero v1.0 Universal
Personal finance simulator for retired Canadians.
License: Creative Commons Zero v1.0 Universal
This has to be done yearly. It's important to verify the max number of pages that are fetched. The number keeps increasing each year. So if you don't change it, it will truncate the table.
If the fetch was automated, that would in turn make it easier to provide data specific to provinces, instead of only Canada-wide data.
As usual, the more complex tax considerations are for non-reg accounts.
Link:
https://www.advisor.ca/tax/tax-news/tax-and-etfs-what-you-need-to-know/
In a non-reg account there are 6 buckets for a distribution (and a bucket for foreign-tax-withheld):
distribution cash: interest, foreign income (taxed like interest), dividend, cap gain return-of-capital: reduce the adjusted cost base reinvested: increase the adjusted cost base (cap gain)
Since the adjusted cost base is not applicable to the holdings in a registered account, what happens with such distros in a registered account? Answer: nothing!
Can a single distribution be divided into parts, as in part interest and part dividend? Yes, according to the RBC link below.
When is tax withheld? Only for foreign income? Correct.
ACB = total purchase price (including commissions) + reinvested distributions β return of capital
ETFs are priced like stock. They trade like stock. Whole shares, not fractional. The market price is for almost all purposes the same as the net asset value (NAV).
Sometimes the commish is 0.
Link:
https://www.taxtips.ca/personaltax/investing/taxtreatment/exchange-traded-funds.htm
- return of capital is not taxed (and reduces the ACB) - reinvested cap gain is taxed (and increases the ACB) - the details on the changes in the ACB may be non-obvious - when shares in ETFs are sold, the result is a capital gain or loss. - US ETFs are more complex
A distro can be a combination - part dividend, part interest, part cap gain, for example.
They describe some monkey business with the market price dropping by the amount of a dividend. Is similar to a stock going ex-dividend? Yes, they call it ex-distribution.
Reinvestment can happen for any form of distribution, not just for cap gain.
Reinvestment always increases the ACB, no matter what form it takes.
"When a distribution is reinvested in additional shares/units, itβs still immediately taxable in the exact same way as it would be if you had received cash. But additional care must be taken to ensure that the Adjusted Cost Base (ACB) is calculated correctly."
Link:
https://www.td.com/ca/en/asset-management/documents/investor/pdf/solutions/how_ETFs_are_taxed_en.pdf
Phantom distro = reinvested income / capital gain.
It's unclear to me what exactly happens when I elect to reinvest all distros. What if it's a dividend that's reinvested? Does it only change the ACB? Does nothing else change?
Link:
https://etfsage.com/FAQ.php#fees
PACC, DRIP, and SWP
Link:
https://www.vanguard.ca/en/advisor/products/products-group/etfs/VRIF
See "Annual Distributions". Example of yearly distro buckets.
It's bizarre to me that for distros that only change the ACB, they seem to be a complete non-event in registered accounts, because registered accounts don't track ACB.
bank-debit-credit isn't natural.
Currently the life tables are Canada-wide. The addition of life-tables specific to provinces is simple, just a bit tedious.
I'm not sure if this is worthwhile. It depends in part on the amount of variation between the various jurisdictions.
It might be beneficial to imitate the GisBracketFetcher's implementation.
The current 'sweep' transactions are one way only, investment account to bank.
It should be more flexible, any account to any other account.
For example, if you sell your house, the cash moves from your bank into an investment account.
Example error.
DOB 1962-05-21
OAS start date 2027-05
This is because the code computes the age on the start of the month. The error occurs only if the birthday is on the first of the month.
The same issue occurs for CPP.
On the surface, Lira/Lif are analogous to Rsp/Rif, with the addition of maxima.
BUT, Lira/Lif accounts are subject to provincial legislation, so there's likely a bunch of variations.
I've read that the maxima are linked to market conditions. That means they would need to be updated every year, and that across all provinces. A bit tedious.
Note that the province is the province of former employment, which can differ from the province of residence.
Feds: https://www.osfi-bsif.gc.ca/Eng/pp-rr/faq/Pages/lif-frv.aspx
General: https://ca.rbcwealthmanagement.com/delegate/services/file/3244485/content
I could input the RBC data above as a starting point. But that data changes every year, according to interest rates.
Too much money is coming into the bank account when sweeping cash from the RIF.
The full amount is coming in, instead of being reduced by the withholding tax.
Supporting more kinds of assets is important, but usually not easy.
Assets I have in mind:
Plain bonds would likely be the simplest to implement of the these three. Plain bonds apparently have high commissions at moderate levels of principal.
One aspect is how widely held the asset is. For example, do people hold actual bonds more than they hold bond ETFs? I don't know.
Another aspect is the tax implications, especially for the non-registered account. Would it be acceptable, at least initially, to restrict an asset class to the TFSA and RIF, and exclude it from the NRA? That would greatly simplify the tax treatment.
Would it be acceptable to support ETFs, but leave out Mutual Funds? The distributions of mutual funds seem particularly complex for tax implications, because they come in a mix of dividends, interest, capital gain, and return-of-capital.
The data in the tax returns changes every year.
It's a bit tedious to go through all of those tax returns, fishing out numbers, but it needs to be done.
For 2021, I've only done PE so far.
Adding this is non-trivial. For the moment I'm just noting it here as an issue to think about.
Doesn't seem to be called. I think it's just a piece of data now, the conversion date in the rif account block.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.