Sunday, October 11, 2020

13678 GROSVENOR ROAD 205, Surrey, British Columbia

August 25 2017 182,000 dollars

built in 2015

Asking: $249,900 on Oct 5, 2020 - on market less than one week. 

Property Summary for 13678 GROSVENOR ROAD

Type
 
Single Family
Sub-Type
 
Strata
Building Type
 
Apartment
Title
 
Strata
MLS® Number
 
R2505092
Year Built
 
2015
Stories
 
1
Basement
 
None
Neighborhood
 
Surrey City Center
Postal Code
 
V3R5E2

Description for 13678 GROSVENOR ROAD

BALANCE: Central Surrey's modern solution for space, location and style. Expertly crafted and fashionably finished, BALANCE offers affordable space solutions for all buyers. Light & bright finishes incl modern white embossed quality cabinetry, quartz counters throughout w/tiled bath and IN-SUITE LAUNDRY. Large covered balcony on the QUIET side of the building! Eastern exposure provides lots of natural lighting. A great investment opportunity for an investor or first time buyer: centrally located, walk-able to all amenities and public transit including SKYTRAIN! Still under New Home Warranty, in booming City Centre this studio suite offers great value today and incredible future potential. 1 UNDERGROUND SECURED PARKING & STORAGE INCLUDED! Pet Friendly with NO RENTAL RESTRICTIONS! (id:1937)

210 
August 12, 2019  $245,000
Feb. 26, 2019, $235,000

211
490 
May 28, 2019  $289,000

213
Dec. 4, 2019 $235,000 
301 strata area

214
April 16, 2020 $235,000
366 strata area

303

301 strata area
Mar 28, 2018 $255,000

307 
July 30, 2018  $275,000
Strata area 301

308 Jan 10, 2020 $237,000

401 
strata area 419
Oct 16, 2018  $280,000
Sept 11, 2017 $200,000

409 
Strata area 490
Sept 13, 2019 $292,000

1 bedroom, 1 bath

412
Strata area 490
Jun 5, 2018  $339,000

414
Strata area 402
Apr 29, 2018  $276,888

415
Strata area 366
Jan 24, 2018  $220,000


Here is the link. 










Saturday, October 10, 2020

Friday, October 9, 2020

Equity research: How to be a good researcher? Stock picker?

 Here is the link. 


Leetcode discuss: 745. Prefix and Suffix Search

 Here is the discussion post. 

Oct. 9, 2020
745. Prefix and Suffix Search

Introduction
I started to learn how to write a Trie again. What I did is to learn ideas how to solve the problem by studing C# code using Trie, and also a short case analysis together.

Case analysis
The case is two string array, "bar","bat".
Store all the words corresponding to its prefixes and suffixes. For example, for two words bat and bar, the prefixes and suffixes dictionary will look as such:

prefixes

{
'': {'bat', 'bar'},
'b': {'bat', 'bar'},
'ba': {'bat', 'bar'},
'bar': {'bar'},
'bat': {'bat'},
}

suffixes

{
't': {'bat'},
'at': {'bat'},
'bat': {'bat'},
'r': {'bar'},
'ar': {'bar'},
'bar': {'bar'},
}
f('b', 'at') => set intersection of {'bat', 'bar'} and {'bat'} => 'bat'.
f('ba', 'r') => set intersection of {'bat', 'bar'} and {'bar'} => 'bar'.

Case study
Construct a trie using this idea, for example "bar" is the word, then construct a string "bar{bar" denoted as genius, and then start from dummy root node of Trie data structure, connect all suffix string of word concatenated by "{" + word.
dummy root node -> "bar{bar"
or-> "ar{bar"
or-> "r{bar"

The reason using '{' char since it has ascii value in decimal 123, and z's value is 122. I guess that we like to separate from suffix from prefix.

Step 1 in design:
Trie root node connects all suffix in the given word concatenated by "{" + word.
Step 2 in design:
Mark the weight for each substring along the trie
Step 3 in design:
Go through each word and assign weight using index with incremented value by one.

I will draw the diagrams to show Trie to go through test case 3, word "bat" first, and then word "bar" next, and then search using suffix "r" and prefix "ba" to find the word "bar", index value is 1.

