Last time, we explored how a simple MLP neural network could be used to classify the MNIST dataset. Today, we will work on a messier problem. We will use a modified version of the Stanford dogs dataset to train a neural network that can classify dog breeds. Since inter-class variations are small, and an obscure detail could be the deciding factor, we will need a model that can capture more detail. This is where convolutional neural networks (CNN) come in.
As always, we will start by explaining some of the high-level concepts. You can follow along with the code here.
Continue reading “Programming #12: Convolutional Neural Networks”
In 1962, Warren Buffett began purchasing shares of Berkshire Hathaway – a textile manufacturing company in the process of downsizing. In 1965, after feeling slighted by management, Buffett acquired control of Berkshire. In 1967, Berkshire purchased an insurance company and began using its float to fund investments. Through acquisitions and investments, Berkshire’s share prices would appreciate from $8 in 1962 to $276,800 in 2017 (20% annualized).
This post begins my series on Berkshire Hathaway. The goal is to gain some insight into one of the most successful companies in modern history. We will be looking at Warren Buffett’s shareholder letters which can be found here.
Links to Buffett’s partnership years: 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968
Continue reading “Investment Theory #16: Berkshire Hathaway’s 1977 Letter”
The resiliency of the economic expansion continued throughout the third quarter. GDP growth remained steady, unemployment remained low, the US dollar weakened, and the Fed remained on track for its second interest rate hike of the year. On the other hand, geopolitical concerns increased, the chance of tax reform decreased, and market valuations rose to a level that leaves little room for error.
As always, I have no idea what the near-term future will bring. This post is merely an attempt to see if we are closer to the top or the bottom of the economic cycle.
Continue reading “Analysis: Q3-2017 Macro Update”
In this post, we will attempt to conceptualize Deep Neural Networks (DNN) and apply one to a common problem. We’ll train a version of a DNN called a Multilayer Perceptron (or vanilla network) to classify images from the MNIST database. The MNIST database contains 70,000 handwritten digits from 0-9 and is one of the most famous datasets in machine learning. If all this sounds confusing so far, don’t worry we’ll start at the beginning.
If you want to follow along with the code, the notebook can be found here.
Continue reading “Programming #11: Deep Neural Networks”
Now Inc. (NYSE: DNOW) hit $11.85 today and I began to build a position. This document contains an independent analysis of the company. Information on my investment philosophy can be found here.
Continue reading “Analysis: NOW Inc. (NYSE: DNOW)”
In Competition Demystified, Bruce Greenwald and Judd Kahn simplify Michael Porter’s five forces framework (threat of new entrants, threat of substitutes, customer bargaining power, supplier bargaining power, industry rivalry) into a single force from which all others derive: barriers to entry. According to the authors, there are three sources of this competitive advantage:
- Supply Advantages: Lower input costs, proprietary technology, complicated processes, etc.
- Demand Advantages: Captive customers, habitual products, high switching costs, high search costs, network effects.
- Economies of Scale: High fixed costs spread across high market share.
Continue reading “Book Review: Competition Demystified”
Say we throw a ball up in the air and want to predict what will happen next. Newton tells us that transferring kinetic energy to the ball will accelerate it upwards, and the force of gravity will accelerate it downwards. We can confidently say the ball will eventually come back down to earth. Now, try predicting what would happen to the ball if instead, a random survey of the human population decided its movements. If more people felt like the ball should go up it would go up and vice versa.
There is no shortage of forecasters who would take a simplified approach to this problem – just assume the physics bound world and ignore the human element. Eventually, the two should match up. We can think of this as the efficient market camp. Contrast that to the behavioral camp, which focuses primarily on the human element. They note that the fear and greed of a crowd can push the ball to further extremes than the constraints of physics would suggest.
Our goal today is to predict where that economic ball is going. We will borrow from both camps, while not forgetting that this is an exercise in art, not science. We can’t predict where the ball is going nor when it will get there with any certainty, but we can get a decent idea of where the ball is. If the ball is closer to earth, odds are it will begin its journey upward. If the ball is closer to space, odds are it will begin its journey downward. Give or take ten years.
Continue reading “Analysis: Q2-2017 Macro Update”
Let’s continue our series on the 1990’s. You may recall that 2000 was the year the bubble popped and Klarman began putting his large cash balances to work.
Klarman is a well-respected value investor who founded the Baupost Group in 1982. Since then he has generated an average annual return of 19%. Klarman’s investing philosophy can be summed up by the title of his book Margin of Safety: Risk-Averse Value Investing Strategies for the Thoughtful Investor.
This series of posts will reflect on Klarman’s activity during the period 1995 to 2001. Links to past posts: 1995, 1996, 1997, 1998, 1999
Continue reading “Investment Theory #22: Klarman’s 2000 Letter”
In economics, there is a simple idea called the Cobb-Douglas production function that tries to explain the relationship between labor (the total number of person-hours worked), capital (the real value of all machinery, equipment, and buildings), total factor productivity (the ability to produce more output with less input), and the total output of an economy. The idea is that since labor and capital are relatively fixed, economies grow by increasing their productivity, which technology is the main driver of.
Continue reading “Economics #8: Cost Disease”
Sudoku is one of those NP-Complete problems that brute force solutions have a problem with. Consider a board with a single blank space, we would have to work through 9 possibilities to find the right answer. For two blank spaces, we would work through 9 possibilities for the first space, and then for each of those possibilities, 9 for the second.
This simplifies to a time complexity of O(n^m) where n is the number of possibilities for each square (9 in normal Sudoku) and m is the number of blank spaces. A hard Sudoku problem with 50 blank spaces would take about 5.15 * 1047 computations, which would take longer than the age of the universe to solve with a decent computer.
This is where artificial intelligence (AI) comes into play. Think of AI less as a Skynet robot and more as a set of hacks to solve exponential problems like Sudoku. Code for this post can be found here.
Continue reading “Programming #10: AI Sudoku”