Home builders Stocks as of 8/30/2018

작년 이맘때보다 모게지 금리가 80 포인트 베이스 상승했습니다.

https://fred.stlouisfed.org/series/MORTGAGE30US#0

일단 홈빌더 주식들이 하락한것은 시장에서는 주택시장이 하락할것으로 예상하고 있습니다. 홈빌더의 주식은 10% 에서 20% 가량하락해습니다. 이것은 주택시장의 쿨다운을 시장은 예상하고 있습니다.

http://etfdb.com/type/sector/materials/homebuilders/

DHL LEN NVR PHM TOL KBH

2007-12-31 -47.732473 -63.991166 -13.6026381 -67.133566 -36.195926 -54.9031180

2008-12-31 -44.854122 -49.840215 -12.9293893 5.015468 6.829517 -34.3600804

2009-12-31 56.123686 49.681235 55.7720596 -8.508703 -12.225873 2.1461327

2010-12-31 11.163752 48.294569 -2.7704692 -24.799986 1.010123 0.4691123

2011-12-30 7.139115 5.734973 -0.7264652 -16.090445 7.473689 -48.8717548

2012-12-31 59.500091 97.916694 34.1107872 187.797248 58.325180 138.3307382

2013-12-31 13.739675 2.749150 11.5228272 13.140396 14.444767 16.3234351

2014-12-31 14.310820 13.741847 24.2999526 6.568453 -7.378364 -8.9230000

2015-12-31 27.860780 9.509387 28.8294055 -15.556872 -2.830473 -24.9599428

2016-12-30 -13.667535 -11.906478 1.5824711 5.140536 -6.906909 29.1857416

2017-12-29 89.055639 50.278024 110.1989198 83.432056 55.852288 103.0458577

2018-08-30 -12.080127 -17.859522 -23.6188113 -15.556325 -23.971507 -22.2883068

Note: For 2018, the figures are as of 08/30/2018

D.R Horton (DHI)

https://www.macrotrends.net/stocks/charts/DHI/dr-horton/stock-price-history

https://finance.yahoo.com/quote/DHI?p=DHI&.tsrc=fin-srch

Lennar (LEN)

https://www.macrotrends.net/stocks/charts/LEN/lennar/stock-price-history

https://finance.yahoo.com/quote/LEN?p=LEN&.tsrc=fin-srch

NVR (NVR)

https://www.macrotrends.net/stocks/charts/NVR/nvr/stock-price-history

https://finance.yahoo.com/quote/NVR?p=NVR&.tsrc=fin-srch

Pulte Group (PHM)

https://www.macrotrends.net/stocks/charts/PHM/pultegroup/stock-price-history

https://finance.yahoo.com/quote/PHM?p=PHM&.tsrc=fin-srch

TOLL Brother (TOL)

https://www.macrotrends.net/stocks/charts/TOL/toll-brothers/stock-price-history

https://finance.yahoo.com/quote/TOL?p=TOL&.tsrc=fin-srch

KB Homes (KBH)

https://www.macrotrends.net/stocks/charts/KBH/kb-home/stock-price-history

https://finance.yahoo.com/quote/KBH?p=KBH&.tsrc=fin-srch

Three Countries: Korea vs Japan vs China

The following codes would generate the charts in python.

import wbdata
import pandas
import matplotlib.pyplot as plt

#set up the countries I want
countries = [“CN”,”KR”,”JP”]

#set up the indicator I want (just build up the dict if you want more than one)
indicators = {‘NY.GNP.PCAP.CD’:’GNI per Capita’}

#grab indicators above for countires above and load into data frame
df = wbdata.get_dataframe(indicators, country=countries, convert_date=False)

#df is “pivoted”, pandas’ unstack fucntion helps reshape it into something plottable
dfu = df.unstack(level=0)

# a simple matplotlib plot with legend, labels and a title
dfu.plot();
plt.legend(loc=’best’);
plt.title(“GNI Per Capita ($USD, Atlas Method)”);
plt.xlabel(‘Date’); plt.ylabel(‘GNI Per Capita ($USD, Atlas Method’);

 

#set up the countries I want
countries = [“CN”,”KR”,”JP”]

#set up the indicator I want (just build up the dict if you want more than one)
indicators = {‘NY.GDP.MKTP.CD’:’GDP in current US dollars’}

#grab indicators above for countires above and load into data frame
df = wbdata.get_dataframe(indicators, country=countries, convert_date=False)

#df is “pivoted”, pandas’ unstack fucntion helps reshape it into something plottable
dfu = df.unstack(level=0)

# a simple matplotlib plot with legend, labels and a title
dfu.plot();
plt.legend(loc=’best’);
plt.title(“GDP in current US dollars ($USD)”);
plt.xlabel(‘Date’); plt.ylabel(‘GDP in current US dollars’);

 

import matplotlib.pyplot as plt

pct=dfu[:].pct_change(periods=1)*100
pct.plot()
plt.legend(loc=’best’);
plt.title(“Annual Changes in Current GDP ($USD)”);
plt.xlabel(‘Date’); plt.ylabel(‘Annual Changes’);

Source: https://data.worldbank.org/

 

Python -import pandas as pd

import pandas as pd
import numpy as np
%matplotlib inline

pd.core.common.is_list_like=pd.api.types.is_list_like

import pandas_datareader as web
import datetime
start=datetime.datetime(2000,1,1)
end=datetime.datetime(2018,8,30)
gdp=web.DataReader(‘A191RL1Q225SBEA’, ‘fred’, start, end)
inflation = web.DataReader([‘CPIAUCSL’, ‘CPILFESL’], ‘fred’, start, end)

In [148]:

df =inflation[“CPIAUCSL”].pct_change(periods=12)*100

df.plot.line()

Out[148]:

In [134]:

df.plot.hist(alpha=0.5)

Out[134]:

In [136]:

df.plot.box()

Out[136]:

In [140]:

df=df.cumsum()
df.plot()

Out[140]:

In [64]:

import matplotlib.pyplot as plt
import seaborn as sns
import plotly.plotly as py

Pct_Annual=inflation[“CPIAUCSL”].pct_change(periods=12)*100

y=Pct_Annual
N=len(y)
x=range(N)
width=1/1.5
plt.bar(x,y, width, color=”blue”)

Out[64]:

In [150]:

gdp.plot()
df.plot(secondary_y=True, style=’g’)

Out[150]:

In [159]:

plt.figure()
df.plot()

Out[159]:

In [57]:

import pandas as pd
import numpy as np
%matplotlib inline

pd.core.common.is_list_like=pd.api.types.is_list_like

import pandas_datareader as web
import datetime
start=datetime.datetime(2000,1,1)
end=datetime.datetime(2018,8,30)
gdp=web.DataReader(‘A191RL1Q225SBEA’, ‘fred’, start, end)
inflation = web.DataReader([‘CPIAUCSL’, ‘CPILFESL’], ‘fred’, start, end)

gdp.head()
gdp.tail()
inflation.plot()
gdp.plot()

Out[57]: