Thursday, February 13, 2020

20 Predictions for the Stock Market in 2020

Here is the article.


  1. There will be no recession in 2020
  2. The stock market will have another positive year
  3. The market will experience at least a 10% correction
  4. Interest rates will remain unchanged the entire year
  5. Gold and silver will outperform, once again
  6. Warren Buffett will make a big purchase
  7. Healthcare will be the hottest sector in the S&P 500
  8. FAANG stocks will outperform the benchmark S&P 500, as a whole... 
  9. ...But Netflix will finish the year lower
  10. Bitcoin will lose half of its market value... again
  11. A 900-plus-store retailer will go bankrupt
  12. Brexit will finally happen
  13. Marijuana industry M&A will come to a complete halt
  14. More pot stocks will be delisted than uplisted to a major U.S. exchange
  15. Corporate share buybacks will fall from 2019's record levels
  16. United Technologies will be kicked out of the Dow Jones Industrial Average
  17. Facebook or Costco will replace United Technologies in the Dow
  18. Restaurant stocks will significantly underperform the broader market
  19. Pinterest will shine in 2020 -- other second-year stocks, not so much
  20. Value stocks stage a comeback



18 5 Phrase Queries and Positional Indexes Stanford NLP Professor Dan Jurafsky & Chris Manning

Here is the link.


18 3 The Inverted Index Stanford NLP Professor Dan Jurafsky & Chris Manning YouTube

Here is the link.

It is such a good lecture and I like to learn more from the professor Dan Jurafsky & Chris Manning.


13 Ways to Beat the Single-Person Penalty

Here is the article.


Scaling Write-Intensive Key-Value Stores

Here is the link.

In recent years, the log-structured merge-tree (LSM-tree) has become the mainstream core data structure used by key-value stores to ingest and persist data quickly. LSM-tree enables fast writes by buffering incoming data in memory and flushing it as independent sorted batches to storage whenever the buffer is full. To enable fast reads, LSM-tree sort-merges batches in storage to restrict the number that reads have to search, and it also uses in-memory Bloom filters to enable point reads to probabilistically skip accessing batches that do not contain a target entry. In this talk, we show that such LSM-tree based designs do not scale well: as the data size increases, both reads and writes take increasingly long to execute. We pinpoint the problem to suboptimal core design: the Bloom filters have been attached to LSM-tree as an afterthought and are therefore not optimized to minimize the overall probability of access to storage. Point reads are therefore unnecessarily expensive. To compensate, more merging than necessary has to take place thereby making writes unnecessarily expensive. As a part of the CrimsonDB project at the Harvard DasLab, we developed two insights to address this problem. Firstly, we show that the optimal approach for allocating Bloom filters given any amount of available memory resources is to assign significantly lower false positive rates to smaller data batches. This shaves a logarithmic factor from point read cost thereby allowing key-value stores to scale better in terms of reads. Secondly, having lower false positive rates for smaller batches allows to merge newer data more lazily without compromising point read cost. This allows eliminating most of the merge overheads of LSM-tree thereby improving the scalability of writes. We close by describing a higher-level lessons from our work: while data structure design up until today has focused on the cost balance between reads and writes, the inclusion of memory utilization as a direct additional optimization objective opens up new avenues for asymptotic improvements, which studying reads and writes in isolation could not have revealed.

Actionable Item


Go over the author's web page, watch as many videos, slideshow as possible. I like to build some interest in storage research, I like to learn the foundation of storage design. Here is data structure research Niv Dayan's page.

Wednesday, February 12, 2020

Log-structured merge-tree LSM tree

Here is the link.

Oana Balmau, Florin Dinu, and Willy Zwaenepoel, University of Sydney; Karan Gupta and Ravishankar Chandhiramoorthi, Nutanix, Inc.; Diego Didona, IBM Research–Zurich Awarded Best Paper! LSM-based KV stores are designed to offer good write performance, by capturing client writes in memory, and only later flushing them to storage. Writes are later compacted into a tree-like data structure on disk to improve read performance and to reduce storage space use. It has been widely documented that compactions severely hamper throughput. Various optimizations have successfully dealt with this problem. These techniques include, among others, rate-limiting flushes and compactions, selecting among compactions for maximum effect, and limiting compactions to the highest level by so-called fragmented LSMs. In this paper we focus on latencies rather than throughput. We first document the fact that LSM KVs exhibit high tail latencies. The techniques that have been proposed for optimizing throughput do not address this issue, and in fact in some cases exacerbate it. The root cause of these high tail latencies is interference between client writes, flushes and compactions. We then introduce the notion of an I/O scheduler for an LSM-based KV store to reduce this interference. We explore three techniques as part of this I/O scheduler: 1) opportunistically allocating more bandwidth to internal operations during periods of low load, 2) prioritizing flushes and compactions at the lower levels of the tree, and 3) preempting compactions. SILK is a new open-source KV store that incorporates this notion of an I/O scheduler. SILK is derived from RocksDB, but the concepts can be applied to other LSM-based KV stores. We use both a production workload at Nutanix and synthetic benchmarks to demonstrate that SILK achieves up to two orders of magnitude lower 99th percentile latencies than RocksDB and TRIAD, without any significant negative effects on other performance metrics.

