Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Quantitative Finance with R

You're reading from  Learning Quantitative Finance with R

Product type Book
Published in Mar 2017
Publisher Packt
ISBN-13 9781786462411
Pages 284 pages
Edition 1st Edition
Languages
Authors (2):
Dr. Param Jeet Dr. Param Jeet
Profile icon Dr. Param Jeet
PRASHANT VATS PRASHANT VATS
Profile icon PRASHANT VATS
View More author details
Toc

Table of Contents (16) Chapters close

Learning Quantitative Finance with R
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Introduction to R 2. Statistical Modeling 3. Econometric and Wavelet Analysis 4. Time Series Modeling 5. Algorithmic Trading 6. Trading Using Machine Learning 7. Risk Management 8. Optimization 9. Derivative Pricing

Preface

Learning Quantitative Finance with R explains practical examples of quantitative finance in the statistical language R. This book has been written with the intention of passing knowledge to people who are interested in learning quantitative finance with R. In this book, we have covered various topics, ranging from basic level to advance level. In particular, we have covered statistical, time series, and wavelet analysis along with their applications in algorithmic trading. We have also done our best to explain some applications of machine learning, risk management, optimization, and option pricing in this book.

What this book covers

Chapter 1Introduction to R, explains basic commands in R. It starts with the installation of R and its packages and moves on to data types, DataFrames, and loops. This chapter also covers how to write and call functions and how to import data files of various formats into R. This chapter is meant to provide a basic understanding of R.

Chapter 2Statistical Modeling, talks about the exploratory analysis like common distribution, correlation, measure of central tendencies, outlier detection to better understand the data. It also talks about sampling and standardization/ Normalization of the data which helps in preparing the data for analysis. Further this chapter also deals with hypothesis testing and parameter estimation.

Chapter 3, Econometric and Wavelet Analysis, covers simple and multivariate linear regression models, which are the backbone of every analysis. An explanation of ANOVA and feature selection adds flavor to this chapter. We also build a few models using wavelets analysis.

Chapter 4, Time Series Modeling, in this chapter the author presents the examples to convert data in time series using ts, zoo and xts which works as the base for forecasting models. Then the author talks about various forecasting techniques like AR, ARIMA, GARCH,VGARCH etc. and its execution in R along with examples.

Chapter 5, Algorithmic Trading, contains some live examples from the algorithmic trading domain, including momentum trading and pair trading using various methods. CAPM, multifactor model, and portfolio construction are also covered in this chapter.

Chapter 6, Trading Using Machine Learning, shows how to model a machine learning algorithm using capital market data. This covers supervised and unsupervised algorithms. 

Chapter 7, Risk Management, in this chapter the author discusses the techniques to measure market and portfolio risk. He also captures the common methods used for calculation of VAR. He also gives examples of the best practices used in banking domain for measuring credit risk.

Chapter 8, Optimization, in this chapter the author demonstrates examples of optimization techniques like dynamic rebalancing, walk forward testing, grid testing, genetic algorithm in financial domain.

Chapter 9Derivative Pricing, use cases of R in derivative pricing. It covers vanilla option pricing along with exotic options, bonds pricing, credit spread and credit default swaps. This chapter is complex in nature and require people to have some basic understanding of derivatives.

What you need for this book

First of all, you should make sure that R is installed on your machine. All the examples in this book have been implemented in R and can be executed on the R console.  R is an open source platform and can be installed free of charge for any operating system from https://www.r-project.org/. Installation guidelines are also found on this website. Once you have R on your machine, you can straightaway go to chapter 1 and  start. Each chapter explains about the required packages, shows how to install packages, and and tells the reader how to load them into the workspace.

Who this book is for

This book is written with the intent to pass knowledge to people who are interested in learning R and its application in analytics. However, we have covered examples from finance.  This book covers basic to complex finance examples, along with varying degrees of complexity of R coding. This book does not expect you to have prior R programming knowledge, however this expects you to have little bit knowledge of mathematical analytical concepts. Even if you are well versed with R, this book can still be of great help to you as it explains various live examples from the data analytics industry, in particular, capital markets.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: The quantmod package is used quite a few times."

A block of code is set as follows:

>getSymbols("^DJI",src="yahoo")
>dji<- DJI[,"DJI.Close"]

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

corr<- rollapply(data,252,correlation ,by.column=FALSE)

For any R command we have used >, which means this command has been written on the command prompt, as  >, implies command prompt.

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Learning-Quantitative-Finance-with-R. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}