11  Presentations and reports

In many cases, the output of an analysis of the type we are doing in these notes is ultimately put into a report or a presentation. Therefore, it is important to have an efficient way to include quantitative output in reports.

11.1 Word or PowerPoint

Most people use Microsoft Word or PowerPoint to do this. They create the document in that software and then copy the output from R into the document.

The benefit of doing that is that one works in software one is familiar with and knows how to design a document to a specific need. In this case, it is important to be careful about how content is copied from RStudio to Word or PowerPoint. For tables, it is usually best to copy the numbers from RStudio into Excel and, from there, go to Word or PowerPoint. For figures, the usual best way is to export them to an SVG file within RStudio and then import that file into Word or PowerPoint.

The downside of this workflow is that one has to copy all the output from one piece of software to another, which takes time and allows for plenty of errors to emerge.

11.2 Use Quarto

The company that provides us with RStudio has a product called Quarto, which allows one to mix markdown and R code in the same document. If you are familiar with Jupyter, it is quite similar.

If one writes a document in Quarto, RStudio can directly export it to an HTML page or a PDF, Word or PowerPoint file. You can also export all four if you want to.

If one exports to a Word or PowerPoint file, then one can edit the files. However, perhaps the best way is to use Quarto to write a PDF report or presentation. It can make high-quality presentation slides and reports directly.

11.3 Example Quarto project

We have created an example project that runs a small set of analysis presented in this notebook. It is kept on github, see Section Section 12.7 for details, and you can find it on https://github.com/Jon-Danielsson/Financial-Risk-Forecasting-Example-Project.

You can see the directory structure below. The S&P 500 index is in RawData, the code to do all the analysis is in Code, the Quarto files to generate the, HTML, PDF, Word and PowerPoint reports is in Output-code and finally you find an example of the output in Output.

├── Code
│   ├── FitModels.r
│   ├── ProcessRawData.r
│   ├── RunModels.r
│   └── libraries.r
├── Output
│   ├── pdf-presentation.pdf
│   ├── pdf-report.pdf
│   ├── powerpoint-presentation.pptx
│   ├── sp500-returns-sd.pdf
│   ├── sp500-returns-sd.png
│   ├── sp500-returns-sd.svg
│   └── word-report.docx
├── Output-code
│   ├── pdf-presentation.qmd
│   ├── pdf-report.qmd
│   ├── powerpoint-presentation.qmd
│   ├── presentation.qmd
│   ├── report.qmd
│   └── word-report.qmd
└── RawData
    └── sp500.csv