How to tell if I am below (should be above now) average as an investor?

Feb. 12, 2020

Introduction


It is time for me to learn how to evaluate myself as an investor. I did buy high and sell 15 years low in 2009, and I did the same thing in VIGRX in 2001. How should I start to learn to evaluate myself or other above average or not.

Above average


I just could not believe that I was 1% in 2009 to act reactively, and I like to figure out how to evaluate myself where I am at the very beginning.

Every area I should work on at least 100 hours first in order not to stay 1% lowest level.


Case study: Victoria portfolio performance review

Feb. 12, 2020

Introduction


It is a good idea for me to review my Victoria performance. Now it is easy for me to put those transaction into Excel sheet and then generate dividend, positions and commissions quickly.

Case study


I like to push myself to learn how to invest S & P 500 index fund; one thing I learned to do is to push myself to work on something simple and easy first. So later I can come out some creative idea to work on improvement.

Those are my 10 years saving from 2010 to 2020. I was naive and I did not learn to invest on the stock market from 2010. If I have invested $10,000 dollars on VGT ETF from 2010 to 2020, then the growth of fund will be around $50,000 dollars. Knowledge is power, I did not push myself to learn, so I live so frugal to save all those $50,000 dollars in Canada over 10 years, which is all I can save in Canada.

I just use this as a small example to illustrate how important it is to learn to work on research, stay confident to learn, and also examine all possible leaks in my personal finance. It took me six months research from Nov. 2018 to May 2019, I found out my biggest finance mistake.

I have to say that I am lucky to be healthy, smart to find out my own weakness.



Actionable Items


Knowledge is power. Hard work beats talent, but I have to learn again in my 50s the importance to take risk, grow with USA and world economy by investing S & P 500 Index, and FTSE.

I had over $25,000 US dollars in my 401 K and IRA in 2010 for me to invest. If I have above average knowledge how to invest, and I put those fund into VGT etf. During 10 years period, I was busy with Willingdon church small group activities, I never even opened my book to look into what I should work on, at least 5 hours a year. I just could not believe that I was so biased and could not move away from daily busy activities, focus on basics of personal finance.

If I learn to be frugal, put all my savings from full time job in a manufacture company in the city of Vancouver, no matter how small the wage it is, I will save $5,000 dollars each year to put in VGT using dollar cost average. From 2010 to 2019, I was busy with so many things but I never spent over one hour to study what is S & P 500 index. I am not a learner at all.

SILK: Preventing Latency Spikes in Log-Structured Merge Key-Value Stores

Here is the presentation by Ph.D. shared by Microsoft research.

LSM-based KV stores are designed to offer good write performance by capturing client writes in memory and only later flushing them to storage. Writes are later compacted into a tree-like data structure on disk to improve read performance and to reduce storage space use. It has been widely documented that compactions severely hamper throughput. Various optimizations have successfully dealt with this problem. These techniques include, among others, rate-limiting flushes and compactions, selecting among compactions for maximum effect, and limiting compactions to the highest level by so-called fragmented LSMs. In this work we focus on latencies rather than throughput. The root cause of high tail latencies is interference between client writes, flushes and compactions. We introduce the notion of an I/O sched- uler for an LSM-based KV store to reduce this interference. We explore three techniques as part of this I/O scheduler: 1) opportunistically allocating more bandwidth to internal operations during periods of low load, 2) prioritizing flushes and compactions at the lower levels of the tree, and 3) preempting compactions. SILK is a new open-source KV store that incorporates this notion of an I/O scheduler. SILK is derived from RocksDB, but the concepts can be applied to other LSM-based KV stores. We demonstrate that SILK achieves up to two orders of magnitude lower 99th percentile latencies than RocksDB and TRIAD, without any significant negative effects on other performance metrics.

Here is the link for slideshow.

Actionable items


