15 Mar 2020

Selling stocks during a crisis

History / Edit / PDF / EPUB / BIB / 5 min read (~920 words)

Should I sell my stocks during the coronavirus crisis?

Most advise that one should invest for the long term and that they should have a diversified portfolio. They mention that many studies demonstrate that it's not possible to time the market.

However, when a crisis as big as the coronavirus hits, it's important to assess its impact on your portfolio as a whole. What kind of assets are you holding? In what industries? What are the impacts the coronavirus might have on that business? How long have these businesses taken to recover from prior crashes (given more weight to the recent ones)? How likely am I wrong in my assessments of the situation?

I currently hold stocks in airline companies. I would assess that air traveling is likely going to take a large hit for most of March and April. Except if the governments were to step in to reduce the bleeding of those companies, I would press the eject button and save whatever money I have left in those stocks. It took about 5 years for airline companies to recover from the 2007-2009 crash. Some companies almost went bankrupt. They definitely recovered and some went to make 4000% from their lowest value.

If you kept your money in those stocks, you would have spent about 7 years of time returning you nothing (ignoring dividends here). Instead, if you sold at any point during the downward movement and bought the stocks at the same price you sold them when they went back, you would have avoided going further down. Furthermore, if you had decided to purchase those stocks at a lower point, it would have taken you less time to make your money back.

Here's an example:

In January 2007 you buy 10 stocks for 60 CAD each, totaling 600 CAD. One year later the stock is worth only 20 CAD. You sell them all. You now have suffered a loss of (60 - 20) x 10 = 400 CAD and have 200 CAD left. Half a year later the stock is now worth 2 CAD. If you had instead decided to sell then, you would have 2 x 10 = 20 CAD, suffering a loss of 580 CAD.

Now, let's see what happens when the stock starts to go up again. Five years later, the stock went from 2 CAD to 20 CAD. Had you sold the stock at 20 CAD, there would be no difference for you. Had you sold the stock at 2 CAD you would have "suffered" the opportunity cost of (20 - 2) x 10 = 180 CAD. If at any point (having sold the stock at 20 CAD) you had decided to buy back the stock, you would be making money, or should I say, recovering from your loss. As an example, if you had bought 20 shares at 10 CAD (for a total of 200 CAD), you would now have 400 CAD. You would still be 200 CAD down the drain from your initial investment, but you would be on your way to recovery.

Three years later the stock price has recovered back to 60 CAD. If you had never sold, investing in this stock would have been a cost of opportunity in investing in other stocks. If you had sold at 20 CAD and started investing when it reached 20 CAD again, you would have made 10 x (60 - 20) = 400 CAD. You would be back to square 1, without any gain or loss. The benefit you would have had during the period you had sold your stock is that you wouldn't have to check if the stock was going lower. Had you however invested your 200 CAD to buy 20 stocks at 10 CAD, you would now have 20 x 60 = 1200 CAD. You would have doubled your money!

In summary, staying in the market during the crash means that you will not make any money while the market recovers, which can take months if not years. If you instead get out at a loss and wait for it to go down, then buy in (let's say after a 10% drop in the price you sold)

This is obviously the optimistic scenario. In the pessimistic case, as you sold your stocks, the stocks would go on to recover immediately and make enormous gains.

My assessment of the options I have and their associated risks:

  • Staying in the market and having to wait for months or years for the stocks I own to return to their original value, which implies years of wasted potential for profits on this original investment while at best receiving dividends from companies that have them.
  • Leaving the market, at the cost of a loss (which half of it can be used toward your taxes if you live in Canada), at the risk of the market going up again and potentially reducing my loss, or in the worst case, going above my prior profits.
  • Reducing my position in stocks that are highly likely to be very impacted by the coronavirus, being a half-half position, where stocks that are expected to still perform during the downward period are kept and those that are too volatile and negative trending are sold as soon as possible.

Note: This is not actual advice. This is only me trying to reason about the situation.

14 Mar 2020

Apparition of language

History / Edit / PDF / EPUB / BIB / 2 min read (~258 words)

When did language appear?

According to articles cited on Wikipedia, language would have first evolved around 50,000 to 150,000 years ago.

Given how we've evolved from single cells into multicellular organisms, there is likely a point we reached where communication between cells had to occur in order to get things done (e.g., survive).

As we got more and more complex, some specialized communication developed itself (e.g., nerves) so that some cells were responsible for decision and communication while others were responsible for doing.

With the apparition of the brain, decision making centralized in a single location away from the parts it controls.

For a while those systems might have been reactive, animating us but not giving us any control over those actions.

We reached a stage where large multi-cellular organisms were living together and still had to communicate with one another. Using chemical/electrical signaling was not an option anymore, so we made use of gestures and sound.

13 Mar 2020

Internal voice

History / Edit / PDF / EPUB / BIB / 2 min read (~287 words)

Why do we have an internal voice?

A study found that this internal voice is reported most frequently for self-regulation (e.g., planning and problem solving), self-reflection (e.g., emotions, self-motivation, appearance, behavior/performance, and autobiography), and critical thinking (e.g., evaluating, judging, and criticizing).

This inner dialogue is a form of internal collaboration with oneself.

Neural imaging seems to support Vygotsky's theory that when individuals are talking to themselves, they are having an actual conversation.

I would be tempted to say that we have an internal voice because language is our way to survive. It allows us to process information coming from the world and turning it into actions. Although our ancestors most likely did not have advanced language as we do today, they had some form of language they could use to communicate. Much like cells in the body communicate with each other through chemical/electrical signaling, this internal voice is our way to communicate with ourself.

12 Mar 2020

Systematically apply processes

History / Edit / PDF / EPUB / BIB / 3 min read (~453 words)

How can I be systematic in applying processes?

The first step is to always make your processes explicit. Write the various steps you go through while doing something. First, simply write down those steps as you do them. Then indicate the dependencies between the steps. You may notice that some steps can be done earlier in the process if all their dependencies are already completed.

As you write down more and more of your processes, make sure that you can easily refer to them. If possible, keep them in a centralized location where it is easy for you to edit them. In my case, I write my processes in this blog.

When you begin doing something which you've never done before, create yourself a document and write down the steps you are doing as you do them. Once you are done with the task, save your document.

When you begin doing something for which you already have a process in place, open up your process document and quickly glance at it. Start going through the process without using the document and jot down what you do. After you are done, look at what you did and compare it against the existing process. Is it the same or has something changed? Did you forget to do something? Did you do something new? Did you change the order of some of the steps? Apply the changes you think are useful to your process and repeat this discovery phase a few times.

After you've established a process, you can simply open the process document and follow it. If you notice that some steps are still missing, do add them to the document. If you version control your processes, you will be able to observe how it evolves over time.

One benefit of making your processes explicit is that it allows you to stop doing them for an extended period of time. When you need to do them again, you can simply look at them again and know what you need to do. It is also beneficial if you work in a team where you could delegate some of those processes to other people.

11 Mar 2020

Tools I use at work

History / Edit / PDF / EPUB / BIB / 4 min read (~699 words)

What tools do I use daily at work?

  • Notion.so I use Notion.so to track my day to day tasks and their progress. I also use it to write down any idea I have during the day that I would like to explore at some point in the future. I've described my task management system in more details.
  • JIRA I work in a corporate environment, which means that we need to track tasks and assignments through a shared system. That system is JIRA. I don't particularly like JIRA after having used redmine for 5+ years and liking it. JIRA is slow, complex and cumbersome, which makes me avoid it at all costs. It's a shame, given that task management is one of the most important things in a software development business.
  • Visual Studio Code I use VS Code to take notes throughout the day as well as to edit files from time to time.
  • PyCharm My current job is mostly about writing python code, and PyCharm is the best IDE to do that. I use it to implement new functionality, write tests and debug issues. It is highly customizable which makes using it a joy. I also make use of the run/debug configurations regularly to test a variety of cases over the lifetime of the projects I work on. Finally, because I've used PHPStorm in the past, transitioning from PHPStorm to PyCharm was easy and painless.
  • iTerm2 I spend a good part of my day interacting with various CLIs. I use a Mac and the terminal simply doesn't cut it for me and I prefer interacting with GUI tabs over having a tmux.
  • Chrome Anyone doing software development spends a large portion of their time online looking for solutions to their problems/questions. I use Chrome mostly to use the Google suite, to use Jira/Confluence or to look at reports generated by the tool I work on.
  • Google suite (Gmail, Docs, Sheets, Slides) I work in a collaborative environment which means writing and reading documents to share ideas, data, requirements and notes with others.
  • Slack Working with others means communicating with others. While it's possible to talk directly to my teammates, sometimes it is more respectful to simply send them an instant message asking them to come to see you when they are available. Slack also allows communication with people in other teams, as well as people that are in separate offices.
  • GitHub We use git exclusively at work as a way to do version control. We use GitHub as our central location to share our repository, as well as to do code reviews.
  • Drone Whenever I push code to GitHub, Drone makes sure that a variety of tasks are executed to ensure code quality: linting, code formatting, type checking, unit/function/integration tests and documentation building. Having a build system reduces the time between faulty code is pushed to GitHub and the code being fixed.