image

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _745_prefx_and_suffix_search
{
    /// <summary>
    /// 745 prefix and suffix search
    /// </summary>
    public class WordFilter
    {
        static void Main(string[] args)
        {
            //RunTestcase1();
            //RunTestcase2();
            RunTestcase3();
        }

        public static void RunTestcase1()
        {
            // work on a test case
            // go over the example https://leetcode.com/problems/prefix-and-suffix-search/discuss/110053/Python-few-ways-to-do-it-with-EXPLANATIONS!-U0001f389
            var filter = new WordFilter(new string[] { "bat", "bar" });
            var index = filter.F("b", "at");
            Debug.Assert(index == 0);  // "bat"
        }

        public static void RunTestcase2()
        {
            // work on a test case
            // go over the example https://leetcode.com/problems/prefix-and-suffix-search/discuss/110053/Python-few-ways-to-do-it-with-EXPLANATIONS!-U0001f389
            var filter = new WordFilter(new string[] { "bat", "bar" });
            var index = filter.F("ba", "ar");
            Debug.Assert(index == 1);  // "bar" - index 1
        }

        public static void RunTestcase3()
        {
            // work on a test case
            // go over the example https://leetcode.com/problems/prefix-and-suffix-search/discuss/110053/Python-few-ways-to-do-it-with-EXPLANATIONS!-U0001f389
            var filter = new WordFilter(new string[] { "bat", "bar" });
            var index = filter.F("ba", "r");
            Debug.Assert(index == 1);  // "bar" - index 1
        }

        public class TrieNode
        {
            public TrieNode[] Children = new TrieNode[27];
            public int Weight;

            public static void Insert(TrieNode root, string word, int weight)
            {
                string wrapped = word + "{" + word; // { - 'a' = 27

                int end = 2 * word.Length + 1;
                for (int i = 0; i <= word.Length; i++)
                {
                    insert(root, wrapped, i, end, weight);
                }
            }

            private static void insert(TrieNode root, string word, int start, int end, int weight)
            {
                TrieNode node = root;
                for (int i = start; i < end; i++)
                {
                    int index = word[i] - 'a';
                    if (node.Children[index] == null)
                    {
                        node.Children[index] = new TrieNode();
                    }

                    node = node.Children[index];
                    node.Weight = weight;
                }
            }

            public static int Search(TrieNode root, string word)
            {
                TrieNode node = root;
                foreach (char c in word)
                {
                    int index = c - 'a';
                    if (node.Children[index] == null)
                    {
                        return -1;
                    }

                    node = node.Children[index];
                }

                return node.Weight;
            }

        }


        TrieNode root;

        public WordFilter(string[] words)
        {
            root = new TrieNode();

            for (int i = 0; i < words.Length; i++)
            {
                TrieNode.Insert(root, words[i], i);
            }
        }

        public int F(string prefix, string suffix)
        {
            TrieNode node = root;
            string searchWord = suffix + "{" + prefix;

            int weight = TrieNode.Search(node, searchWord);
            return weight;
        }
    }
}

Equity research: Morning hour - two hours a day

 Oct. 9, 2020

Introduction

It is important for me to understand where we are in economy recovery. The stock will have over 20% pullback anytime, and I like to continue to push myself to learn more about business. 

Oct. 9 2020 two hour equity research

I spent time to look into a few stocks this morning, NCLH, GME, VVPR, and SU.TO etc. 

IMO.TO and SU.TO vs BEP.UN: 1 Stock to Buy Now, And 2 Stocks to Sell

 Here is the article. 

Any company that makes money by selling oil will hurt. That includes best-in-class stocks like Suncor (TSX:SU)(NYSE:SU) and Imperial Oil (TSX:IMO)(NYSEMKY:IMO).

Sunocr and Imperial are both considered integrated oil companies. That means they control the entire value chain, including production, transportation, and refining.

Integrated oil stocks were traditionally strong. Diversification allowed them to minimize volatility and invest throughout the cycle. However, these strengths will not overcome falling selling prices.

It doesn’t matter how well-run a company is. If their profits are a direct function of commodity prices, they’ll suffer when those prices fall. With demand entering secular decline, the future will be difficult for fossil fuel businesses.

Brookfield Renewable (TSX:BEP.UN)(NYSE:BEP) stock is the best way to profit. If history is any suggestion, some companies will grow big enough to become the Exxon’s and Chevron’s of renewable energy. Brookfield has an early lead.

The biggest advantage this company has is experience. Since 2000, shares have posted double-digit annual gains, including a dividend that regularly exceeds 4%. Renewable energy is an emerging opportunity, but Brookfield already has a resume that you can trust.

Over the last five years, $1.5 trillion was invested in renewable energy infrastructure. Over the next five years, investment should total $5 trillion, growing even more as time goes on. Certain stocks will benefit from this massive growth market, and it won’t be oil companies.

Thursday, October 8, 2020

Understanding market risk: What if I have all those Canadian oil stock purchased after August 31, 2020


I could not forget how wall street was tough, and gave three days in the row after Sept. 3, 4, and 7 bear market, corrections over 10% on SPX 500 index. 

So SU.TO still has 19.10% loss compared to August 31, 2020, IMO.TO -21.56%. 

Here is youtube.com link. 
Here is second link. 



C# SortedSet class: Source code - Remember all APIs

 Oct. 8, 2020

Introduction

