The Big R-Book. Philippe J. S. De Brouwer
This edition first published 2021
© 2021 John Wiley & Sons, Inc.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by law. Advice on how to obtain permission to reuse material from this title is available at http://www.wiley.com/go/permissions.
The right of Philippe J.S. De Brouwer to be identified as the author of this work has been asserted in accordance with law.
Registered Office
John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USA
Editorial Office
111 River Street, Hoboken, NJ 07030, USA
For details of our global editorial offices, customer services, and more information about Wiley products visit us at www.wiley.com.
Wiley also publishes its books in a variety of electronic formats and by print-on-demand. Some content that appears in standard print versions of this book may not be available in other formats.
Limit of Liability/Disclaimer of Warranty
While the publisher and authors have used their best efforts in preparing this work, they make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives, written sales materials or promotional statements for this work. The fact that an organization, website, or product is referred to in this work as a citation and/or potential source of further information does not mean that the publisher and authors endorse the information or services the organization, website, or product may provide or recommendations it may make. This work is sold with the understanding that the publisher is not engaged in rendering professional services. The advice and strategies contained herein may not be suitable for your situation. You should consult with a specialist where appropriate. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read. Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
Library of Congress Cataloging-in-Publication Data
Names: De Brouwer, Philippe J. S., author.
Title: The big R-book : from data science to learning machines and big data / Philippe J.S. De Brouwer.
Description: Hoboken, NJ, USA : Wiley, 2020. | Includes bibliographical references and index.
Identifiers: LCCN 2019057557 (print) | LCCN 2019057558 (ebook) | ISBN 9781119632726 (hardback) | ISBN 9781119632764 (adobe pdf) | ISBN 9781119632771 (epub)
Subjects: LCSH: R (Computer program language)
Classification: LCC QA76.73.R3 .D43 2020 (print) | LCC QA76.73.R3 (ebook) | DDC 005.13/3–dc23
LC record available at https://lccn.loc.gov/2019057557
LC ebook record available at https://lccn.loc.gov/2019057558
Cover Design: Wiley
Cover Images: Information Tide series and Particle Geometry series
© agsandrew/Shutterstock, Abstract geometric landscape © gremlin/Getty Images, 3D illustration Rendering © MR.Cole_Photographer/Getty Images
To Joanna, Amelia and Maximilian
Foreword
This book brings together skills and knowledge that can help to boost your career. It is an excellent tool for people working as database manager, data scientist, quant, modeller, statistician, analyst and more, who are knowledgeable about certain topics, but want to widen their horizon and understand what the others in this list do. A wider understanding means that we can do our job better and eventually open doors to new or enhanced careers.
The student who graduated froma science, technology, engineering ormathematics or similar program will find that this book helps to make a successful step from the academic world into a any private or governmental company.
This book uses the popular (and free) software R as leitmotif to build up essential programming proficiency, understand databases, collect data, wrangle data, buildmodels and select models froma suit of possibilities such linear regression, logistic regression, neural networks, decision trees, multi criteria decision models, etc. and ultimately evaluate a model and report on it.
We will go the extra mile by explaining some essentials of accounting in order to build up to pricing of assets such as bonds, equities and options. This helps to deepen the understanding how a company functions, is useful to bemore result oriented in a private company, helps for one's own investments, and provides a good example of the theories mentioned before. We also spend time on the presentation of results and we use R to generate slides, text documents and even interactive websites! Finally we explore big data and provide handy tips on speeding up code.
I hope that this book helps you to learn faster than me, and build a great and interesting career.
Enjoy reading!
Philippe De Brouwer
2020
About the Companion Site
This book is accompanied by a companion website:
www.wiley.com/go/De Brouwer/The Big R-Book
The website includes materials for students and instructors:
The Student companion site will contain the R-code, and the Instructor companion site will contain PDF slides based on the book's content.
About the Author
Dr. Philippe J.S. De Brouwer leads expert teams in the service centre of HSBC in Krakow, is Honorary Consul for Belgium in Krakow, and is also guest professor at the University of Warsaw, Jagiellonian University, and AGH University of Science and Technology. He teaches both at executive MBA programs and mathematics faculties.
He studied theoretical physics, and later acquired his second Master degree while working. Finishing thisMaster, he solved the “fallacy of large numbers puzzle” that was formulated by P.A. Samuelson 38 years before and remained unsolved since then. In his Ph.D., he successfully challenged the assumptions of the noble price winning “Modern portfolio Theory” of H. Markovitz, by creating “Maslowian Portfolio Theory.”
His career brought him into insurance, banking, investment management, and back to banking, while his specialization shifted from IT, data science to people management.
For Fortis (now BNP), he created one of the first capital guaranteed funds and got promoted to director in 2000. In 2002, he joined KBC, where he merged four companies into one and subsequently became CEO of the merged entity in 2005. Under his direction, the company climbed from number 11 to number 5 on the market, while the number of competitors increased by 50%. In the aftermath of the 2008 crisis, he helped creating