Blog Archive

Thursday, January 23, 2020

How to install ubuntu on windows 10



Ref:

https://docs.microsoft.com/en-us/windows/wsl/install-win10?redirectedfrom=MSDN

https://linuxize.com/post/how-to-install-pip-on-ubuntu-18.04/

Step 1:
Before installing any Linux distros for WSL, you must ensure that the "Windows Subsystem for Linux" optional feature is enabled:
  1. Open PowerShell as Administrator and run:
    PowerShell
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    
  2. Restart your computer when prompted.

Step 2: continue Ubuntu installation.

Other ref:
Step3: in case you need python3 and numpy.

       Start by updating the package list using the following command:
  1. sudo apt update
  2. Use the following command to install pip for Python 3:
    sudo apt install python3-pip
    The command above will also install all the dependencies required for building Python modules.
  3. Once the installation is complete, verify the installation by checking the pip version:
    pip3 --version

Install Numpy Module using PIP

Using the appropriate PIP python version installed on your system execute the following pip3 command to install the python Numpy module:
$ pip3 install numpy
All done. Check for the Numpy's version:
$ python3 -c "import numpy; print(numpy.__version__)"
1.14.2

Tuesday, January 21, 2020

401k IRA


Uncle Sam 养老金从入门到精通——401(k), Backdoor Roth IRA



上次讲的收入税会对本文很有帮助,欢迎参考: vanshady:Uncle Sam 收入税从入门到精通

不知道大家有没有感觉每年给Uncle Sam交那么多税很酸爽,交了那么多税怎么可能财务自由嘛?
而养老金是一个非常好的避税途径,不仅可以降低当年税表上写的收入所得,而且甚至有时候养老金账户的收入所得也是免税的。而养老金的缺点也很显然,作为养老金账户,通常在59.5岁前(是的,真的有这个.5)把钱提出来需要交罚金和税。简单来说就是牺牲了钱的流动性,换来少交税以及59.5岁后有足够的饭钱。
好了,废话不多说,直接上干货,记得先点赞再收藏哦~
先说几个概念:
  • tax-free:这些钱以后不用交税,好处显而易见。
  • tax-deferred: 这些钱现在不交税,以后交税。好处在于这笔钱一开始可能落在了更高的tax bracket,而取出来就的时候,比如退休的时候取出来,因为你只会取你需要的部分,而你退休了也显然不会有工资了,所以通常在一个更低的tax-bracket。

话题转回退休账户,从退休账户的提供者来说有两种,401K和IRA。

401K

401K是公司提供的退休金账户。所以如果你跳槽了,就只有三个选择
  1. cash out并且支付penalty和tax,显然一个坏选择
  2. 保留,但是你的401K选择会更受限制
  3. 转成新公司的401K
  4. 转成自己的IRA

IRA

而IRA,Individual Retirement Account,就像名字一样,是你自己的退休账户,你有更多的自主权和投资选择。

简单来说401k是公司提供的退休账户,IRA是自己开的退休账户。401k的好处是会有一些特殊的fund(比如各种Vanguard institutional fund),平常的账户买不到,或者门槛非常高(百万级别的minimal investment requirement)。同时因为IRA是自己开户的,投资选择和类别也非常多(比如各种note),所以各有优缺点。

而退休账户类型主要有三种,Traditional,After-Tax和Roth。

Traditional

你直接把你的税前工资打进去,所以这个部分就不会算税了,i.e. contributions是deductible的。而Traditional的账户里你一开始打进去的钱和最后赚的钱,取出来的时候再收税,所有contributions+capital gains都是tax-deferred

After-Tax

顾名思义,这个账户让你把你after-tax的工资打进去。你会说我明明已经交了税,我还要把前放到退休金账户有什么好处呢?
类似于Traditional,你的capital gains是tax-deferred,但你的contributions是after-tax的。

Roth

Roth账户是以当年推动立法的主要支持者 Senator William Roth of Delaware命名的。
Roth的contribution可以说pre-tax的就像traditional一样,或者是after-tax的。大部分人都是After-tax的contribution,原因就在于Pre-tax的contribution和Traditional一起算在$19,000的cap里,而通常Traditional惠更划算一些。
Roth最大的好处便是投资所得是TAX-FREE的,所以如果你如果你妙手生花让这些钱翻10倍,Uncle Sam不会从里面拿走任何钱。


==
Notes:
https://www.nerdwallet.com/blog/investing/401k-rollover-ira-guide/

1.Traditional(=Pre-Tax): 你直接把你的税前工资打进去,所以这个部分就不会算税了,i.e. contributions是deductible的。而Traditional的账户里你一开始打进去的钱和最后赚的钱,取出来的时候再收税,所有contributions+capital gains都是tax-deferred

2.After-Tax: 顾名思义,这个账户让你把你after-tax的工资打进去。你会说我明明已经交了税,我还要把前放到退休金账户有什么好处呢? 类似于Traditional,你的capital gains是tax-deferred,但你的contributions是after-tax的。

3.Roth: Roth账户是以当年推动立法的主要支持者 Senator William Roth of Delaware命名的。
Roth的contribution可以说pre-tax的就像traditional一样,或者是after-tax的。大部分人都是After-tax的contribution,原因就在于Pre-tax的contribution和Traditional一起算在$19,000的cap里,而通常Traditional惠更划算一些。
Roth最大的好处便是投资所得是TAX-FREE的,所以如果你如果你妙手生花让这些钱翻10倍,Uncle Sam不会从里面拿走任何钱

https://www.nerdwallet.com/blog/investing/401k-rollover-ira-guide/
https://www.fidelity.com/learning-center/personal-finance/retirement/rolling-over-retirement-assets


FAQ:
https://www.fidelity.com/retirement-ira/rollover-faq

Can I roll over an old 401(k) that has both pre-tax and after-tax money in it?
You can, but it is important to select the right IRA for your needs. A Traditional (or Rollover) IRA is typically used for pre-tax assets because savings will stay invested on a tax-deferred basis and you won't owe any taxes on the rollover transaction itself. However, if you roll pre-tax assets into a Roth IRA, you will owe taxes on those funds. For after-tax assets, your options are a little more varied. You can roll the funds into a Roth IRA tax-free. You also have the option of taking the funds in cash or rolling them into an IRA along with your pre-tax savings. If you choose the latter option, it is important that you keep track of the after-tax amount so that when you start taking distributions, you'll know which funds have already been taxed. IRS Form 8606 is designed to help you do just this. Before making a decision, please consult with a tax advisor about your specific situation.