How is the Bursting Housing Bubble in Brazil affecting construction companies stocks ?

Anderson L. Amaral
12 min readJun 3, 2018

The housing sector in Brazil continues stagnant: in 2017, when I published this analysis showing how badly the PDG situation (BVMF: PDGR3) , the next day, by coincidence, it declared judicial recovery, expecting a bailout. Now, in 2018, in addition to PDG again, I present a brief analysis of nine other Brazilian construction companies and how their stocks will perform for the next 12 months, using Monte Carlo Simulation and Phophet, a type of GAM — (generalized additive model) that according to its developers (Facebook Academics, Feb — 2017), makes predictions with several advantages over ARIMA models. Disclaimer : it is not really difficult to carry out this kind of analysis, as housing bubbles behave pretty much the same anywhere, and once Japan, U.S.A, UK and Rep. of Ireland had all been there already (and some are going there again) it is easy to relate one thing to another.

This analysis will not take into account the following factors that are very likely affecting the housing market thus the construction companies stocks, such as:

1 — Recording of surplus (way too many houses and apartments were not sold);

2 — property loss due to lack of mortgage payment(the owner loses it, the property goes to auction, always for a cheaper price;

3 — Declining birth rate (1.78 only, according to IBGE );

4 — Zika virus crises in 2016, unofficially affecting even more the birth rate ;

4 — decoupling between the price of real estate and population average income ;

5 — Commercial real estate becoming residences : thanks to e-commerce growth;

6 — population in general perceiving the house purchase and mortgage as no longer an investment(people are more and more moving out for employment);

7 — impact of the “Shared Economy” (Airbnb and others) in the sector.

8 — People losing their jobs thus failing at paying their mortage (then again: properties going for auction for cheaper prices).

9 — Government having difficulties in putting into practice austerity measures.

10 — Imminent Global Crisis

These aforementioned factors, as well as macroeconomic data, would fit much better in a machine learning model, which is beyond the scope of this short article (and because I would also need more reliable data), on which I focusing on time series analysis only.

First, I downloaded the stock prices using Yahoo!Finance . Obviously, there are easier ways to have access to this data set (Google Finance, Quandl and etc), however, as my other stock price analysis was using Yahoo!Finance, I decided to stick to it again. Apparently, the current library in Python 3.X does not go well with Yahoo, therefore, below, I placed a piece of the code to download PDG.3 stocks and consequently all the other stocks .

Then, obviously, I call the aforementioned stock, and this can be repetead to any other :

From now one is usage of Pandas and basic statistics (p-values, interval confidence, Monte Carlo and on so on that can be found in any Python for Financial Analysis book. Therefore, I focus on the stock prices.

As we can see, it has not changed much from last year. With every government announcement about the sector, there is a spike in the chart. In early April, most likely due to the government’s increased funding limit mortgages , the PDG3 stock price (and other homebuilders as well) had a spike, but it soon went back to previous price.

On the left side, the volume traded, which is also influenced by the news.

Below, I am placing the moving average (MA = Moving Average). Recalling the importance of the same that can be seen in the Investopedia: http://www.investopedia.com/terms/m/movingaverage.asp. I calculated the moving average for 10, 20 and 50 days. :

Here I used the percentage, so it refers to the percentage of gain or loss you had on the stock on that day. Note: we can see clearly the very high gains for those who have entered the wave of speculation with the PDG stocks in the last weeks, boosted by the news of the government trying to help the sector.

Now, comparing the companies stocks to each other:

On the left there is a correlation chart. Doing the first test, I see that, as expected, the stocks have perfect correlation, demonstrated by Pearson Number = 1 and p = 0, because , obviously I’m comparing PDG with PDG prices. Just to test it.

Now comparing PDG with EzTec, we see a Pearson Number of 0.24. It is worth remembering that the Person’s Coefficient is a measure of the linear dependence (correlation) between two variables X and Y. And more can be understood at the link: https://en.wikipedia.org/wiki/Pearson_correlation_coefficient


The Person's Coefficient is the measure of the linear dependency (correlation) between two variables X and Y. And more can be understood in the link.



Comparing PDG with EZTEC, we see a Pearson-nr of 0.24. It is a relatively low correlation when comparing builders, which is expected, since the construction company EZTEC has always been among the most solid in the market, unlike PDG, in judicial recovery.

How about comparing EZTEC with Cyrela?




Pearson's number between the two is much higher! Well, I'm not going to make any speculation, but it's obviously interesting.

How about Cyrella and Even?

And how about now see the return correlation of the 10 biggest housing companies?

In short, by looking at the Cartesian coordinates (each company is on the X and Y axis), we notice that the higher the correlation between the returns of a construction company, the more similar it is to the KDE graph. The same for the stock prices in the trading session, below:

However, what about a chart showing a “Trade-off” between Risk and Return ?

I am aware that this is not the most “aestheticallyappealing chart , however, one must agree is pretty informative and easy to understand:

Interesting that few weeks after the similar study I published in Portuguese , things have already changed again! What is not a surprised , due to so many turbulent social events happening in Brazil : national strikes, increasing national debit , lack of investors confidence, elections approaching , dollar rising and so on.

We can see that Rossi has gotten worse in the last 13 months. Perhaps the record of empty apartaments which were not sold, the lack of efficient credit analysis (leading to the sale of apartments in the plant — those non-fully-built- for those who could not afford it), the record in cancelled sales and return of apartaments due to the default in mortage payments were surely a cause, as well as the general worsening of the sector have affected it more than the other companies?

Everything indicates that yes, since these were the factors that led PDG to judicial recovery (as my publication practically warned, 1 day before it happens, in 2017).

Apparently, Rossi is about to be next on the list. Still in this “Trade-off” of Risk X Return, Tecnisa and Helbor seem to be both the best options.

Obviously we cannot count on PDG (as aforementioned , they officially declared to be under judicial recovery), but I left it there on the chart just for you to see on which stage the company is right now. By the way, it is worth to remind you that my previous article predicted that PDG would apply for judicial recovery ONE DAY BEFORE it really happened, as I commented on my own text a day after : click here (unfortunately, in Portuguese only) .

Ps: Yes, I like to mention it. I was obviously monitoring a couple of things before it happened and it worked.

However, If one just wants to minimize possible losses, what are the best stocks ? Maybe studying the quantiles to know the financial return on numbers of each share must a better way.

Beside I am just placing a snip of the last days of each stock. For someone who likes to read “between the lines” you already can see the difference among them…

Perhaps, before I go deep into the subject, I should express here the basics about p-value and confidence interval: The p -value a number between 0 and 1 and is interpreted as follows: A small value of p (typically ≤ 0.05) indicates strong evidence against the null hypothesis, so you reject the null hypothesis. A large p value (> 0.05) indicates weak evidence against the null hypothesis, so you do not reject the null hypothesis. Values ​​of p very close to the cut point (0.05) are considered marginal. Regarding the confidence interval, it should be remembered that: when 95% confidence that the actual value of the parameter is in the confidence interval, it means that 95% of the observed confidence intervals have the actual value of the parameter. Taking any particular sample, the unknown population parameter may or may not be in the observed confidence interval. So, below I continue the analysis:

EZTEC: The empirical quantil tells us that the daily return is at -0.0413. That means that with a 95% confidence, our worst daily loss will not exceed 4.13%. Thus, 1 million reais invested in EZTEC gives about 0.0413 * 1,000,000.00 = R $ 41,300.00 of maximum daily loss, with such a confidence interval.

I am calculating now the same for all the other stocks :

Surprise??!! No really…

A month ago, the title of my second article in Portuguese was “Rossi ou Gafisa podem ser a próxima “PDG” (Rossi or Gafisa may be the next “PDG” : I meant, the next under judicial recovery). What is happening now, 5 weeks after ? Rossi has pretty much THE SAME predicted daily loss. Meanwhile, Gafisa is doing even worse and has the highest loss among all the stocks, with over 5% per every million or around R$55.624 mas maximum predicted daily loss .

By the same information above we can also see that MRV , Direcional and Tecnisa are the safest to invest in order to avoid losses.

As I promissed, I am going now for a Monte Carlo Simulation in order to understand it better

ROSSI (RSID3)

GAFISA (GFSA.3)

That is, knowing that 99% of the values ​​should be in this range (which is not small), you can see how volatile the GFSA3 is.

However, if I use Prophet, Facebook Academics' Open Source project, which was released about a year ago, for time series, would I have been similar? We will line it some lines below.

One more simulation (as this article is just an small part. I obviously have everything document to my own deep conclusions and personal investment) that I am placing here is the Tecnisa one:

Tecnisa (TCSA3)

A different approach now : PROPRHET! First of all, it pays to read the page about this algorithm here. And of course, the article published, about the same, here.

This is a brief analysis only using Prophet, therefore, I am focusing on Rossi stocks :

In other words, with lower volatility, the Prophet charts behave more similarly to the Monte Carlo simulation of price prediction. But the question is not this, but the fact that Prophet runs much faster than a Monte Carlo simulation in general. And it is also much less “verbose” for a simple prediction of prices over time. In relation to the construction industry, I do not intend this small medium article to be report recommending certain investments. That RSID3 and GAFS3 are in this situation, a lot of people already knew. And most probably the insights that I put in the beginning are worth more than all those calculations and graphs that I put later, for someone who thinks in the long run.

I do think that the construction sector in Brazil (an many other countries, such as Japan) is doomed to stay a long time in decline or stagnation due to aforementioned reasons. However, for those who are cold-blooded for a Day trade, I have simply shown above that Python-Pandas, combined with libraries such as Seaborn and Quandl (I took stock quotes above by Yahoo! Finance, but Quandl does the same , as I mentioned in last year’s article) are good and easy tools to deal with daily basis analysis.

But again, I honestly would not buy a house anywhere in the world right now. We are all seeing that the world has several housing bubbles about to burst, millenials are less and less leaving home later than privous generations , thus affecting the number of empty houses. Also, soon we are having 3D printed houses making much easier and cheaper to build up a one (if need you too) and that will be more interesting than spending 100k , 200k , half million with properties to use or “invest”.

Besides I believe the U.S College bubble will burst in few years, and will bring the second housing bubble together. The same is expected for Australia, Canada, Rep.of Ireland and U.K. Inflation in the U.S is all the way up and treasure bonds will soon start paying more. What about Italy leaving the EU in few months ? What about the ghost cities in China ? This is not a healthy scenario at all: governments around the world spent way too much money and the bill is about to come.

In countries such as Brazil, even more, makes much more sense renting or investing in anything else than houses and apartaments. Our real interest rate is around 4% per year (Bonds minus inflation). You absolutely CANNOT have 4% net annual return being a home owner in Brazil right now. Let’s say : if you have 1 million BRL invested, you can easily get like 0.5% per month return in the most conservative investment (saving accounts and bonds) , or 5k monthly, still keeping the main capital. Yet, rents are giving only around 0.25% return , as you can check here : if a property costs the same 1 million , it won’t have a rent of 5k, but lower! That means with the same 1 million invested, you could still pay for the rent of the same property and keep your capital!

I also believe that some startup companies are going to be the responsible for the end of the construction sector the way we know, including the growth dependence of the countries based on this: a heated construction sector won’t be a predictor of a country growth anymore. That is my bet.

Finally, the metrics used here can be applied to any other stock. And even the insights of the opening paragraph, if all gathered in a reliable “Data Lake” could perhaps be the source of a machine learning model for a regression that could predict the price, which would yield a much better result than any temporal analysis.

--

--

Anderson L. Amaral

Data Science Consultant , Brazilian Jiu-Jitsu brown-belt. Writing for fun !