I spent one hour to watch the video, and it is such a great presentation. But I also like to see if I can review second time, so that I can have ideas how to learn better next time, LSM-tree.

Time spent: 10:00 PM - 11:03 PM



Why it is so important for me to find a video to learn LSM-Tree?

Feb. 12, 2020

Introduction


It is so hard for me to read a few articles about LSM-Tree. I did spend over three hours to read, but for some reason, I could not go over the original paper LSM-Tree in 1996 which has more than 30 pages. I like to find some videos from Youtube.com, and see if I can learn quickly from teaching video.

LSM-Tree


LSM stands for Log-structure Merge tree, and it is so interesting since I could not figure out what S stands for while I took a break in swimming pool this evening.

I tried to learn LSM-Tree by reading original papers in wiki article, but this was a serious problem.

Actionable Items


Follow up
Feb. 13, 2020

I spent two hours to watch Microsoft research video about paper written on LSM-Tree, and also Stanford post doctor's presentation.

Recession 2020? Economists See High Chances

Here is the link.


Behavioral Finance Foundations

Here is the course called Behavioral Finance Foundations on Linkedin learning.




LSM-tree

Here is the video.


Inverted index - youtube.com video

Here is the link.


Tuesday, February 11, 2020

Ric Edelman Offers Advice On Managing Your Finances

Here is the link.


Truth About Money with Ric Edelman-Season 3 Episode 15

Here is the link.


Here's how Ric Edelman suggests you avoid big financial mistakes

Here is the link.

How to find some one hold hand, avoid impulsive decision making.

Most people act emotionally, not intellectually. I did act emotionally, sold everything in stock market in 2009.

Ignore noise, work on long term goals. Do not sway you from long term strategy.






How to make investment study much more fun?

Feb. 11, 2020

Introduction


I like to work on a short research how to make my investment study much more fun, so that I can prepare better to go through a bear market with all my 10 years savings in Canada.

10 ideas to make investment fun


I like to work on ideas how to make the research fun.


  1. I will buy VGT ETF second dip in next bear market
  2. I will do rebalance first dip in next bear market
  3. I will write something related to being frugal in the city of Vancouver, talk about how I enjoy my simple life
  4. I like to work on 20 lbs weight loss in first dip, 10 lbs weight loss in second dip. 
  5. I will solve 100 Leetcode algorithm if there is first dip in 2020
  6. I will think about 5 more ideas
I closed Amtrust bank account and moved $2600 US dollar CD over 10 years, and then the fund was moved to scotia bank, and then TFSA account.

I like to study better this time before bear market hits in 2020. I will enjoy better my time if bear market is not coming in 2020.






The S&P 500 is really the S&P 5. Big tech dominates the index

Here is the article. I like to learn three facts from the article.


Technology’s Impact on Investment Management

Here is the link.


  1. Low interest
  2. tax
  3. Inflation
  4. Annuity - get second opinion - inflicted with commission 

1-2-3 challengs
  1. income keeps pace with inflation

Going broke by safely 

Hypothetical interest rate 1.5%  $100,000
33% Fed/State Tax Rate  -0.5%
                                          1.0%
Hypothetical inflation     -3.0%
Real annual return           -2.0%
(net of taxes and inflation)  x 20 yrs
----------------------------------------
                                        -40%        $60,000


guaranteed to fail because net of taxes


                                          



Ric Edelman Offers Advice On Managing Your Finances

Here is the link.


Here's how Ric Edelman suggests you avoid big financial mistakes

Here is the link.

Availability bias - lighting attacks or shark attacks
recency bias -

Long period - do it yourself, or by fund managers

Human tendency - error checking - hand checking
How to avoid buying you are excited, sell if you are scared.

Soccer - penalty kicks - act, stand there

We do realized that we are emotion creatures -

fall - wrong thing/ wrong time
facts/ get caught

What is my motivation? Sound facts

Opportunity to buy on the dip
Ignore the noise <=> long term goal
Sway you from long term goals

Old news -



Here's How to Tell Within 5 Minutes If Someone Will Never Get Rich

Here is the article. I like to take the test and understand better about interest rate with bond pricing.

6. Suppose you owe $1,000 on a loan and the interest rate you are charged is 20 percent a year, compounded annually. If you didn't pay anything off, at this interest rate, how many years would it take for the amount you owe to double?
  • Less than 2 years
  •  2 to 4 years
  • 5 to 9 years
  • More than 10 years
