Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Mastering R for Quantitative Finance
  • Toc
  • feedback
Mastering R for Quantitative Finance

Mastering R for Quantitative Finance

By : Gabler
4 (11)
close
Mastering R for Quantitative Finance

Mastering R for Quantitative Finance

4 (11)
By: Gabler

Overview of this book

This book is intended for those who want to learn how to use R's capabilities to build models in quantitative finance at a more advanced level. If you wish to perfectly take up the rhythm of the chapters, you need to be at an intermediate level in quantitative finance and you also need to have a reasonable knowledge of R.
Table of Contents (15 chapters)
close
14
Index

Modeling in R

In the following section, we will learn the implementation of the previously described models with the help of R.

Data selection

In Chapter 4, Big Data – Advanced Analytics, we will discuss in detail the aspects and methods of getting data from open sources and working with them efficiently. Here, we only present how the time series of stock prices and other relevant information can be acquired and used for the factor model's estimations.

We used the quantmod package to collect the database.

Here is how it works in R:

library(quantmod)
stocks <- stockSymbols()

As a result, we need to wait for a few seconds while data is fetched, and then we can see the output:

Fetching AMEX symbols...
Fetching NASDAQ symbols...
Fetching NYSE symbols...

Now, we have a data frame R object that contains about 6,500 stocks that are traded on different exchanges such as AMEX, NASDAQ, or NYSE. In order to see the variables that the dataset contains, we can use the str command:

str(stocks...
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete