Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Module Syllabus 2022 – 2023

Key Module Information

Module Code: ECOM209

Module Title: R for Finance

Credit Value: 15

Level: 7 (MSc)

Semester: B (2)

Prerequisites: Some familiarity with elementary statistics including random variable, probability and linear regression; an understanding of basic financial concepts such as stock returns, interest and compounding; and the ability to work at the command line on a personal computer. Students will be able to use QMUL’s networked computers or may bring their own machines (typically a laptop with R installed not a tablet) to lab-based lectures.

Module Organiser

Name: Dr Richard Saldanha

Office Location: External Visiting Lecturer (contact via email)

Office hours: 11am Thursdays (immediately after lecture)

Email: [email protected]

Module Delivery

Each week you will be expected to engage with material and exercises (independent learning activities) posted on the module’s QMplus page, alongside attending and     participating in scheduled teaching activities.

Details of the scheduled teaching activities will be in your timetable. This can be accessed via the My Timetable option in QMplus.

Lecture

Interactive R Lecture on Thursdays 09:00– 11:00 • GC304 Computer Lab

Classes

Details of your class allocation can be found in MyTimetable on QMplus.

Module Content

Module Aim

The aim of this module is to give students a thorough grounding in the use of R in finance. R is a well-known free software environment for statistical computing and graphics; see https://www.r-project.org/. The module combines language basics with tools, models and methods useful for analysing financial data. It is taught as interactive computer lab R lectures.

Learning Outcomes

Upon completing this module, students should have a firm grasp of the R language and be able to use R unaided outside of the classroom. The desire is that students might become confident enough to use R with their other modules and as support for their MSc dissertations.

Module Outline

Suggested background/supplementary chapter reading in square brackets where applicable but the course is designed to be largely self-contained; please refer to the Reading List given in the next Section.

Introduction

Course outline; brief history of R; what R can do for you; installing R on your own machine;     organizing your projects; installing and using the RStudio interactive development environment (IDE); getting help; available online resources. [AIR Ch.1]

Lecture 1: Getting Started

Basic calculations in R; creating and running R scripts; data input and output; a rst data analysis session. [AIR Ch.2&7; RfD Ch.3–5, 12]

Lecture 2: Data Objects

Data objects and data manipulation; installing and using R packages from the Comprehensive R Archive Network (CRAN); reading and writing Excel spreadsheets in R. [AIR Ch.4–6; RfD     Ch.20]

Lecture 3: Language Details and Writing Functions

Further details about the language; calling convention for functions; programming and developing simple functions. [AIR Ch.9&10; RfD Ch.8– 10]

Online Multiple Choice Test 1 (10%)

Lecture 4: More Functions

Developing more advanced functions; modular design; practical problem solving using R.

Lecture 5: Graphics

Good graphical design; basic plotting functions, enhancing plots, fine control of graphics. [AIR Ch.12; RfD Ch.16]

Midterm Coursework Assessment (20%)

Lecture 6: Distributions and Data Summaries

Probability distributions; sampling and resampling methods. [AIR Ch.8, RfD Ch.15]

Lecture 7: Regression Analysis

Model specication and tting; model interpretation; regression diagnostics. [AIR Ch.11]

Lecture 8: R Package Creation

Documenting code using roxygen2; creating packages. [RPKG]

Online Multiple Choice Test 2 (10%)

Lecture 9: Presenting Using R

Using Quarto to author html and pdf output; building interactive web apps with Shiny.

Online Multiple Choice Test 3 (10%)

Lecture 10: Course Recap

A look back at the course and guidance on tackling the assessed project.

Project Assessment (50%)

Reading List

[AIR] Venables, W.N. and Smith, D.M. (2022) An Introduction to RCRAN.

AIR is an online R manual freely available at the Comprehensive R Archive Network

(CRAN) . It can appear a little dry but it is technically very strong and is updated

regularly.

[RfD] de Vries, A. and Meys, J. (2015) R for Dummies. (Second Edition). Wiley.

RfD is somewhat dated (covers R Version 3.x not 4) but is still a very good, easy

to understand introductory R text.

[RPKG] Wickham, H. (2015) R Packages: Organize, Test, Document, and Share Your Code. O’Reilly.

A comprehensive guide to R package creation from the author of the roxygen2  package. An as yet unpublished second edition of the book is freely available online.

Assessment

Assessment is by quiz (three online multiple choice tests during the semester), midterm coursework and a lengthier project (in-depth guided coursework) rather than by timed   examination.

Student conduct

To ensure a positive learning environment for all, the School of Economics and Finance expects all students to comply with the University’s Code of Student Discipline policies. Details of these policies can be found here:

https://arcs.qmul.ac.uk/students/student-appeals/misconduct/