Sunday, June 30, 2019

How to Train on a Tennis Wall With Targets

Here is the video.

Unemployment Hits a Low. Then Comes the Recession

Here is the link.


7 Life Changing Benefits of Playing Tennis

Here is the article.

Case study: TD Ameritrade monthly statement 2019-June - Part VI

Here is the section I like to look into.



Case study: TD Ameritrade monthly statement 2019-June - Part V

Here is the section I like to look into.


Case study: TD Ameritrade monthly statement 2019-June - Part IV

I like to look into this section, and get more experience on monthly statement.


Case study: TD Ameritrade monthly statement 2019-June - Part III

I like to work on this section.


Case study: TD Ameritrade monthly statement 2019-June - Part II

I like to work on this section of report.


Case study: TD Ameritrade monthly statement 2019-June - Part I

June 30, 2019

Introduction


It is time for me to understand the monthly statement, therefore I can memorize all sections on the statement; It is not too easy but not too difficult. My goal is to push myself to learn personal finance day by day.

Case study


First section is here.


Are We Heading Into a Recession? Boeing's Biggest Problem | Joseph Carlson Ep. 12

Here is the link.


TD Ameritrade statement tutorial

Here is the article.




Warren Buffett: Interest rate is 'gravity' on stock prices

Here is the link.




A Conversation with Mr. Warren Buffett at the Purpose Built Communities 2017 Annual Conference

Here is the link.


Buffet's advice

Here is 5 minutes interview Becky interviewed Buffet in 2016.


CNBC profiles Becky Quick

Here is the link.

Here is "Behind the Biz" with CNBC's Becky Quick".

Advice to 20's yourself

Save early. Watch budget. 

Berkshire Hathaway's Munger on private equity and investing

Here is the link.

INVESTING ETFS SPY: SPDR S&P 500 Trust ETF

Here is the article.


Pro Strategy: How to invest like Charlie Munger

Here is the article.

The whole approach was based on understanding the bipolar personality of "Mr Market". This embodiment of stock market sentiment sways between overly confident and fearful while the underlying company remains the same.

CHARLIE MUNGER'S 10-POINT INVESTING CHECKLIST

  1. Risk: All investment evaluations should begin by measuring risk, especially reputational. Apply Benjamin Graham's "margins of safety" principles, insist on being compensated for the risk you take on, and avoid companies with questionable individuals.
  2.  Independence: "Only in fairy tales are emperors told they are naked." To be objective you must have independent thoughts. Mimicking the herd will lead to no better than average performance.
  3. Preparation: "The only way to win is to work, work, work, work, and hope to have a few insights." Learn to love learning and never stop asking 'why?'.
  4. Intellectual humility: Acknowledging what you don't know is the dawning of wisdom. Stay within your "circle of competence", the area within which you have superior expertise, and find and reconcile evidence that goes against your thesis.
  5. Analytic rigour: Use of the scientific method and effective checklists minimises errors and omissions. Separate value and price; assess progress, not just activity, and the wealth of a company, as distinct from its size.
  6. Allocation: Proper allocation of capital is an investor's number one job. Focus on "opportunity cost", the alternative options for your cash. When a (rare) good opportunity comes along, bet heavily.
  7. Patience: Resist the natural human bias to act. Do not take action for its own sake; this only adds unnecessary costs and interrupts the magic effects of compound interest.
  8. Decisiveness: When proper circumstances present themselves, act with decisiveness and conviction. Best summed up by Mr Buffett's adage: "Be fearful when others are greedy and greedy when others are fearful."
  9. Change: Live with change and accept unremovable complexity. Understand that the world moves on and be willing to adapt your "best-loved ideas".
  10. Focus: Keep things simple and remember what you set out to do. Guard against hubris and boredom. Filter out the minutiae and focus on the obvious.

Charlie Munger: Teaching young people to actively trade stocks is like starting them on heroin

Here is the link.

Key points

Warren Buffett’s longtime business partner Charlie Munger equated trying to teach inexperienced investors how to actively pick stocks to trying to get them to use heroin.

Munger lauded large index funds for the everyday investor looking for exposure to the stock markets and said that many active stock pickers are in denial.

The market for index funds has reached $6 trillion, while the market for ETFs has ballooned to $5 trillion since the SPDR S&P 500′s inception.

“If you take the modern world where people are trying to teach you to come in and trade actively in stocks, well I regard that as roughly equivalent to trying to induce a bunch of young people to start off on heroin,” Munger said from the annual Daily Journal shareholder meeting on Thursday.