6. Suppose you owe $1,000 on a loan and the interest rate you are charged is 20 percent per year compounded annually. If you didn't pay anything off, at this interest rate, how many years would it take for the amount you owe to double?
Answer: 2 to 4 years.

People who thought it would take five years forgot about interest compounding. After one year you'll owe $1,200. After two years the 20 percent gets applied to that amount, which means you'll owe $1,450. And so on...
If that sounds complicated, here's an easy rule of thumb. Just apply the "Rule of 72" to any interest rate or rate of return: Divide 72 by the rate of return and the result is how long it should take your savings to double -- or, in this case, your debt to double.
So if you get a 10 percent return, it will take 7.2 years for the amount to double. Getting a 6 percent return will require 12 years. Getting a 4 percent return will take 18 years. 
Which means it will take 3.6 years, if you don't make any payments, for the $1,000 you borrowed to double.
And if that sounds a little loan shark-y, it is.

Actionable Items


72 rules - review (1 + 0.01)^72 = 2




SSDs and Distributed Data Systems

Here is the article.


Diff-Index: Differentiated Index in Distributed Log-Structured Data Stores

Here is the paper.


Tokutek White Paper: A Comparison Of Log-Structured Merge (LSM) And Fractal Tree Indexing

Here is the paper.


How does the log-structured merge-tree work?

Here is the link on quora.com.


The Log-Structured Merge-Tree (LSM-Tree)

Here is the paper about LSM-Tree.

I may not be able to understand the paper, but it is better to invest 20 minutes to give it a try.




SSTable and Log Structured Storage: LevelDB

Here is the article.


Log Structured Merge Trees(LSM) 原理

Here is the article.

Log Structured Merge Trees(LSM) 原理

十年前,谷歌发表了 “BigTable” 的论文,论文中很多很酷的方面之一就是它所使用的文件组织方式,这个方法更一般的名字叫 Log Structured-Merge Tree。
LSM是当前被用在许多产品的文件结构策略:HBase, Cassandra, LevelDB, SQLite,甚至在mangodb3.0中也带了一个可选的LSM引擎(Wired Tiger 实现的)。
LSM 有趣的地方是他抛弃了大多数数据库所使用的传统文件组织方法,实际上,当你第一次看它是违反直觉的。

You may be tempted to make this mistake as the market tanks. Here’s what to do instead.

Here is the article.


12 Signs That You Are a Writer At Heart (And 3 Signs You Are Not)

Here is the article.

4 hours reading - Design large data intensive application

Introduction


It is important for me to track my progress how to learn by reading a book. I have to spend over four hours to read one chapter, and I like to figure out how I can improve my reading skills.


Case study


Here are highlights:

1. Book chapter: Chapter 3: Storage and Retrieval
2. How many hours? More than 4 hours
3. How I read the book chapter? I copy a few paragraph and paste into word, so I break the sentence, and then find keywords, and then think about.

What are my problems?

The reading is too slow, and my understanding is limited how good the book is written. I tried to get the main idea how the storage is design. LSM-Tree is so confusing, in those 8 hours of reading, I am not so sure what it is.


Follow up


Feb. 12, 2020

After I spent two days over 8 hours to read the book chapter, I found out that I did not learn things at all. I decided to look up baidu.com, and then find an article, and then go one by one reference, so I can read original papers and other blogs written by Google engineers.

The writing of book chapter is not so good for my level. I need to catch up a lot of terms, and also I need to read quickly, and go over the main ideas.

Everything related to data structure like tree, how to understand balanace binary search tree, merge tree, I already study very well last four year through Leetcode practice.

Follow up
Feb. 13, 2020

I spent two hours to watch Microsoft research video about paper written on LSM-Tree, and also Stanford post doctor's presentation.

Monday, February 10, 2020

My volunteer reward

Feb. 10, 2020

Introduction


It is hard for me to get chance to be interviewed on interviewing.io. I only got 9 mock interviews from January 2018, even though I work as a volunteer Mon-Fri 10:00 PM, 10:00 AM/ 10:00 PM Sat./ Sun..

Good news


Today I got an email about a good news. Now I have chance to learn how to push myself to get into 10% in ranking of interviewees.


Sania Mirza lost 26kgs in 4 months post pregnancy, shares video of transformation

Here is the link.


You’re probably not saving enough for retirement — and that’s OK

Here is the article.


Sunday, February 9, 2020

The number of 401(k) millionaires hits an all-time high

Here is the link.


The number of 401(k) millionaires hits a fresh high

Here is the article.


