I am of the opinion that every R geek, at least once during his life, feels the need to create his or her own class: this is what happened to me and here is the result, which, however, should be seen as a work still in progress. This class tries to summarise the most widely used methodologies currently used in finance and provide you some sample R code.

The first chapter of this book is introductory and covers the most essential features R. The following chapters will teach you advanced methods such as web crawling (also web spiders), portfolio sorts, network analysis and much more.

I started writing this book as an experiment, and as such it should be regarded. Since it has always been indented for my personal use, it may not be perfect but I find it quite satisfactory for the use I want to make of it. I share this work in the hope that future MBF students might find it useful for their own research.

The beauty of R

When I started my Ph.D. program in April 2019 at the University of St. Gallen, I quickly discovered my desire to introduce incoming students to the beauty of R programming. In the beginning, I simply provided R support for students but suddenly also external companies were requesting my data science know-how. Although I haven’t studied data science, I was obsessed with analyzing large data sets that excel couldn’t handle anymore. This resulted in the paradox that during my Ph.D. I seldom worked with excel and did most of my tasks in R. The beauty of R might be hidden at the start, due to the steep learning curve. However, once you finished this book, you realize how much time you will save when working in R - and that’s its beauty.

About me

My name is Luca Liebi and I am a Ph.D. student at the University of St. Gallen. My main field of research is financial networks & asset pricing. Moreover, I enjoy working with data sets that are not directly associated with finance. I conducted data analysis for dentists, lawyers, photographers and advised academic institutions about fintech trends.

**Luca J. Liebi**

Figure 0.1: Luca J. Liebi

I started working with R pretty late (at the age of 24), during my bachelor at the University of Zurich.

In this book I will introduce you to the most recent financial methodologies and provide you the code to implement these into R. It is often not required to fully understand the math behind the methodologies - you must rather understand the output.

What this class does

The book Finance methodologies and their application in R focuses more about practical implementation than on the mathematical proofs. I share my code that I have written in the past years, including webcrawlers, -spiders, networks and f

What this class does not

I do not intend to cover the very basics in R and also am I not able to cover all methodologies in Finance. As stated previously this work should be regarded as an experiment and it contains most of my codes that I have written in the past years. Hence, do not expect detailed mathematical proofs.