Money has flooded into index funds and exchange-traded funds during this long-running bull market, while fee-based active strategies have suffered. The market for index funds has reached $6 trillion, while the market for exchange traded funds, which track indexes, has ballooned to $5 trillion since the SPDR S&P 500′s inception in 1993.

5 Diversified Vanguard Funds Paying 4%+

Here is the link.

In fact, of Vanguard’s 70 ETFs, a mere five boast yields of more than 4% currently. But investors would be wise not to sleep on this small list of Vanguard ETFs, as their dirt-cheap costs make each of them a candidate for important satellite income holdings for just about anyone.

Vanguard Long-Term Bond ETF (BLV)
Dividend Yield (SEC): 4%

Expenses: 0.09%
The Vanguard Long-Term Bond ETF (BLV) is, as the name would suggest, a way to access longer-dated debt.
BLV holds more than 2,100 different investment-grade bond issues. And while the fund is, as one would expect, chock-full of Treasury and agency bonds (at nearly 40% of the fund), industrial corporate debt makes up a significant chunk of BLV’s holdings, at about 36%. The rest of the fund is split mostly among debt from financial corporations, utilities and foreign entities.

Vanguard Long-Term Bond Index Fund ETF Shares (BLV)

Here is the link.

Vanguard Long-Term Bond ETF (BLV)
Dividend Yield (SEC): 4%

Expenses: 0.09%
The Vanguard Long-Term Bond ETF (BLV) is, as the name would suggest, a way to access longer-dated debt.
BLV holds more than 2,100 different investment-grade bond issues. And while the fund is, as one would expect, chock-full of Treasury and agency bonds (at nearly 40% of the fund), industrial corporate debt makes up a significant chunk of BLV’s holdings, at about 36%. The rest of the fund is split mostly among debt from financial corporations, utilities and foreign entities.

Vanguard Long Term Bond ETF List

Here is the article related to long term bond etf list.

It is so challenging to learn personal finance by myself. I chose to learn yield curve through one video first. Next step is to look into long term bond.

From yield curve video, I like to learn the long term bond and its return.

Symbol
ETF Name
Asset Class
Total Assets ($MM)
YTD
Avg Volume
Previous Closing Price
1-Day Change
Overall Rating
VMBSVanguard Mortgage-Backed Securities ETFBond$9,831.913.91%931,938.0$52.83-0.02%
VCLTVanguard Long-Term Corporate Bond ETFBond$4,056.3915.75%363,720.0$96.870.20%
BLVVanguard Long-Term Bond ETFBond$3,467.9512.67%411,091.0$97.060.05%
VGLTVanguard Long-Term Treasury ETFBond$1,174.5910.52%266,112.0$81.65-0.02%
EDVVanguard Ext Duration Treasury ETFBond$1,122.5113.45%160,928.0$127.01-0.11%


Case study: Rush to solve 418 algorithms on leetcode.com

June 30, 2019

Introduction


It is my personal finance study. I like to look into those 418 algorithms solved  on Leetcode.com. Since I was too busy to work on as many algorithms as I can from May 2018 to Dec. 2018, March 2018 to June 2018. I did review one of the algorithm called 652 Find duplicate subtrees, I know that there are so many issues hidden in my practice.

Case study


What is benefit to rush to solve 418 algorithms? 

One thing I can do is to push myself to solve more algorithms. That is the only way I can create chance for me to work on more challenging projects in the future.

I have to get experience through those Leetcode algorithm problems first. It is quickest way for me to master all kinds of algorithm and data structure.

What is the problem to solve 652 Find duplicate subtrees?

I only studied one solution on Dec. 3, 2018, and the code passes online judge. What I should do is to review the algorithm, and then look into how to design serialization of tree using string, how to construct the string to be able to be parsed back to original structure of binary tree, for example, separate from left child from right child etc.

I also should work on more carefully on various traversal, and then figure out serialization, how to make sure the serialization will work with different test cases.

The real reason Boeing's new plane crashed twice

Here is the link.


Boeing’s 737 Max Software Outsourced to $9-an-Hour Engineers

Here is the article I like to read.

“Boeing was doing all kinds of things, everything you can imagine, to reduce cost, including moving work from Puget Sound, because we’d become very expensive here,” said Rick Ludtke, a former Boeing flight controls engineer laid off in 2017. “All that’s very understandable if you think of it from a business perspective. Slowly over time it appears that’s eroded the ability for Puget Sound designers to design.”
Rabin, the former software engineer, recalled one manager saying at an all-hands meeting that Boeing didn’t need senior engineers because its products were mature. “I was shocked that in a room full of a couple hundred mostly senior engineers we were being told that we weren’t needed,” said Rabin, who was laid off in 2015.

