Tuesday, August 25, 2020

After Dow inclusion news, Salesforce stock soars on reveal of first $5 billion quarter

 Here is the article. 

Should I purchase CRM stock for short term, sell Intel stock 170 shares of $8000 US dollars. After I make some profit, I will purchase back 170 shares of Intel stock. 


Salesforce CRM, +3.64% reported second-quarter net income of $2.63 billion, or $2.85 a share, on revenue of $5.15 billion, up from $4 billion in the year-ago quarter. Adjusted earnings, which excluded a $2 billion tax benefit from changes in Salesforce’s international corporate structure, were $1.44 a share, compared with 66 cents a share in the year-ago period.

Analysts surveyed by FactSet had estimated earnings of 67 cents a share on revenue of $4.9 billion, while Salesforce had forecast earnings of 66 cents to 67 cents a share on revenue of $4.89 billion to $4.9 billion.

On the conference call, Chief Executive Marc Benioff said it was “humbling” and “bittersweet” that the company produced strong results amid the difficulties and tragedies created by the COVID-19 pandemic as businesses need to adapt and connect digitally with their customers. One example mentioned was facilitating the logistics of curbside pickups, which most retailers didn’t offer before the pandemic.

“We all want to get back to how things were, but the reality is that’s never going to happen,” said Chief Executive Marc Benioff on the conference call. “We’re in a new world. We’re in an all-digital world with the work digitally, we’re living digitally, we’re educating digitally.”

That shift into a digital reality showed in Salesforce’s guidance as the company raised its annual revenue outlook for the year. For revenue, the company sees a range of $20.7 billion to $20.8 billion, after previously forecasting $20 billion in sales. For annual adjusted earnings, Salesforce expects $3.72 to $3.74 a share, up from a previous range of $2.93 to $2.95 a share. Analysts expect earnings of $2.97 a share on revenue of $20.01 billion.

Salesforce shares gained 3.6% Tuesday to close at a record high of $216.05 following an announcement from S&P Dow Jones Indices that the stock would replace Exxon Mobil Corp. XOM, -3.17% on the Dow DJIA, -0.21% at the end of the month. It is the first pure cloud-software company included in the blue-chip index.

Salesforce shares rallied more than 13% in after-hours trading following the release of the results, pushing for more records. At Tuesday’s close, the stock was up 33% for the year, while the First Trust Cloud Computing ETF SKYY, +1.08% is up 31%, the S&P 500 index SPX, +0.36% is up 6.6%, and the tech-heavy Nasdaq Composite Index COMP, +0.76% is up 28%.

Actionable Items

CRM stock price went up 26% on August 26, 2020. I did not make purchase, after blogging, I worked on system design. 

Leetcode discuss: Longest ZigZag Path in a Binary Tree

 Here is the link. 

C# preorder traversal with optimal space and time complexity

  1. Longest ZigZag Path in a Binary Tree

August 25, 2020
Introduction
It took me over 10 minutes to come out this idea better than brute force solution. The naive idea is to find all paths in the binary tree, and then search all possible zigzag paths in any path.

Better idea is to start from any node, and check it's downward path to leaf node longest zigzag path. If it is left child, then check left child only, since right child should be checked by it's parent node.

Case study
A tree with three nodes, root node with value 1, root node's left child with value 2, and root node's left child's right child with value 3.

The idea is to apply preorder traverse the tree, so the root is visited, and then check it's both directions, and downward zigzag path, only one path, from root node, go to left, and then go to right. The length is 2.

When the root node's left child is visited, only need to check it's left child downward zigzag path, which has length value 0.

Time complexity
average time complexity O(nlogn), logn is average height of tree, n is total number of nodes.
Space complexity
O(1)

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     public int val;
 *     public TreeNode left;
 *     public TreeNode right;
 *     public TreeNode(int val=0, TreeNode left=null, TreeNode right=null) {
 *         this.val = val;
 *         this.left = left;
 *         this.right = right;
 *     }
 * }
 */
