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
Mastering R for Quantitative Finance

You're reading from  Mastering R for Quantitative Finance

Product type Book
Published in Mar 2015
Publisher
ISBN-13 9781783552078
Pages 362 pages
Edition 1st Edition
Languages
Toc

Table of Contents (20) Chapters close

Mastering R for Quantitative Finance
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Time Series Analysis 2. Factor Models 3. Forecasting Volume 4. Big Data – Advanced Analytics 5. FX Derivatives 6. Interest Rate Derivatives and Models 7. Exotic Options 8. Optimal Hedging 9. Fundamental Analysis 10. Technical Analysis, Neural Networks, and Logoptimal Portfolios 11. Asset and Liability Management 12. Capital Adequacy 13. Systemic Risks Index

Big data linear regression analysis


In this section, we will illustrate how to load large datasets directly from a URL with the help of the ff package and how to interact with a biglm package to fit a general linear regression model to the datasets that are larger than the memory. The biglm package can effectively handle datasets even if they overload the RAM of the computer, as it loads data into memory in chunks. It processes the last chunk and updates the sufficient statistics required for the model. It then disposes the chunk and loads the next one. This process is repeated until all the data is processed in the calculation.

The following example examines the unemployment compensation amount as a linear function of a few social-economic data.

Loading big data

To perform a big data linear regression analysis, we first need to install and load the ff packages, which we will use to open large files in R, and the biglm package, which we will use to fit the linear regression model on our data...

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}