“Boeing was doing all kinds of things, everything you can imagine, to reduce cost, including moving work from Puget Sound, because we’d become very expensive here,” said Rick Ludtke, a former Boeing flight controls engineer laid off in 2017. “All that’s very understandable if you think of it from a business perspective. Slowly over time it appears that’s eroded the ability for Puget Sound designers to design.”
Rabin, the former software engineer, recalled one manager saying at an all-hands meeting that Boeing didn’t need senior engineers because its products were mature. “I was shocked that in a room full of a couple hundred mostly senior engineers we were being told that we weren’t needed,” said Rabin, who was laid off in 2015.

Actionable Items


I like to watch the video. Here is the link.


652. Find Duplicate Subtrees

I like to make change on my post on leetcode.com discuss written over 8 months ago.

Here is the link.

C# post order traversal and use serialized string to help

Dec. 3, 2018
It is a medium level algorithm. I spent over an hour to write a solution but I came cross the time out issue. So I decided to study the discuss and then chose one of posts and implemented the solution. The experience to write my own code was very helpful, I had to fix the issue to separate left and right child issue.
Follow up on June 30, 2019
I like to add more detail in my post. In order for me to review the algorithm, I like to share my experience to solve the problem this time.
Here are highlights:
  1. Post order traversal the tree, every node will be tracked its subtree, and the serialized subtree in string will be stored as key in a hashmap, root node is the value. The data structure can be in C# Dictionary<string, IList> or Dictionary<string, HashSet>;
  2. More detail on step 1, how to serialize a tree using string? We can construct the string using each node using post order, and then use '(' as prefix and ')' as suffix for each node.
  3. To return duplicate subtrees, we only need to return the root node of any node. So first node in the array can be selected. Hashset can be converted to an array first, and then first element is selected.
More detail as an interviewer
I like to ask the algorithm on interviewing.io as an interviewer, so I have to look into all kinds of ideas to solve the problem as well.
  1. I like to prove that post order traversal will not bring ambiguity; How to prove that?
  2. Preorder works against Leetcode online judge;
  3. Inorder traversal does not work. The counter example is the following:
    image
    The answer should be [[0]], but the code will return [[0],[0,0]].
  4. The serialization of tree is related to 297 serialize and deserialize binary tree. The post order/ preorder traversal should work, but not inorder traversal.
