---
classoption: landscape
sansfont: Calibri Light
author: "Talitha Speranza"
output:
  rmarkdown::pdf_document:
    includes:  
      in_header: fix_figs.tex
---

\fontfamily{lmss}\selectfont

```{r echo = FALSE}
library(BETS)
```

```{r echo = FALSE, results = "hide"}
knitr::opts_chunk$set(warning=FALSE, message=FALSE)
```

\fancypagestyle{plain}{
  \fancyhf{}%
  \setlength{\headheight}{40pt} 
  \fancyhead[L]{
    \includegraphics[width=\linewidth,height=35pt]{logo_business} }
  \fancyfoot[L]{
     {\fontfamily{lmss}\selectfont
     {\small Charts generated by the \textbf{BETS R Package} on `r Sys.Date()` $\diamond$ \textbf{\url{https://github.com/pedrocostaferreira/BETS}}}}
  }
  \fancyfoot[R]{
    \thepage\  / \pageref{LastPage} }
}
\pagestyle{plain}


```{r echo = FALSE, results = "hide"}
dir.create("graphs")
chart(ts = "sent_ind", open = F, file = "sent_ind")
chart(ts = "conf_lvl", open = F, file = "conf_lvl")
chart(ts = "iie_br", open = F, file = "iie_br")
chart(ts = "transf_ind", open = F, file = "transf_ind")
```


\begin{figure}[h]
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/sent_ind}
  \label{ipca}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/conf_lvl}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/iie_br}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/transf_ind}
  \label{cut}
\end{subfigure}
\end{figure}


```{r echo = FALSE, results = "hide"}
chart(ts = "servc", open = F, file = "servc")
chart(ts = "retail", open = F, file = "retail")
chart(ts = "constr", open = F, file = "constr")
chart(ts = "consm", open = F, file = "consm")
```


\begin{figure}[h]
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/servc}
  \label{ipca}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/retail}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/constr}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/consm}
  \label{cut}
\end{subfigure}
\end{figure}

```{r echo = FALSE, results = "hide"}
chart(ts = "gdp_vars", open = F, file = "gdp_vars")
chart(ts = "gdp_comps", open = F, file = "gdp_comps")
chart(ts = "cap_utl", open = F, file = "cap_utl")
chart(ts = "gdp_mon", open = F, file = "gdp_mon")
```


\begin{figure}[h]
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/gdp_vars}
  \label{ipca}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/gdp_comps}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/cap_utl}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/gdp_mon}
  \label{cut}
\end{subfigure}
\end{figure}


```{r echo = FALSE, results = "hide"}
chart(ts = "gdp_unemp", open = F, file = "gdp_unemp")
chart(ts = "misery_index", open = F, file = "misery_index")
chart(ts = "lab_coin", open = F, file = "lab_lead")
chart(ts = "lab_lead", open = F, file = "lab_coin")
```


\begin{figure}[h]
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/gdp_unemp}
  \label{ipca}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/lab_lead}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/misery_index}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/lab_coin}
  \label{cut}
\end{subfigure}
\end{figure}

```{r echo = FALSE, results = "hide"}
chart(ts = "lei", open = F, file = "lei")
chart(ts = "cei", open = F, file = "cei")
chart(ts = "ei_vars", open = F, file = "ei_vars")
chart(ts = "ei_comps", open = F, file = "ei_comps")
```


\begin{figure}[h]
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/lei}
  \label{ipca}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/cei}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/ei_vars}
  \label{cut}
\end{subfigure}
~
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=11.5cm,keepaspectratio]{graphs/ei_comps}
  \label{cut}
\end{subfigure}
\end{figure}



## Notes:

Shaded areas represent recessions, as dated by CODACE (FGV/IBRE).

### Economic Sentiment

**Definition**: Average between industry, services, construction, retail and consumer confidence indexes.
**Source**: FGV/IBRE

### Misery Index

**Definition**: Inflation rate (IPCA) plus Unemployment Rate (from PNAD-C)
**Source**: IBGE

### Enterprises Confidence Index

**Definition**: Average between industry, services, construction and retail confidence indexes.
**Source**: FGV/IBRE


