Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Introduction to R for Quantitative Finance

You're reading from   Introduction to R for Quantitative Finance R is a statistical computing language that's ideal for answering quantitative finance questions. This book gives you both theory and practice, all in clear language with stacks of real-world examples. Ideal for R beginners or expert alike.

Arrow left icon
Product type Paperback
Published in Nov 2013
Publisher Packt
ISBN-13 9781783280933
Length 164 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Introduction to R for Quantitative Finance
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Time Series Analysis FREE CHAPTER 2. Portfolio Optimization 3. Asset Pricing Models 4. Fixed Income Securities 5. Estimating the Term Structure of Interest Rates 6. Derivatives Pricing 7. Credit Risk Management 8. Extreme Value Theory 9. Financial Networks References Index

Applied R functions


Although we have already used some functions from the termstrc package in the previous example to demonstrate how one can determine the ideal number of knot points and also specify those, this process can be done in an easier manner with some further R functions, as shown in the following command lines:

> x <- estim_cs(govbonds, 'GERMANY')
> x$knotpoints[[1]]
       DE0001135101 DE0001141463 DE0001135218 DE0001135317              
0.0000     1.006027     2.380274     5.033425     9.234521 31.44657

First we used the estim_cs function that estimates the term structure of coupon bonds based on cubic splines (Ferstl-Haydn, 2010) and returns the knot points in a list with the knotpoints name. Please note that estim_cs works with a list—just like most functions in the package—that's why x$knotpoints returned a list from which we checked only the first element that was identical to the values we computed manually in the preceding section.

There are a bunch of other useful...

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 $19.99/month. Cancel anytime
Banner background image