The number of Fidelity 401(k) plans with a balance of $1 million or more jumped to a record 200,000 as of Sept. 30, up 7% from a year ago, according to a new report by Fidelity, the nation’s largest provider of 401(k) plans. The financial services firm handles more than 30 million retirement accounts altogether.

In addition, the number of individual retirement account millionaires increased to 182,400, also an all-time high.

- Argument to look into

They also tend to hold more equity, Murphy said, which can be a double-edged sword. On the one hand, the bull market has buoyed those investments but on the flip side, they may also be exposing their savings to unnecessary risk if the market takes a dive.

Vanguard Group founder on how to manage your 401 (k) plan

Here is the link.


Vanguard Group Founder Jack Bogle on index funds and how people should manage their 401 (k) plans.

Number of 401(K) millionaires hits new high: report

May 18, 2018

Here is the link.

401(K) millionaires

new high

108K  1Q 2017
157K  1Q 2018

Treat it serious, get some professional help. For my case, I should invest time long time ago from 1999. Over 20 years I only got $5000 from over $22,000 investment over years.






Record number of 401(K) millionaires

Here is the link.

10 year bull market

RPT: There are 50,000 more people from a year earlier with $1M in their 401(K).

a year before 118,000, now it is 168,000

Fidelity manages 16.1 million people's 401(k)s


32,000, 5% deposit into 401 K, 13% return every year.

Mutual fund, target fund.

Darbar -

Professional help - pay them by hours




401(k) and IRA millionaires hit new high

Here is the link.

IRA   - 2%      17.4 M accounts
401K - 1%      17.4 M account   

Risk aversion in 2008 -

Stocks go up in long run - it always




Mistakes and discipline issues from 1996 to 2020

Feb. 9, 2020

Introduction


I like to write a case study how I learn mistakes I made from 1996 to 2020. I like to work on a short research how to discipline myself and make a good living as a single Canadian as a 53 year old.




Case study: How much risk I should take as a 53 years old?

Feb. 9, 2020


Introduction


It is my personal finance research. I just spent whole weekend to work on personal finance study, and I like to figure out how much risk I should take. I do not want to time the market, and I like to see how many investment opportunities for me to consider in 2020.

Case study


Target retirement fund for 50 years old is 80% equity, 20% bond. Right now, ...

How to Get $1 Million in your 401k & Become a Millionaire Investor

Here is the link.

==== TRANSCRIPT ===== In America the 401K has become the number one way we save for retirement. More than pensions ,savings accounts, IRAs regular investment counts the average person's balance in their 401ks and all-time high. What do you need to do to get your 401k to a million dollars by the time you retire? 1. Never cash your 401k out. According to research 41% of people between the ages of 20 to 39 are cashing out their 401ks when they leave a job. If you leave a job and take a cash distribution of your 401k you have to pay all interest that's due and you pay a 10% penalty on top of that. 2. Don't borrow against your 401K. One in five people borrow against their 401k but what is the real cost of doing so? When we decide to borrow money in our 401k it's probably not going to be for the reason that's going to be benefiting our retirement. It's a sign we are living beyond our means. 3. Roll it over into an IRA. The cost of owning a mutual fund is called the management fee and you pay that every year out on your investments. The funds in your 401k are going to have some of the highest management fees you will find anywhere so when you leave your job you should roll over your 401k into an IRA where you can invest in low-cost index funds which have much lower fees. 4. Invest heavily in stock. If you are young you want to select funds in your 401k that are 100 % and mutual funds or low-cost index funds if they're available stock market it's going to proven history of generating wealth for investors who are in it for the long haul. If you follow those steps invest early invest often you are almost guaranteed to retire with at least a million dollars Scott Answers Viewers Questions: Should money an employee stock purchase program in an annuity or in a 401k account as an emergency fund? I know you say about the 401 K because he recently talked about not borrowing money against your 401 K but if you have an emergency does that qualify? How do I get out from under a foreclosure I went through a divorce and my ex-wife would not sign the papers to sell the house or rent it out so I got taken back by the bank.

Tips To Become A 401(k) Millionaire

Here is the link.


【朽木】看高盛摩根如何趁机绑架了全世界的经济,经济危机才是投行赚钱的机会《大而不倒》

Here is the link.


金融危机中,他们是怎么赚钱的 ?--让每个人都能听懂:《大空头》|《THE BIG SHORT》

Here is the link.