I love to play on stock market, today is the bull market day. I did not have chance to catch a rebound since I like to learn something to prepare for Google phone screen. I chose to go over those 25 hard level algorithm tagged with Google, and then I read my own code shared on Leetcode discuss. I like to read C# SortedSet class and SortedList class. 

C# SortedSet

It is the first time I spend time to read the source code. Here is the link. 


MRO stock: Marathon to lay off thousands amid COVID losses

 Here is the article. 

Marathon will lay off about 2,050 employees nationwide, the company announced in a filing Wednesday with the U.S. Securities and Exchange Commission. It also will stop operations at its refineries in Martinez, California and Gallup, New Mexico.

The layoffs will affect 12 percent of Marathon’s employees, the filing said. Most of the employees were notified of the layoffs Thursday, and most of the reduction will take place this month.

An anonymous source, however, told Reuters news agency that 60 people had been laid off from the Texas City plant and up to 200 people could ultimately be laid off there.

Kheiry called the Reuters report “speculation.”

Marathon and other petroleum companies have been hit hard by low demand during the COVID-19 pandemic, in part because of travel restrictions and work-from-home policies, as well as by downturns in oil prices.

Marathon lost $9.2 billion in the first six months of 2020 and is expected to post a $623 million third-quarter loss, according to Reuters.


IMO.TO vs BEP.UN stock: If the Stock Market Falls Again, Make These 2 Moves Immediately

 Here is the article. 

First, getting the rest of your financial house in order reduces the odds that you’ll make a poor long-term move. This may include pulling out retirement savings to meet short-term needs, or perhaps making a rash buy or sell decision based on near-term fear. Having a balanced financial position lets you keep your eyes on the future.

Second, understanding your financial risk allows you to strategically take more risk if the opportunity arises. Let’s say the stock market falls by 50%. If you have a time horizon of five or more years, this likely presents a fantastic buying opportunity. But you don’t want to overstretch yourself. Knowing where you stand financially empowers you to make bold, long-term decisions in a snap.

Consider Imperial Oil (TSX:IMO)(NYSEMKT:IMO). Shares fell 60% during the COVID-19 flash crash and have yet to recover. It’s not hard to see why. This company doesn’t control its own future. It lives and dies by the price of oil. Lower selling prices and high productions costs were always a source of danger for the business.

Then you have stocks like Brookfield Renewable (TSX:BEP.UN)(NYSE:BEP). Shares are 50% higher than when the year began. That’s because Brookfield’s renewable energy projects are low cost and typically have 100% contracted cash flows. That’s a recipe for resiliency in any operating environment.

GME stock: over 40% gains market price

 Oct. 8, 2020

Introduction

It is so excited to see GME stock market price gains in such short time. I spent over 10 minutes to look up GME on linkedin.com. It is very good market of video games, for kids and adults specially for coronavirus special time. 



Stocks Gain on Optimism Over Deals, U.S. Stimulus: Markets Wrap

 Here is the link. 

(Bloomberg) -- U.S. stocks rose to an almost five-week high as corporate deals helped fuel a global rally being underpinned by optimism for more fiscal stimulus. Treasury yields edged lower and the dollar was little changed.

Bulls are now back in control of a market that’s increasingly betting that a Joe Biden presidential victory and gains by Democrats in Congress will be good for equities. The scenario seems to be quelling volatility even as risks from a split in government to a resurgence of coronavirus cases threaten the economic rebound.



JMIA stock: 18% return on Oct. 8, 2020

M. W. F. 9:00 PM - 11:00 PM tennis sports

196 - 202 lb: weight control

196 - 202 lb: weight control - M. W. F. 9:00 PM - 11:00 PM tennis sports

 Oct. 8, 2020

I like to come out some very good ideas to control my weight. I have to eat less, and stay hungry all the time. And also I like to take more breaks to do some indoor workouts. 

Every day I should weigh myself a few time. Put my weight watch as highest priority. Everything will be under better control if I can control my weight. 

Also I need to control consumption of red meat, like port. What I can do is to add some wheat flour into red pork meat, so that I can make meat ball. 

I will eat less pork meat and then control my weight. I also need to reduce the consumption of whole chicken from Costco. The idea is the same, make chicken meat ball as well. 

First step, next two weeks I should put my weight under 195 lb. 

I will play more sports and also run more often. Take more walks as well. 



RKT stock: Why Rocket Companies Stock Lost 29% Last Month

FCEL stock: Why Renewable Energy Stocks Popped on Wednesday

 Here is the article.

Wednesday, October 7, 2020

Leetcode discuss: Number of Atoms

 Here is the link. 

Oct. 7, 2020
Introduction
It is time for me to start to work on 50 hard level algorithms in next four weeks. I came cross this algorithm, and I like to review my last practice two year eight months ago.

Code review
I will write a quick and short review for my last practice. Stay tuned.