public class Solution {
    /// <summary>
        /// August 25, 2020
        /// I came out two ideas. I need to come out at least two ideas before I write any code.
        /// The first one is to find all paths from root to leaf node, and then search one by one 
        /// longest zigzag path, space is not efficient, need to store all paths. 
        /// I worked on the second idea, it is to preorder traverse the tree, 
        /// for each node, check left or right zig zag path for longest one. 
        /// If it is the left child of it's parent node, do not need to check
        /// right child. Same applies to right child. 
        /// The average time complexity will be O(nlogn), n is total number of 
        /// nodes in the tree, and logn is average height of the tree. 
        /// Space complexity is O(1). No need to store all paths. 
        /// </summary>
        /// <param name="root"></param>
        /// <returns></returns>
        public int LongestZigZag(TreeNode root)
        {
            if (root == null)
                return 0;

            var longest = 0;

            preorderTraverseTree(root, 2, ref longest);

            return longest;
        }

        /// <summary>
        /// preorder traverse the tree
        /// 0 - is left child
        /// 1 - is right child
        /// 2 - not applied
        /// unit test:
        /// 1. Tree with one node - 0
        /// </summary>
        /// <param name="root"></param>
        /// <param name="longest"></param>
        private void preorderTraverseTree(TreeNode root, int directionToChild, ref int longest)
        {
            if (root == null)
                return;

            // visit current node
            if (directionToChild == 2)
            {
                // go to left and also go to right two directions to find zigzag paths
                var path1 = findDownwardZigzag(root, 0);
                longest = path1 > longest ? path1 : longest;

                var path2 = findDownwardZigzag(root, 1);
                longest = path2 > longest ? path2 : longest;
            }
            else if (directionToChild == 0)
            {
                // go to left downward zigzag                
                var path = findDownwardZigzag(root, 0);
                longest = path > longest ? path : longest;
            }
            else if (directionToChild == 1)
            {
                // go to right downward zigzag
                var path = findDownwardZigzag(root, 1);
                longest = path > longest ? path : longest;
            }            

            preorderTraverseTree(root.left,  0,  ref longest);
            preorderTraverseTree(root.right, 1,  ref longest);
        }

        private int findDownwardZigzag(TreeNode root, int direction)
        {            
            var count = direction; 
            while ((count % 2 == 0 && root != null && root.left  != null) || 
                   (count % 2 == 1 && root != null && root.right != null))
            {             

                if (count % 2 == 0)
                {
                    root = root.left;
                }
                else
                {
                    root = root.right;
                }

                count++;
            }

            return count - direction; 
        }
}


Suncor Energy (TSX:SU): Warren Buffett Just Increased His Stake in This TSX Giant

 Here is the article. 

Here are my highlights for 10 minutes reading:

  1. Warren Buffett's investment firm held 14.94 million shares in Suncor at the end of March 2020, now 19.94 million shares at the end of Q2. 
  2. Suncor share price $34 per share, 10.7% dividends in February 2020
  3. Suncor is currently valued at a market cap of $33.5 billion. Its price-to-sales multiple of 1.1 and price to book ratio of 0.92 indicates that the stock is cheap

According to Berkshire Hathaway’s recent 13F filings, the company has increased its stake in Canada’s energy infrastructure giant Suncor Energy (TSX:SU)(NYSE:SU). Warren Buffett’s investment firm held 14.94 million shares in Suncor at the end of March 2020. Its holding increased to 19.94 million shares at the end of Q2.

Warren Buffett now owns US$318.36 million in Suncor stock indicating a 1.3% stake in the company. While Buffett has been a net seller of equities in 2020, his investment in Suncor should encourage investors.

Berkshire Hathaway holds a position in Suncor since the fourth quarter of 2018 when the stock was trading at $34 per share. Suncor was then a blue-chip dividend-paying company. It, in fact, raised dividends by 10.7% in February 2020 which would have been the company’s 18th consecutive year of dividend increases.

However, the COVID-19 pandemic wreaked havoc and decimated energy stocks that were hurt by global lockdowns and a price war between Saudi Arabia and Russia, resulting in a massive oversupply of crude oil.

And more

In the June quarter, Suncor reported sales of $4.2 billion, down by a significant 58% year over year. Its net loss stood at $614 million in what was the worst quarter for oil stocks in several decades.

However, Suncor is currently valued at a market cap of $33.5 billion. Its price-to-sales multiple of 1.1 and price to book ratio of 0.92 indicates that the stock is cheap. Earnings are also forecast to rise at an annual rate of 20% between 2021 and 2024.



Stock trader: Learn to be the one to trade small size

 August 25, 2020

Introduction

I tried to speculate Canada oil stocks this Monday, but I forgot to place orders in Sunday evening. I lost chance to make over $2500 Canada dollars gains in one day. I did enter virtual orders in Yahoo ->Finance->My  portfolio. But I learned something from teaching video called placing small orders. So I did sell all my winning orders on Ameritrade.com today. I like to build good habits, one is to work on small orders, and do not bet on big orders. 

My filled orders

I only made $20 dollars on SAVE stock, $28 dollars on PEB, and 24.50 on PK stock. 

My failed purchase, only on Yahoo finance -> My portfolio:




HSE.TO  $575.00, IMO $700.00, SU $430.00, CVE $760.00, total opportunity loss: 

$2465.00, the purchase amount is $46,855.00 dollars. 

Because I was busy with wechat to answer questions, I was too tired to set priorities in Sunday evening, I forgot to enter the orders into Questrade.com. 


Monday, August 24, 2020

Stock purchase: Failed to purchase at 7:00 AM

 August 24, 2020

Introduction

The stock market is so sentimental, last Saturday US white house had a news release, so the stock price went up so quickly. I did plan to make purchase first thing in Monday morning. Even though I could purchase before the market, I still waited until 7:00 AM. 

8:05 AM status

I could not make purchase since the price went up so quickly. I did make plan what to purchase this time, so Yahoo -> Finance -> My portfolio has virtual update. 

8:37 AM

August 24, 2020 12:04 AM

Canadian dollars


Actionable Items

I like to take break and prepare my breakfast and lunch, and go to work. It is so exciting to learn so many things last weekend. 

I need to work on my preparation of psychology part. I should relax and put those orders in Sunday evening. It is hard for me to place orders when the market was moving up around 7:00 AM on August 24, 2020. 

Preparation, preparation! It is so important for me to stay organized and well prepared. Investing is not an easy task. 

August 27, 2020

Wall street worked with US white house and news annoucement last Saturday. I should practice a few time to place order in advance using PTC, so that I feel comfortable to set up purchase ahead of time. 

Most important is to take some risk, and learn white house and president election, and try to learn from those events and put together my purchase together. 

Being a good project manager, make a checklist. 


How To Buy Stocks: Bases And Buy Points

 Here is the link. 



Sunday, August 23, 2020

How To Buy Stocks: Pick The Best Stocks At the Right Time

 Here is the link. 


How To Read Stock Charts: Why Use Charts?

 Here is the link. 




How is the Stock Market at an All Time High?!?

 Here is the link. 

The S&P 500, an index that measures the stock performance of the 500 largest companies in the USA, closed out this week at it’s highest level ever. The USA releases it’s worse GDP figures in history? The stock market rose the next day, research is released that this whole ordeal may not be over until 2022, 1% rally in the markets. Is it fair to say we are right back in a market bubble?

Why Isn't the Stock Market Crashing?

 Here is the link.

After crashing 35%, the stock market has been on a tear since late March. Today we look at why the market has been so strong over the past few months. We explore what the Federal Reserve has done, as well as discussing the political factors behind the U.S. opening back up.


Investor William J. O'Neil: 23 Trading Rules that will make you a better stock trader

 

23 Trading Rules That Will Make You a Better Stock Trader

1. Don’t buy cheap stocks. Buy Nasdaq stocks mainly selling between $15 and $300 a share and NYSE stocks from $20 to $300 a share. Avoid the junk pile.

2.  Buy growth stocks that show each of the last three years annual earnings per share up at least 25% and the next year’s consensus earnings estimate up 25% or more. Most growth stocks should also have annual cash flow of 20% or more above EPS.

3. Make sure the last two or three-quarters earnings per share are up a huge amount. Look for a minimum of 25% to 30%. In bull markets, look for EPS up 40% to 500% (The higher, the better).

4. See that each of the last three-quarter’s sales is accelerating in their percentage increases, or the last quarter’s sales are up at least 25%.

5. Buy stocks with a return on equity of 17% or more. The best companies will show a return on equity of 25% to 50%.