《大空头》是由美国派拉蒙影业公司发行的传记剧情片,由亚当·麦凯执导, 克里斯蒂安·贝尔、史蒂夫·卡瑞尔、瑞恩·高斯林、布拉德·皮特、凯伦·吉兰、梅丽莎·里奥、玛丽莎·托梅、拉菲·斯波、约翰·马加罗联合主演。 影片根据迈克尔·刘易斯同名小说改编。讲述了华尔街金融危机时四个性格怪异的男人抓住机会,从全球经济衰退中捞取了利润,同时他们还试图阻止全球经济的衰退的故事。

So you want to be a 401(k) millionaire? Here's how to do it, according to Fidelity

August 30, 2018


Here is the link.

Values are rising
Retirement funds (year-over-year)
  • Average 401(k): $104,000 (up 6%)
  • Average IRA: $106,900 (up 9%)
What's in your 401(K)? Vanguard, average retirement account
Ages 65+
  • Average: $209,984
  • Median: $64,811
1:57
157,000 people are super saver, based on Fidelity, with over a  million dollar

Tip #1
Be aggressive

  • Invest heavily in equities
  • Be heavier equities when younger, roll out over time
  • Gauge age and risk tolerance

Tip #2  (3:22/ 6:04)
Know your end goal

  • Always take a longer-term view
  • Have an eye on growth
  • Don't react to market swings
Tip #3
Examine allocations
  • At minimum once a year
  • Quarterly when near retirement
  • Re-examine when life changes take place

Jeanne Thompson - Fidelity

Target fund - when you are 50, still 10 year to retire, 85% equities, 15% bond

Marathon, a sprint,

60% market,

Allocation once a year. Asset class

Less than 1% - move to cash, but most of them stay on the course

Those over 10 years,
$73,000 -> $200,000 approach $300,000

Do not react too quickly.

Actionable Items


I like to evaluate myself based on my USA 401 K and IRA, my return from 2009 to 2020 is less than 2% annual return. All of those mistakes can be traced back in 2001, I sold VIGRX in 2001 with 30% loss; I did not learn that I have to read at least one investment book related to growth fund, and understand the concepts like index fund return. Later in 2009, since my Canada immigration application was denied in December 2008, I sold all equities in my 401 K and also IRA. I made mistake to move to IRA CD with Amtrust bank.

I got depressed in 2009 since I learned that I may be worth nothing from 1996 to 2009, the home  I purchased does not worth too much, I had 10 year old paid SUV but gas price was $5.00/ gallon, and I had less than $28,000 dollar US retirement fund, and the bank gave me $65,000 home equity line starting from 2006.

I have to examine how to stay healthy, wealthy; Never purchase any brand new car, only gas-efficient car instead.




987. Vertical Order Traversal of a Binary Tree

Here is my discussion post.

C# Avoid using hashmap and sorting practice in 2020

It is challenge for me to understand how to master the algorithm and stay humble when I work on the algorithm I practice before. This week the mock interviewer on interviewing.io asked me to work on the algorithm, after he reviewed my solution using C# Dictionary and sorting based on hashMap's keys, he said that there is no need to use hashMap, no need to apply sorting.
The optimal time complexity can be achieved by using bucket sort.
Here are highlights of my practice.
  1. Design a variable xValue, go to left child decrement one, go to right child increment one;
  2. Traverse the tree to record maximum and minimum value of horizontal positions;
  3. Declare an array of List, apply preorder traversal to visit every node in the tree, and save it into sorted variable based on horizontal value.
  4. Stay humble, practice one using the optimal time complexity solution O(N).
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     public int val;
 *     public TreeNode left;
 *     public TreeNode right;
 *     public TreeNode(int x) { val = x; }
 * }
 */
public class Solution {
    public IList<IList<int>> VerticalTraversal(TreeNode root) 
    {
        if(root == null)
        {
            return new List<IList<int>>();           
        }
        
        var max = new int[2]{int.MaxValue, int.MinValue};
        
        traversalTree(root, max, 0);
        
        var size = max[1] - max[0] + 1; 
        
        var sorted = new List<int>[size];
        for(int i = 0; i < size; i++)
            sorted[i] = new List<int>(); 
        
        preorderTraveral(root, sorted, -max[0]);
         
        var sortedList = new List<IList<int>>();                        
        
        for(int i = 0; i < size; i++)
        {
            var list = new List<int>(); 
            foreach(var item in sorted[i])
            {
                list.Add(item); 
            }
            
            sortedList.Add(list); 
        }
        
        return sortedList; 
    }
    
    private void preorderTraveral(TreeNode root, List<int>[] sorted, int xValue)
    {
        if(root == null)
            return;
        sorted[xValue].Add(root.val);  
        
        preorderTraveral(root.left,  sorted, xValue - 1);
        preorderTraveral(root.right, sorted, xValue + 1);                             
    }
    
