<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on The Big Short</title>
    <link>/post/</link>
    <description>Recent content in Posts on The Big Short</description>
    <generator>Hugo -- gohugo.io</generator>
    <copyright>&amp;copy; 2021 &lt;a href=&#34;https://www.wangchucheng.com/&#34;&gt;C. Wang&lt;/a&gt; and &lt;a href=&#34;https://www.ruiqima.com/&#34;&gt;R. Ma&lt;/a&gt;
</copyright>
    <lastBuildDate>Wed, 21 Apr 2021 00:00:00 +0000</lastBuildDate><atom:link href="/post/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Blog Post 7</title>
      <link>/post/2021-04-21-post-title/</link>
      <pubDate>Wed, 21 Apr 2021 00:00:00 +0000</pubDate>
      
      <guid>/post/2021-04-21-post-title/</guid>
      <description># Lasso Variable Selection set.seed(902333) ss &amp;lt;- DataframeName %&amp;gt;% select(SPREAD, SP500, GOLD, OIL, CHHUSD, JPYUSD, RGDP, UNRATE, IPI, &amp;#39;Copper Price&amp;#39;, &amp;#39;Median Income&amp;#39;, BCI, CCI, rec) x &amp;lt;- model.matrix(ss$rec~., ss) y &amp;lt;- ss$rec cv_mod_ss &amp;lt;- cv.glmnet(x, y, alpha = 1) plot(cv_mod_ss) coef(cv_mod_ss) ## 15 x 1 sparse Matrix of class &amp;quot;dgCMatrix&amp;quot; ## 1 ## (Intercept) 2.057904e+00 ## (Intercept) . ## SPREAD -1.604249e-01 ## SP500 -3.292787e-04 ## GOLD . ## OIL 6.202401e-03 ## CHHUSD 8.</description>
    </item>
    
    <item>
      <title>Blog Post 6</title>
      <link>/post/2021-04-16-post-title/</link>
      <pubDate>Fri, 16 Apr 2021 00:00:00 +0000</pubDate>
      
      <guid>/post/2021-04-16-post-title/</guid>
      <description>suppressWarnings(suppressMessages(library(&amp;quot;tidyverse&amp;quot;))) # Running Pre-Process R Script source(here::here(&amp;quot;content&amp;quot;, &amp;quot;load_and_clean_data.R&amp;quot;)) # Reading Main Dataset dataset &amp;lt;- read_csv(here::here(&amp;quot;dataset&amp;quot;, &amp;quot;Main_Dataset.csv&amp;quot;)) # Multi-Collinearity Test Mulcol&amp;lt;-data.frame(dataset$SPREAD, dataset$SP500, dataset$GOLD, dataset$OIL, dataset$CHHUSD, dataset$JPYUSD, dataset$RGDP, dataset$UNRATE, dataset$rec) round(cor(Mulcol), digits = 2) ## dataset.SPREAD dataset.SP500 dataset.GOLD dataset.OIL ## dataset.SPREAD 1.00 -0.12 0.34 0.30 ## dataset.SP500 -0.12 1.00 0.65 0.50 ## dataset.GOLD 0.34 0.65 1.00 0.80 ## dataset.OIL 0.30 0.50 0.80 1.00 ## dataset.CHHUSD -0.32 -0.55 -0.88 -0.74 ## dataset.JPYUSD -0.34 -0.20 -0.60 -0.</description>
    </item>
    
    <item>
      <title>Blog Post 2</title>
      <link>/post/2021-04-07-post-title/</link>
      <pubDate>Wed, 07 Apr 2021 00:00:00 +0000</pubDate>
      
      <guid>/post/2021-04-07-post-title/</guid>
      <description># Data Manipulation yc_clean = yc %&amp;gt;% mutate(Date = ymd(Date)) %&amp;gt;% mutate_at(vars(Date), funs(year, month, day)) # Initial EDA yc_clean %&amp;gt;% ggplot(aes(x= Date,y=SPREAD)) + geom_line(color = &amp;quot;blue&amp;quot;) + labs(title = &amp;quot;Spread over time&amp;quot;) + theme(plot.title = element_text(hjust = 0.5)) During times of recession the spread, which is the difference between the 30 year and 1 year maturity, yields a negative value. The years following a recession we see the economy head into expansionary periods where the spread yields positive values.</description>
    </item>
    
    <item>
      <title>Blog Post 5</title>
      <link>/post/2021-04-05-post-title/</link>
      <pubDate>Mon, 05 Apr 2021 00:00:00 +0000</pubDate>
      
      <guid>/post/2021-04-05-post-title/</guid>
      <description>To our main yield curve dataset, we are adding at least 10 additional datasets. We are combining the datasets based on the date format from our main dataset. During this process of combining data there were a few problems we encountered. One problem was finding data that went far back enough in time so we can preserve the main dataset with the new data we are adding. Another problem we faced was figuring out how to extend data beyond its time frame, so we can have sufficient data points.</description>
    </item>
    
    <item>
      <title>Blog Post 4</title>
      <link>/post/2021-03-29-post-4/</link>
      <pubDate>Mon, 29 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/post/2021-03-29-post-4/</guid>
      <description># Initial Model Selection Testing dfsub &amp;lt;- df %&amp;gt;% select(SPREAD, SP500, GOLD, OIL, CHHUSD, JPYUSD, RGDP, UNRATE, rec) model &amp;lt;- glm(rec~SPREAD+SP500+GOLD+OIL+CHHUSD+JPYUSD+RGDP+UNRATE, data=df, family=binomial) model.null = glm(rec ~ 1, data=dfsub, family = binomial) anova(model, model.null, test=&amp;quot;Chisq&amp;quot;) ## Analysis of Deviance Table ## ## Model 1: rec ~ SPREAD + SP500 + GOLD + OIL + CHHUSD + JPYUSD + RGDP + ## UNRATE ## Model 2: rec ~ 1 ## Resid. Df Resid. Dev Df Deviance Pr(&amp;gt;Chi) ## 1 161 69.</description>
    </item>
    
    <item>
      <title>Blog Post 3</title>
      <link>/post/2021-03-26-post-3/</link>
      <pubDate>Fri, 26 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/post/2021-03-26-post-3/</guid>
      <description># Data Manipulation yc &amp;lt;- yc %&amp;gt;% mutate(Date = ymd(Date)) %&amp;gt;% mutate_at(vars(Date), funs(year, month, day)) # Changing Col names colnames(rgdp)[colnames(rgdp) == &amp;quot;A191RL1Q225SBEA&amp;quot;] &amp;lt;- &amp;#39;RGDP&amp;#39; colnames(rgdp)[colnames(rgdp) == &amp;quot;DATE&amp;quot;] &amp;lt;- &amp;#39;Date&amp;#39; colnames(UE)[colnames(UE) == &amp;quot;DATE&amp;quot;] &amp;lt;- &amp;#39;Date&amp;#39; colnames(rec_indicator)[colnames(rec_indicator) == &amp;quot;DATE&amp;quot;] &amp;lt;- &amp;#39;Date&amp;#39; colnames(rec_indicator)[colnames(rec_indicator) == &amp;quot;JHDUSRGDPBR&amp;quot;] &amp;lt;- &amp;#39;rec&amp;#39; # Joining Datasets temp &amp;lt;- yc %&amp;gt;% inner_join(rgdp, by = &amp;quot;Date&amp;quot;) temp2 &amp;lt;- temp %&amp;gt;% inner_join(UE, by = &amp;quot;Date&amp;quot;) df &amp;lt;- temp2 %&amp;gt;% inner_join(rec_indicator, by = &amp;quot;Date&amp;quot;) # create column to write &amp;quot;yes&amp;quot; for recession and &amp;quot;no&amp;quot; if no rec df$rec_char = ifelse(df$rec == 0, &amp;quot;No&amp;quot;, &amp;quot;Yes&amp;quot;) # Creating Figure df_2 = df %&amp;gt;% group_by(year) %&amp;gt;% mutate(mean_spread = mean(SPREAD, na.</description>
    </item>
    
    <item>
      <title>Blog Post 1</title>
      <link>/post/2021-03-10-post-1/</link>
      <pubDate>Wed, 10 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>/post/2021-03-10-post-1/</guid>
      <description>We plan to work on data of the US bond yield curve from 1977-2018. Some of the variables include the date, the values of the year curve for 1 year and 30 years maturities, and the difference between the 30 year and 1 year maturities, called the “spread”. This data was extracted from Bloomberg and is used to predict an economic recession. Yield curves are good indicators of economic recessions because if the yield curve inverts, then it is suggested that investors think it is risky to hold bonds over the short term, so they are demanding a higher yield for short term bonds.</description>
    </item>
    
  </channel>
</rss>