Case study
null pointer using '+',
node with value is expressed using '(' + value +')' since two interger should be separated from each other.
Post order traversal
image
So based on the above analysis, the following two trees will not be mixed together.
image
Inorder traversal
image
So based on the above analysis, the following two trees will be mixed together.
image
Preorder traversal
Preorder traversal should be reversed from post order traversal
/**
 * 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<TreeNode> FindDuplicateSubtrees(TreeNode root)
        {
            if (root == null)
            {
                return new List<TreeNode>();
            }

            var dict = new Dictionary<string, HashSet<TreeNode>>();            

            postorderTraverse(root, dict);

            var result = new List<TreeNode>(); 

            foreach (var pair in dict)
            {
                var set = pair.Value;
                if (set.Count > 1)
                {
                    var array = set.ToArray();
                    result.Add(array[0]);
                }
            }

            return result; 
        }

        private static string postorderTraverse(TreeNode root, Dictionary<string, HashSet<TreeNode>> visited)
        {
            if (root == null)
                return "+";            
            
            // make sure that it is post order traversal
            //                          Left                                   right               
            var serialized = postorderTraverse(root.left, visited) + postorderTraverse(root.right, visited) + "(" + root.val + ")";

            if (!visited.ContainsKey(serialized))
            {
                visited.Add(serialized, new HashSet<TreeNode>()); 
            }

            visited[serialized].Add(root);

            return serialized;
        }
}
If you like my analysis and sharing, please give me an upvote. I also put all my C# algorithm together, the link is
https://github.com/jianminchen/Leetcode_Julia/tree/master/Leetcode discussion.
Comments: 0

Saturday, June 29, 2019

Why New Investors Lose Money | Joseph Carlson Ep.5

Here is the link.


How to Read SEC Filings When Buying Penny Stocks | $ZYNE $YRIV

Here is the link.

Form 10-K
Ctrl-F Keywords

"Offering" "Revenue"
"Cash Equivalents"
"Shares outstanding"
"Convertible Notes"
"Shelf" "Warrants" "ATM"



Intro to Penny Stock Trading Psychology - Day trading for beginners ($ABIO Stock)

Here is the link.

Trader psychology is perhaps the most important aspect to learn as a penny stock trading beginner. Indicators and patterns etc only work IF people use them. So it's more advantageous to learn how the 5 major penny stock players THINK. I break down trading psychology of breakout traders, dip buyers, momentum traders, swing traders, and short sellers using $ABIO stock as an example. Time stamps: 1:00 - Breakout traders psychology 2:28 - Momentum traders 3:43 - Short sellers 5:46 - Dip buyers 7:30 - Swing traders 8:55 - What do all these traders THINK at the market open after an overnight gap up? 11:06 - Stock charts represent psychological emotions of traders buying and selling

Stock Market Crash 2019? How to Prepare for Beginners

Here is the link.

2.25% -> 2.50%, 25 base point interest rate hike from Federal government

Cheap borrowed money -> ...

I like the publisher: Humbled Trader




Leetcode algorithms to work on

I like to look into those algorithms and then try to learn a few algorithms in next two weeks. 


31 next permutation
34 find first and last in rotated array
42 - trapping rain water
47 roman to integer
53 - Max subarray
56,143,252,253 interval and meeting series
126-127 word ladder (MUST)
9,125,372,336,564 - palindrome
205 -isomorphic string?
236 longest common ancestor of binary tree
305 number of islands 2 < use union find version
312 burst balloon
505 maze game 2

 543, 53, 121,716,160,20 我的顺序一般是挑简单的开始。不求质量求数量。希望量变可以引起质变

Actionable Items




I am planning to work on those 3 medium level agorithms (31, 34, 47) and three hard level algorithms (336, 564, 305) this week. 

HOW TO INVEST IN 2019!

Here is the link.


STOCK MARKET FOR BEGINNERS 📈 How To Invest As A COMPLETE Beginner In 2019!

Here is the link.

Here is the link.

2:31 - Intro (Realistic Expectations) 9:07 - Lesson #1 (Buy Low, Sell High) 14:57 - Lesson #2 (Ignore the Noise) 20:20 - Lesson #3 (Stock Market = Pendulum) 24:12 - Lesson #4 (Invest in What You Know) 27:45 - Lesson #5 (Plan Out Your Investments) 30:39 - Lesson #6 (Diversify) 34:18 - Lesson #7 (Low Share Price Doesn’t Equal Cheap) 37:19 - Lesson #8 (The Value of Money) 42:50 - Lesson #9 (Speculation) 45:10 - Lesson #10 (Timing the Market)

Why Investors Are Obsessed With the Inverted Yield Curve

Here is the link.

Yield curve - bond - interest

Yield - 100 dollar interest amount
Maturity - Yield

Health yield curve - 2 year, 3 year, 10 year

Invert - The fed influences short term yield

Too many borrowing
Low rate to encourage borrowing

Unemployment rate

Long term bond -> risk equity - > Put money outside equity, and then put into long term bonds.

Bear market - invert - imminent -> long term bond, Fed raise rate




Should I Invest Now or Wait for a Crash 2019 - Leading Economic Indicators for the US Economy

Here is the link.


Waiting to Invest is Costing You... A Lot

Here is the link.

spending habit and saving habit.
68% other liabilities -
59% do not know how to start


The issue - Waiting to invest
Thousands of dollars difference

Cost #1 Inflation, price inflation
Government print more money

1.8%   inflation rate
1.6%   inflation rate

Purchase power - saving account GIC - less risk, less return
CPI inflation rate

Cost #2 Opportunity cost
Time value of the money -

Me 
1000  -> 1020 (one year)

You
1000

Grow exponentially.  Compounding
8th wonder of the world - start early, cut high exponential return

$800,000 Age 65
1,667/ month, age 25
Average return 6%

$400/ month

Age 45
6%
$1,764/month




lintcode亚麻九题

Here is the link.

628.maximum-subtree
627.Longest Palindrome
626.Rectangle Overlap
604.window sum
616.course-schedule-ii
613.High Five
612.k closest points
105.Copy List with Random Pointe
629.minimum spanning tree


Warren Buffett: Stocks are 'ridiculously cheap' if interest rates stay at current levels

Here is the link.


Algorithms to review

Coding:
1. 140 wordbreak
2. 0-1 knapsack
3. 236 lca of tree
4. 204 count prime number 
5. 72 edit distance
6. 210 course schedule
7. 450 delete node in bst
8. 136 single number
9. 34 first&last pos of element in sorted array
10. 545 boundary of tree
11. 314 binary vertical traversal
12. 437 path sum
13. 127 word ladder
14. 472 concatenated words
15. 380 + - random O(1)
16. 543 diameter of tree
17. 134 gas station
18. 139 140 word break
19. 215 kth largest element in array