public class Solution {
    public string CountOfAtoms(string formula) {
      
            string result = string.Empty;
            // "K4(ON(SO3)2)2"
            int open_brackets = 0;
            var d = new Dictionary<string, int>();
            var name_stack = new Stack<string>();
            var value_stack = new Stack<int>();

            for (int i = 0; i < formula.Length; i++)
            {
                string atom = string.Empty;
                //(H2O)2
                if (formula[i] == '(')
                {
                    open_brackets++;
                    name_stack.Push("(");
                    value_stack.Push(-1);
                }
                else if (formula[i] == ')')
                {
                    open_brackets--;

                    i++;
                    while (i < formula.Length && char.IsDigit(formula[i]))
                    {
                        atom += formula[i];
                        i++;
                    }

                    i--;
                    int mul = atom.Length > 0 ? int.Parse(atom) : 1;

                    if (open_brackets > 0)
                    {
                        var temp_name_stack = new Stack<string>();
                        var temp_value_stack = new Stack<int>();

                        while (name_stack.Count > 0 && name_stack.Peek() != "(")
                        {
                            temp_name_stack.Push(name_stack.Pop());
                            temp_value_stack.Push(value_stack.Pop() * mul);
                        }

                        name_stack.Pop();
                        value_stack.Pop();

                        while (temp_name_stack.Count > 0)
                        {
                            name_stack.Push(temp_name_stack.Pop());
                            value_stack.Push(temp_value_stack.Pop());
                        }
                    }
                    else
                    {
                        while (name_stack.Count > 0 && name_stack.Peek() != "(")
                        {
                            if (d.ContainsKey(name_stack.Peek()))
                            {
                                d[name_stack.Pop()] += mul * value_stack.Pop();
                            }
                            else
                            {
                                d.Add(name_stack.Pop(), mul * value_stack.Pop());
                            }
                        }

                        name_stack.Pop();
                        value_stack.Pop();
                    }
                }


                else if (char.IsLetter(formula[i]) && char.IsUpper(formula[i]))
                {
                    atom += formula[i];
                    i++;

                    while (i < formula.Length && char.IsLower(formula[i]))
                    {
                        atom += formula[i];
                        i++;
                    }

                    string value = "";

                    while (i < formula.Length && char.IsDigit(formula[i]))
                    {
                        value += formula[i];
                        i++;
                    }

                    i--;
                    int m = value.Length > 0 ? int.Parse(value) : 1;
                    if (open_brackets > 0)
                    {
                        name_stack.Push(atom);
                        value_stack.Push(m);
                    }
                    else
                    {
                        if (d.ContainsKey(atom))
                        {
                            d[atom] += m;
                        }
                        else
                        {
                            d.Add(atom, m);
                        }
                    }
                }
            }

            while (name_stack.Count > 0)
            {
                if (d.ContainsKey(name_stack.Peek()))
                {
                    d[name_stack.Pop()] += value_stack.Pop();
                }
                else
                {
                    d.Add(name_stack.Pop(), value_stack.Pop());
                }
            }

            d.OrderBy((x) => x.Key).ToList().ForEach(y =>
            {
                result += y.Key;
                if (y.Value > 1)
                {
                    result += y.Value;
                }
            });

            return result;
        }
}

1531. String Compression II

 Oct. 7, 2020

Introduction

I came cross this algorithm as a Google phone screen algorithm on Leetcode discussion post, so I like to spend time to work on. 

A few good ideas

I like to read carefully the following two discussion post. 

One is in Chinese. Another one is written in C#. 

Here is the solution I like to learn from. The player is top 2000 in Leetcode weekly contest. 



ENBL stock: Hold less than two weeks - too short to be an investor

INTC stock: Do not try to beat the market!

 Oct. 22, 2020

It is easy for me to come out my intel stock purchase history. As an investor, I have to learn so many lessons. I have so many money management issues, all those shows up in my management of Intel stocks. 

My purchase history

I started to purchase one time 170 shares. It is almost 50% of my IRA Ameritrade.com account balance. It went down 10% next 30 days. I was patient to wait and started to read more about Intel as a business. 



NCLH stock: Beginner mistake - one week to hold, two weeks 10% up


 NCLH has potential to bring into $3/ share capital gains from Sept. 18 to Oct. 9, less than one month. I did purchase 240 shares, but I was in panic since pullback. I sold all 240 shares at price of $15.82 on Sept. 26, 2020. Otherwise I would have capital gains of near $720 dollars in less than one month. 

I do believe that the article talking about re-sail of NCLH after restriction of coronavirus helped a lot of retail investors to bet on stock for short term return. 

I should stay calm and then expect possible big gain instead of selling those stocks purchased at lowest price. 

3 weeks 30% gains - NCLH - Sept. 2020


Sept. 24, 2020 NCLH price was at $14.35. Now it is more than 30% gain in less than three weeks. Oct. 9 close price is $18.73.