    private void traversalTree(TreeNode root, int[] max, int xValue)
    {
        if(root == null)
            return; 
        
        max[0] = max[0] > xValue? xValue : max[0];
        max[1] = max[1] < xValue? xValue : max[1]; 
        
        traversalTree(root.left,  max, xValue - 1);
        traversalTree(root.right, max, xValue + 1);                
    }
}


How I like to achieve my million dollar dream?

Feb. 9, 2020

Introduction


It is my busy Sunday. Now it is 2:03 PM. I like to go out to play tennis, and then go to Ranfrew swimming pool. This morning I spent some time to share how to build a portfolio on Chinese wechat group. How do I do to achieve my dream to make a million dollar in 53 years old? short term 1-2 year, 3-5 years, over 10 years?

Ideas


I am watching CNBC video, and also I like to get the ideas from four-star fund manager on how to beat the market. What I like to do is to challenge myself, expand my vocabulary, and get myself comfortable about watching how a fund manager view the market.

I like to keep continue to watch more CNBC instead of spending time on wechat group. One of ideas is to find people to talk as well. I found out that meeting people and communication on the phone are much better sometimes.




Four-star fund manager on how to beat the market

Here is the link.

SBLYX - Morningstar 4 stars

1 Year   up  24%
3 Year   up  14%
5 Years  up 17%


Portfolio manager explains her five-star strategy for beating markets

Here is the article with 5 minutes video recorded in July 2018.

5-star stock strategy



Diverse Growth Stocks Let This Manager Beat Many Mutual Funds

Here is the article.

IBD: Your three buckets — cyclical, stable and select growth — target stocks with very different traits. What's your aim there?
Vitrano: We want different kinds of growth stocks. So some are zigging while others are zagging. We have names that are quality, steady compounders. They're in our stable bucket, the core of the portfolio.
We also want companies that are in some turnaround mode. We're willing to look out several years to see their valuation creation. These are our cyclicals.
Lastly, we have companies with higher momentum — our select growth bucket.
The mix of the three helps us create a portfolio without as much volatility as other large-cap growth strategies.

Growth Stocks With Downside Protection

Here is the link.

The economy and markets are facing multiple headwinds. But the cumulative real growth of the economy, that’s excluding inflation, is far below other post World War II recoveries. That growth is now being challenged on several fronts - enough to derail the U.S. economy and the record-breaking bull market in large-cap stocks? In a slow-growth world, growth commands a premium. Large-cap growth stocks, particularly the largest U.S. ones known as mega-caps have dominated market performance, revenues, and earnings over the last decade with a few short-lived challenges from value stocks. Will they continue to do so? This week’s guest is a newcomer to WEALTHTRACK, but not to the investment business. She is Margaret Vitrano, Co-Portfolio Manager of the high performing ClearBridge Large Cap Growth Fund Vitrano and her Co-Portfolio Manager Peter Bourbeau also oversee ClearBridge’s All Cap Growth Strategies along with Large Cap Growth which adds up to nearly $50 billion under management. Of particular interest is the team's “three-bucket” approach strategy to large-cap growth which Vitrano believes has protected their portfolios in down markets. She will also discuss their treatment of the FAANGs in their portfolios and why they are currently overweighting Facebook. WEALTHTRACK # 1615 broadcast on October 11, 2019.


Hedge Your Nest Eggs Against Volatile Market Swings

Here is the link.

How can individuals How can individuals hedge their nest eggs against volatile market swings? Three experts join us with different diversification solutions.

Top rated financial planner Mark Cortazzo specializes in guaranteed income investments, Peter Crane is the king of cash equivalents, and Jim Lebenthal is a veteran of the municipal bond world.?

Three experts join us with different diversification solutions. Top rated financial planner Mark Cortazzo specializes in guaranteed income investments, Peter Crane is the king of cash equivalents, and Jim Lebenthal is a veteran of the municipal bond world.

Broadcast on March 28, 2008.


Morningstar’s Personal Finance Guru, Christine Benz With an Annual Financial Wellness Checkup

Here is the link.

I like to share this video with my Chinese friend. It is important to learn from Christine Benz from a few videos before she likes to purchase any investment.




Case study: one hour talk with my young sister - Bin Chen

I spent one hour to talk to my young sister, she explained to me about chorona virus first 20 minutes or so, and then she talked about her daughter and her study in Columbia international college in grade 10.

My niece started her study from Oct. 2019, this term she has more than 4 courses. She was super busy and did not have time to chat with my young sister every day. She has to work on her projects.

Here is the college website.


Billionaire Ray Dalio Predicts The Next Big Market Crash

Here is the link.




How to Make Millions In the Next Market Crash

Here is the link.

Do not change the world, change yourself.


Cao Dewang

Here is the link.

Cao Dewang (Chinese: 曹德旺; born May 1946), also known as Cho Tak Wong or Tak Wong Cho, is a Chinese entrepreneur and philanthropist. He is the chairman of Fuyao Group, one of the largest glass manufacturers in the world.[1][2] He is also a member of the Chinese People's Consultative Conference from Fujian, and chairman of both the China Automobile Glass Association and the Fujian Golf Players' Association.[3]


Analysis of Chronavirus 2020

Here is the article

《新京报》记者还向曹德旺提问,如何看待很多人主张实行宽松货币政策,以应对经济下行压力加大以及疫情冲击。

曹德旺对此持有不同看法。他认为,政策可以宽松,但须考虑到底要解决什么问题。在推出政策前,要认真评估政策推出后的利弊。从企业角度看,货币政策已经宽松过头了,货币宽松不一定能解决一些民营企业的真正问题。

曹德旺说,从2008年至今实行宽松货币政策,导致很多民营企业大量贷款,并投资房地产炒房,目前很多企业负债率都在70%左右,已触碰到银行融资的高压线,根本没有资本再进行融资了。

曹德旺表示,现在房地产企业最缺钱。他担心,货币宽松会使得很多本该解决的历史问题继续累积。


Actionable Items


I am asking myself, who is 曹德旺. I quickly learned that he is the billionaire making glasses for auto industry. 

One of ideas is to watch a few videos related to his business. I like to learn how to do business from his insights. 


Saturday, February 8, 2020

8 Money Habits That Keep You Poor (STOP SELF SABOTAGE)

Here is the link.


Most of what we do with our money everyday is unconscious. The more aware you are of your money habits, the faster you can reach your financial goals. Without realizing it, you might be doing these 8 money habits that keep you poor. See if you recognize any of these bad money habits in yourself, and what money habits to break this year. These habits keep you poor, and in this video I share my best personal finance tips for breaking bad money habits and replacing them with GOOD money habits!

1. Paying yourself last. 2. Trying to keep up with friends with expensive taste. 3. Putting everything on your credit card for “rewards”. 4. Having disorganized finances. 5. Getting too comfortable with debt. 6. Paying extra due to lack of planning. 7. Paying too much on taxes. 8. Waiting too long to start investing. Roughly—- but listen to her, she explains these well.


How NOT Using a Financial Advisor Made Us Millionaires

Here is the link.

Our Rich Journey: How Not Using a Financial Advisor Made Us Self-Made Millionaires - If you've watched our videos, you know we're all about encouraging everyone to achieve financial literacy - mostly because nobody cares about your money as much as you do. And, if you want to achieve financial independence, one of the best ways to achieve it is through financial literacy. We retired at 39 and 41 - but, on the road to FIRE (financial independence retire early), we became financially literate. We did this so that we could make our own financial decisions and so that we wouldn't have to rely on a financial advisor to make financial decisions for us. In this video, we talk about the top ten reasons why we never used a financial advisor and why, by not using a financial advisor, we achieved millionaire status.

How To Invest In 2020 | My Concerns

Here is the link.


Watch CNBC's full interview with billionaire investor Ron Baron

Here is the link.

2020 80% gain last month or a few days.


How to Invest During This Stock Market All-Time High | Phil Town

Here is the link.


001: Tom Corley: The 4 Habits That Will Make You Rich and 4 Strategies to Build your Network

Here is the link.


2020 rebalance on Victoria portfolio

Feb. 8, 2020

Introduction


I spent time to rebalance my Victoria portfolio in order to keep at least 50% equity. I like to do a short case study and how to improve my process.

Case study



The Habits of the Rich vs. The Habits of the Poor with Tom Corley

Here is the link.


Read 30 minutes or more. Rich people do that.

From comments:

Poor people that live paycheck to paycheck buy stuff at dollar stores flee markets because these things cost little money but they don't have much so the stuff keeps them poor.

Middle class buy liabilities like boat house cars credit card debt vacation home things that don't produce money. Spend more than they make. Sometimes too busy just to play golf.

Rich buy assets that produce money like stocks bonds real estate education and they find cash generating opportunities. I understand that not everybody is like this.