---
title: "Stock Report"
author: "Luis Torgo"
output:
  pdf_document: default
  html_document: default
params:
  ticker: AAPL
  nDays: 30
  showCode: no
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = params$showCode)
```

## The Quotes of `r params$ticker` for the last `r params$nDays` days

```{r include=FALSE}
library(quantmod)
dat <- getSymbols(params$ticker,
                  from=Sys.Date()-params$nDays,
                  to=Sys.Date(),
                  auto.assign = FALSE)
```


```{r quotes}
candleChart(dat,name=params$ticker)
```
