Analyzing the housing market

# PHYS291 assignment - Analyzing the Housing market

### 1.0 Intorduction

A common dream in Norway is to be able to one day own your own house. For some its a large private house, for some its an apartment. For the generation now trying to enter the housing market, it seems to be much harder than it used to be for previous generations. The biggest differece seems to be the inflation of realestate prices compared to income. In this assignment, I will take a look at how the average income has developed over the last 20 years, and compare this to how much prices for different types of housing has developed. I will also take a look at interest rates, to see if they have any effect on pricing. The data was collected from SSB, but from a few different files, as they usually track for 3-7 years at the time. I have therefore compiled all the info in a single file. The data from pre 2004 might not be 100% accurate, as it looks like they were tracking a bit differently back then, but it still gives a good indication.

### 2.0 Code files

Press here for Complete code files
The file main.cpp contains all the code, and the file all_numbers.txt contains the datasets. The file main.cpp reads the all_numbers.txt file, and sorts them into arrays for further use, mostly to compare and divide between them.

### 3.0 Analysis and plots

#### 3.1 Salary and housing prices

The first ting to look at is the development and housng prices. The data goes from 1999-2018, and the housing prices goes for all types of housing, whether it is an apartment or a house, old or used.

As seen in the graph, there is a drasitc increase in how much you would have to pay to own a house or apartment in 1999, than in 2018.

#### 3.2 Ratio between salary and housing prices

Then I wanted to find the ratio between salary and housing prices, and I also wanted to look at and compare prices if you bought a brand new house, or bought a "used" one. I also looked at the average price for all types of housing sold, which is the same same numbers as in the graph above.

The numbers for houses here are given pr square meter, so i multiplied them by 150 to give an indication as to how much you would have to pay for a medium size house, compared to the average salary for that year. As we can see, the price for new houses just keeps on increasing, and the ratio between salary and housing price is now twice what it was in 1999. As for used houses and the combined average, the increase is not as large, but still over 50%. It can also be noted that both the combined cost of all housing and Used houses took a small dive in 2007/2008 until 2009 which is when the housing market collapsed in USA, and that had an impact here as well.

#### 3.3 Salary and debt

Then I wanted to look at the average households debt, to see if this han increased over the years. I put both salary and debt in the same graph, to give a good representation.

As seen in this graph, there has been a steady increase in both salary and household debt, but the increase in debt is bigger, especially after 2016. The housing market was at a high in 2016, so it makes sense for a steeper increase that year. For the numbers before 2004 here, it is important to note that a few of the numbers were missing from the debt side, as SSB only tracked every other year until 2002. The numbers for 1999 and 2001 are therefore an average of the year before and after.

#### 3.4 Interest rates

Lastly, I wanted to see if the interest rates for mortgage would affect this, or if it was possible to see a correlation between interest and pricing.

From the looks of this graph, compared to the others, it looks like a higher interest rates gives lower housing prices. As mentioned above, the dip in prices in 2007/2008 match that of the increased interest from 2006 and until the housing market crash in 2008.

### 4.0 Summary and Conclusion

As a summary of everythin found in this assignment, I would say it is a lot harder for the people entering the housing market today, than it was 20 years ago. Having to pay up to 9 times the average salary for a new home is a lot. We can also have a look at the interest rates, and see that prices go up when interest rates go down.

#### 5.0 Sources

Codes Loan1 Loan2 loan3 Square meter prices Salary Price all housing Interest Rates