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

You're reading from   Mastering R for Quantitative Finance Use R to optimize your trading strategy and build up your own risk management system

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781783552078
Length 362 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (15) Chapters Close

Preface 1. Time Series Analysis FREE CHAPTER 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

K-means clustering on big data


Data frames and matrices are easy-to-use objects in R, with typical manipulations that execute quickly on datasets with a reasonable size. However, problems can arise when the user needs to handle larger data sets. In this section, we will illustrate how the bigmemory and biganalytics packages can solve the problem of too large datasets, which is impossible to handle by data frames or data tables.

Note

The latest updates of bigmemory, biganalytics, and biglm packages are not available on Windows at time of writing this chapter. The examples shown here assume that R Version 2.15.3 is the current state-of-the-art version of R for Windows.

In the following example, we will perform K-means clustering on large datasets. For illustrative purposes, we will use the Airline Origin and Destination Survey data of the U.S. Bureau of Transportation Statistics. The datasets contain the summary characteristics of more than 3 million domestic flights, including the itinerary...

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