6. Make sure the recent quarterly after-tax profit margins are improving and near the stock’s peak after-tax margins.

7. Most stocks should be in the top five or six broad industry sectors.

8. Don’t buy a stock because of its dividend or P/E ratio. Buy it because it’s the number one company in its particular field in terms of earnings and sales growth, ROE, profit margins, and product superiority.

9. Buy stocks with a relative strength of 85 or higher.

10. Any size capitalization will do, but the majority of your stocks should trade an average daily volume of several hundred thousand shares or more.

11. Learn to read charts and recognise proper bases and exact buy points. Use daily and weekly charts to materially improve your stock selection and timing. Buy stocks are they initially breakout out of sound and proper bases with volume for the day 50% or more above normal trading volume.

12. Carefully average up, not down, and cut every single loss when it is 7% or 8% below your purchase price with absolutely no exception.

13. Write out your sell rules that show when you will sell and nail down a profit in your stock.

14. Make sure your stock has at least one or two better-performing mutual funds who have bought it in the last reporting period. You want your stocks to have increasing institutional sponsorship over the last several quarters.

15. The company should have an excellent new product or service that is selling well. It should also have a big market for its product and the opportunity for repeat sales.

16. The general market should be in an uptrend and either favour small or big cap companies.

17. The stock should have ownership by top management.

18. Look for a “new America” entrepreneurial company rather than laggard, “old America” companies.

19.  Forget your pride and ego; the market doesn’t know or care what you think. No matter how smart you think you are, the market is always smarter. A high IQ and a master’s degree are not guarantees of market success. Your ego could cost you a lot of money. Don’t argue with the market, and never try to prove you’re right and the market is wrong.

20. Watch for companies that have recently announced they are buying back 5% to 10% or more of their common stock. Find out if there is new management in the company and where it came from.

21. Don’t try to buy a stock at the bottom or on the way down in price, and don’t average down (If you buy at $40, don’t buy more if it goes to $35 or $30).

22. If the new appear to be bad but the market yawns, you can feel more positive. The tape is telling you that the underlying market may be stronger than many belief. On the other hand, if highly positive news hits the market and stocks give ground slightly, the tape analyst might conclude the underpinnings of the market are weaker than previously believed.

23. 37% of a stock’s price movement is directly tied to the performance of the industry group the stock is in. Another 12% is due to strength in its overall sector. Therefore, half of a stock’s move is due to the strength of its respective group.

investor William J. O'Neil: 10 common mistakes most traders make

 

10 common mistakes most traders make

1. Stubbornly holding onto losses.

2, Buying on the way down in price.

3. wanting to make a quick and easy buck.

4. Buying on tips, rumours, split announcements, and other news events, stories, or opinions you hear from supposed market experts on TV.

5. Selecting second-rate stocks because of dividends or low P/E ratios.

6. Buying because of old names you’re familiar with.

7. Being afraid to buy stocks that are going into the new high ground in price.

8. Cashing in small, easy-to-take profits while holding the losers.

9. Not being able to make up your mind when a decision needs to be made.

10. Concentrating your time on what to buy and once the buy decision is made, not understanding when or under what conditions the stock must be sold.

Technical Analysis: Why Investors Should Sell Into Strength And Lock In Profits

 Here is the link. 

Knowing the ideal time to sell a stock is just as important as knowing the ideal time to buy. Locking in profits when you have a big gain is a sound strategy, and Cisco is now in a profit-taking zone. Investor’s Business Daily has been helping people invest smarter results by providing exclusive stock lists, investing data, stock market research, education and the latest financial and business news to help investors make more money in the stock market. Learn more. Get more IBD:

Comment:

She is merely repeating and emphasizing the advice of the highly-venerated (and successful) investor William J. O'Neil. He has "been around" since 1933; hopefully, that's long enough for you. Most successful investors share investment advice that is pretty simple and straightforward; most retail investors seem to ignore it in part or in full, for a variety of reasons. That doesn't mean the advice isn't good.

Intel stock: How to calculate intrinsic value?

 Here is the link. 

Below are the data sources, inputs and calculation used to determine the intrinsic value for Intel.

NasdaqGS:INTC Discounted Cash Flow Data Sources
Data PointSourceValue
Valuation Model2 Stage Free Cash Flow to Equity
Levered Free Cash FlowAverage of 40 Analyst Estimates (S&P Global)See below
Discount Rate (Cost of Equity)See below9.6%
Perpetual Growth Rate5-Year Average of US Long-Term Govt Bond Rate2.2%

An important part of a discounted cash flow is the discount rate, below we explain how it has been calculated.

Calculation of Discount Rate/ Cost of Equity for NasdaqGS:INTC
Data PointCalculation/ SourceResult
Risk-Free Rate5-Year Average of US Long-Term Govt Bond Rate2.2%
Equity Risk PremiumS&P Global6.0%
Semiconductor Unlevered BetaSimply Wall St/ S&P Global1.17
Re-levered Beta= 0.33 + [(0.66 * Unlevered beta) * (1 + (1 - tax rate) (Debt/Market Equity))]
= 0.33 + [(0.66 * 1.173) * (1 + (1 - 21.0%) (18.30%))]
1.229
Levered BetaLevered Beta limited to 0.8 to 2.0
(practical range for a stable firm)
1.229
Discount Rate/ Cost of Equity= Cost of Equity = Risk Free Rate + (Levered Beta * Equity Risk Premium)
= 2.22% + (1.229 * 6.01%)
9.61%

Discounted Cash Flow Calculation for NasdaqGS:INTC using 2 Stage Free Cash Flow to Equity

The calculations below outline how an intrinsic value for Intel is arrived at by discounting future cash flows to their present value using the 2 stage method. We use analyst's estimates of cash flows going forward 5 years for the 1st stage, the 2nd stage assumes the company grows at a stable rate into perpetuity.

NasdaqGS:INTC DCF 1st Stage: Next 5 year cash flow forecast
Levered FCF (USD, Millions)SourcePresent Value
Discounted (@ 9.61%)
202116,062.7Analyst x1014,654.73
202220,244.33Analyst x316,850.86
202323,409Analyst x117,777.09
202425,068Analyst x117,368.28
202526,337.55Est @ 5.06%16,648.37
202627,446.65Est @ 4.21%15,828.69
202728,438.51Est @ 3.61%14,963.11
202829,347.3Est @ 3.2%14,087.78
202930,199.23Est @ 2.9%13,226.03
203031,014.03Est @ 2.7%12,392.28
Present value of next 5 years cash flows$153,797

NasdaqGS:INTC DCF 2nd Stage: Terminal Value
CalculationResult
Terminal ValueFCF2030 × (1 + g) ÷ (Discount Rate – g)
= $31,014.029 x (1 + 2.22%) ÷ (9.61% - 2.22% )
$429,131.19
Present Value of Terminal Value= Terminal Value ÷ (1 + r)10
$429,131 ÷ (1 + 9.61%)10
$171,467.97

NasdaqGS:INTC Total Equity Value
CalculationResult
Total Equity Value= Present value of next 10 years cash flows + Terminal Value
= $153,797 + $171,468
$325,264.97
Equity Value per Share
(USD)
= Total value / Shares Outstanding
= $325,265 / 4,253
$76.48
NasdaqGS:INTC Discount to Share Price
CalculationResult
Value per share (USD)From above.$76.48
Current discountDiscount to share price of $49.28
= ($76.48 - $49.28) / $76.48
35.6%

Learn more about our DCF calculations in Simply Wall St’s analysis model.

Investing Strategies: DocuSign CEO, Medical Sector News, E-Commerce Explosion | With Alissa Coram

 Here is the link. 

I like to spend 30 minutes to watch the interview. I do like to learn more about business. Right now, I am investing so many hours to learn how to invest on stock market, but  I do think that it is better for me to learn some basics, learn more about business, and being a good role model, and understand how Docusign helps business in this coronavirus special time. 



When to Sell a Stock | Phil Town

 Here is the link. 


Warren Buffett says that the ideal investment is one that you can hold onto forever, growing your money for as long as you own it. So, the question is - when is it the right time to sell a stock? Here are some of the signs you should look out for in order to know if it's time to sell a stock. http://bit.ly/2J4x0E3

When should you sell a stock?

Fundamental change - management change, lot of forms, new CEO etc. 

The price of the company has reached the intrinsic value. - 50% of intrinsic value - what things worth - stick price