From January 2015, she started to practice leetcode questions; she trains herself to stay focus, develops "muscle" memory when she practices those questions one by one. 2015年初, Julia开始参与做Leetcode, 开通自己第一个博客. 刷Leet code的题目, 她看了很多的代码, 每个人那学一点, 也开通Github, 发表自己的代码, 尝试写自己的一些体会. She learns from her favorite sports – tennis, 10,000 serves practice builds up good memory for a great serve. Just keep going. Hard work beats talent when talent fails to work hard.
Sunday, June 30, 2019
Case study: TD Ameritrade monthly statement 2019-June - Part I
June 30, 2019
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.
First section is here.
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.
CNBC profiles Becky Quick
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.
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
- 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.
- 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.
- 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?'.
- 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.
- 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.
- 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.
- 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.
- 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."
- Change: Live with change and accept unremovable complexity. Understand that the world moves on and be willing to adapt your "best-loved ideas".
- 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.
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.
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.
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
|
---|---|---|---|---|---|---|---|---|
VMBS | Vanguard Mortgage-Backed Securities ETF | Bond | $9,831.91 | 3.91% | 931,938.0 | $52.83 | -0.02% | |
VCLT | Vanguard Long-Term Corporate Bond ETF | Bond | $4,056.39 | 15.75% | 363,720.0 | $96.87 | 0.20% | |
BLV | Vanguard Long-Term Bond ETF | Bond | $3,467.95 | 12.67% | 411,091.0 | $97.06 | 0.05% | |
VGLT | Vanguard Long-Term Treasury ETF | Bond | $1,174.59 | 10.52% | 266,112.0 | $81.65 | -0.02% | |
EDV | Vanguard Ext Duration Treasury ETF | Bond | $1,122.51 | 13.45% | 160,928.0 | $127.01 | -0.11% |
Case study: Rush to solve 418 algorithms on leetcode.com
June 30, 2019
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.
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.
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.
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.
I like to watch the video. Here is the link.
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.
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.
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.
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:
- 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>;
- 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.
- 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.
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.
- I like to prove that post order traversal will not bring ambiguity; How to prove that?
- Preorder works against Leetcode online judge;
- Inorder traversal does not work. The counter example is the following:
The answer should be [[0]], but the code will return [[0],[0,0]]. - 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.
node with value is expressed using '(' + value +')' since two interger should be separated from each other.
Post order traversal
So based on the above analysis, the following two trees will not be mixed together.
Inorder traversal
So based on the above analysis, the following two trees will be mixed together.
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.
https://github.com/jianminchen/Leetcode_Julia/tree/master/Leetcode discussion.
Comments: 0
Saturday, June 29, 2019
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"
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
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
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
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
56 Merge intervals
C# First practice using LINQ in Feb 2017
C# IComparer class definition practice in February 2017
C# various practice in 2019
C# First practice using LINQ in Feb 2017
C# IComparer class definition practice in February 2017
C# various practice in 2019
- Word Ladder II
Time limit exceeded practice in 2019 - Word Ladder
I am planning to work on those 3 medium level agorithms (31, 34, 47) and three hard level algorithms (336, 564, 305) this week.
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)
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
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
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
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
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
Subscribe to:
Posts (Atom)