0% found this document useful (0 votes)
3 views40 pages

R Programming for Computational Finance

Uploaded by

Syed Shafiulla
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views40 pages

R Programming for Computational Finance

Uploaded by

Syed Shafiulla
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CFRM 461

Probability and Statistics for Computational Finance

Introduction to R

Bin Zou
binzou@[Link]

Department of Applied Mathematics


University of Washington

2017 Spring Quarter


Outline

1 Brief Introduction

2 Basic Mathematical Operations

3 Vector and Matrix Operations

4 Graphic Features

5 Writing Your Own Functions

6 Extra

Bin Zou (UW) CFRM 461 2/40


Resource
I [Link]
Online courses on R, Python, data mining, machine learning ...
I Guy Yollin: R Programming for Quantitative Finance
[Link]
I [Link]
Software
I R is a free software environment for statistical computing and
graphics. Please download R from its website:
[Link]
I R-Studio is an integrated development environment (IDE) for R.
[Link]
Remark: Please install R-Studio before the lectures.

Credits: Some slides are modified from Kjell Konis’s notes.

Bin Zou (UW) CFRM 461 3/40


R-Studio Interface

Bin Zou (UW) CFRM 461 4/40


I Double click on [Link] to start R-Studio.
I Type q() or click on X on the upper right corner to quit R.
I Need help? help(), [Link](), example(),...
I The > symbol is called the prompt: R is prompting you to enter a
command. You may change > to a different symbol.
I R is case sensitive, TRUE is not the same as true.
I To add comments to the codes, use # (hashmark/pound key).
Any input following a # is ignored (until the next new line).
I If a command goes for more than one line, use + for new line(s).
I List objects/variables in the workspace, use objects() or ls().
I Remove objects/variables in the workspace, use rm().
To remove all objects, use rm( list = ls() )
I Upon exiting R, you can save available objects in [Link],
and command lines in [Link].
I You can save codes in name.R file, and use command
source("name.R") to run it.
I To clear the console in R, use Ctrl + L.

Bin Zou (UW) CFRM 461 5/40


Reserved Constants
I Constant π: pi

1 > pi
2 [ 1 ] 3.141593

I Infinity: Inf; Negative infinity: -Inf; Not a Number (NaN): NaN

1 > 1/0
2 [1] Inf
3 > log (0)
4 [ 1 ] −I n f
5 > 0/0
6 [ 1 ] NaN

I Imaginary unit: i (i2 = −1)


I Exponential part E

1 > 3 . 4 E5
2 [ 1 ] 340000

Bin Zou (UW) CFRM 461 6/40


Outline

1 Brief Introduction

2 Basic Mathematical Operations

3 Vector and Matrix Operations

4 Graphic Features

5 Writing Your Own Functions

6 Extra

Bin Zou (UW) CFRM 461 7/40


Using R as a Calculator

Operation Command Example


Addition + 3 + 4
Subtraction - 10 - 6
Multiplication * 2 * 3
Division / 15 / 5
Exponential ^ 2 ^ 3
Modulo %% 26 %% 3

Table 1: Arithmetic Operations in R

The modulo (also called modulus) operation finds the remainder after
division of one number by another.

Bin Zou (UW) CFRM 461 8/40


1 > 3 + 4
2 [1] 7
3 > 10 − 6
4 [1] 4
5 > 2 ∗ 3
6 [1] 6
7 > 15 / 5
8 [1] 3
9 > 2 ˆ 3
10 [1] 8
11 > 26 %% 3
12 [1] 2

Bin Zou (UW) CFRM 461 9/40


Basic Math Functions

exp exponential log logarithm


sin sine cos cosine
asin inverse sine acos inverse cosine
tan tangent atan inverse tangent
sqrt square root abs absolute value
max maximum min minimum
Q
sum summation Σ prod product
factorial n! sign 1(+) -1(-)
round to the nearest floor/ceiling round down/up
range min max sort ascending order

Table 2: Basic Math Functions in R

Bin Zou (UW) CFRM 461 10/40


1 > sqrt (81)
2 [1] 9
3 > log (1)
4 [1] 0
5 > exp ( 1 )
6 [ 1 ] 2.718282
7 > s i n ( pi / 2)
8 [1] 1
9 > cos ( pi / 2)
10 [ 1 ] 6 . 1 2 3 0 3 2 e −17
11 > tan ( p i / 4 )
12 [1] 1
13 > abs ( −10)
14 [ 1 ] 10
15 > f a c t o r i a l (5)
16 [ 1 ] 120
17 > s i g n ( −5)
18 [ 1 ] −1
19 > round ( 2 . 7 )
20 [1] 3
21 > floor (2.7)
22 [1] 2
23 > ceiling (2.7)
24 [1] 3

Bin Zou (UW) CFRM 461 11/40


Credits: from Kjell Konis
More examples:

1 > tan ( p i )
2 [ 1 ] −1.224647 e −16
3 > cos ( pi / 2)
4 [ 1 ] 6 . 1 2 3 0 3 2 e −17

Bin Zou (UW) CFRM 461 12/40


Assigning Scalar Variables

I Variable names need to start with a letter or a dot (.), followed


by some combination of letters, digits, or special characters.
e.g., x, y_1
I Names are case sensitive, e.g., Bin01 and bin01 are different.
I Avoid reserved words by R, e.g.,
if else repeat while function for in next ...
To assign value to a variable, use <- or ->. (= can be used as well.)

1 > x <− 5
2 > ( x <− 5 )
3 [1] 5

Remark: To display the results, put () around the command.

Bin Zou (UW) CFRM 461 13/40


1 > x <− 5
2 > y = x ˆ2
3 > ls ()
4 [ 1 ] ”x” ”y”
5 > x
6 [1] 5
7 > y
8 [ 1 ] 25
9 > rm ( x )
10 > ls ()
11 [ 1 ] ”y”

Bin Zou (UW) CFRM 461 14/40


Data Types
Basic data types:
I numeric
e.g., 3.19
I logical
e.g., TRUE, FALSE, NA (ATTENTION: case sensitive)
I character
e.g., “Bin” (string/text) Use "" or ’’ to enter
1 > ( x num <− 3 . 1 9 )
2 [ 1 ] 3.19
3 > ( x l o g <− FALSE)
4 [ 1 ] FALSE
5 > 2 > 1
6 [ 1 ] TRUE
7 > ( x cha <− ” Bin ” )
8 [ 1 ] ” Bin ”

To check the class of a variable, use class() or mode():

1 > class (x log )


2 [1] ”logical”

Bin Zou (UW) CFRM 461 15/40


How can we change data types?

1 > ( x <− 1 : 5 )
2 [1] 1 2 3 4 5
3 > mode ( x )
4 [ 1 ] ” numeric ”
5 > ( x cha <− a s . c h a r a c t e r ( x ) )
6 [ 1 ] ”1” ”2” ”3” ”4” ”5”
7 > mode ( x cha )
8 [ 1 ] ” character ”
9 > ( x num <− a s . i n t e g e r ( x cha ) )
10 [1] 1 2 3 4 5
11 > mode ( x num)
12 [ 1 ] ” numeric ”
13 [ 1 ] 1+0 i 2+0 i 3+0 i 4+0 i 5+0 i
14 > c l a s s ( x com )
15 [ 1 ] ” complex ”

Bin Zou (UW) CFRM 461 16/40


Logical Comparisons
I <: for less than
I >: for greater than
I <=: for less than or equal to
I >=: for greater than or equal to
I ==: for equal to each other
I !=: not equal to each other
I &: logical “and”
I |: logical “or”
I !: logical “not” (negation)
1 > 6 > 5
2 [ 1 ] TRUE
3 > 3 <= 10
4 [ 1 ] TRUE
5 > 2 == 2
6 [ 1 ] TRUE
7 > 2 != 2
8 [ 1 ] FALSE
9 > 2>1 & 3<5
10 [ 1 ] TRUE
11 > 2==1 | 4>=5
12 [ 1 ] FALSE

Bin Zou (UW) CFRM 461 17/40


Outline

1 Brief Introduction

2 Basic Mathematical Operations

3 Vector and Matrix Operations

4 Graphic Features

5 Writing Your Own Functions

6 Extra

Bin Zou (UW) CFRM 461 18/40


Creating Vectors
I c(): combine function
1 > ( v e c num <− c ( 1 . 1 , 2 . 2 , 3 . 3 , 4 . 4 , 5 . 5 ) )
2 [ 1 ] 1.1 2.2 3.3 4.4 5.5
3 > ( v e c l o g <− c (TRUE, FALSE, TRUE) )
4 [ 1 ] TRUE FALSE TRUE
5 > ( v e c cha <− c ( ” Bin ” , ”Zou” ) )
6 [ 1 ] ” Bin ” ”Zou”

I assign()
1 > a s s i g n ( ”x” , c ( 1 . 1 , 2 . 2 , 3 . 3 , 4 . 4 , 5 . 5 ) )
2 > x
3 [ 1 ] 1.1 2.2 3.3 4.4 5.5

I 1:10 is the same as c(1,2,...,9,10)


1 > ( y <− 1 : 1 0 )
2 [1] 1 2 3 4 5 6 7 8 9 10

I seq(from=value, to=value, by=value, length=value)


1 > s e q ( from =1 , t o =5 , by =0.5)
2 [ 1 ] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0

Bin Zou (UW) CFRM 461 19/40


I rep(): replicate/copy vectors

1 > x
2 [ 1 ] 1.1 2.2 3.3 4.4 5.5
3 > rep (x , times = 2)
4 [ 1 ] 1.1 2.2 3.3 4.4 5.5 1.1 2.2 3.3 4.4 5.5
5 > r e p ( x , each = 3 )
6 [ 1 ] 1.1 1.1 1.1 2.2 2.2 2.2 3.3 3.3 3.3 4.4 4.4 4.4 5.5
5.5 5.5

Note: Use the above examples to study the differences of options


times and each.
Remark: Colon : has high priority in operations. See the following
example.

1 > 10:1
2 [ 1 ] 10 9 8 7 6 5 4 3 2 1
3 > 2∗ 1 :5
4 [1] 2 4 6 8 10
5 > (2 ∗ 1) : 5
6 [1] 2 3 4 5

Bin Zou (UW) CFRM 461 20/40


Name a vector: names()

1 > names ( v e c cha ) <− c ( ” F i r s t Name” , ” L a s t Name” )


2 > v e c cha
3 F i r s t Name L a s t Name
4 ” Bin ” ”Zou”

Alternatively, a vector can be created to record the names first. The


advantage is that such name vector can be used multiple times.

1 > v e c name <− c ( ”Monday” , ” Tuesday ” , ”Wednesday” , ” Thursday ”


, ” Friday ” )
2 > sbux <− c ( 5 4 . 6 3 , 5 4 . 2 7 , 5 4 . 5 4 , 5 4 . 8 0 , 5 5 . 7 8 )
3 > s c u . t o <− c ( 1 . 5 5 , 1 . 6 0 , 1 . 6 2 , 1 . 6 1 , 1 . 6 6 )
4 > names ( sbux ) <− v e c name
5 > names ( s c u . t o ) <− v e c name
6 > sbux ; s c u . t o
7 Monday Tuesday Wednesday Thursday Friday
8 54.63 54.27 54.54 54.80 55.78
9 Monday Tuesday Wednesday Thursday Friday
10 1.55 1.60 1.62 1.61 1.66

Bin Zou (UW) CFRM 461 21/40


Vector Commands
I length(): size of a variable
I sum(): summation of a vector

1 > ( x <− s e q ( 1 , 1 0 ) )
2 [1] 1 2 3 4 5 6 7 8 9 10
3 > ( y <− s e q ( 1 , 5 , 0 . 5 ) )
4 [ 1 ] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
5 > z <− s e q (1 , −5 , −0.5)
6 > z
7 [1] 1.0 0.5 0 . 0 −0.5 −1.0 −1.5 −2.0 −2.5 −3.0 −3.5 −4.0
8 [ 1 2 ] −4.5 −5.0
9 > length (x)
10 [ 1 ] 10
11 > length ( z )
12 [ 1 ] 13
13 > Onehundred <− s e q ( 1 , 1 0 0 )
14 > sum ( Onehundred )
15 [ 1 ] 5050

Remark: What do [1] and [12] mean?

Exercise: Apply basic algebraic operations on vectors.

Bin Zou (UW) CFRM 461 22/40


Selecting Elements of Vectors
vector[i]: i-th element of a vector if i is a number.
If i is a vector, then vector[i] selects elements from the positions
decided by vector i.

1 > SP500 C l o s e <− c ( ” 3 / 13 / 2017 ” = 2 3 7 3 . 4 7 , ” 3 / 14 / 2017 ” =


2 3 6 5 . 4 5 , ” 3 / 15 / 2017 ” = 2 3 6 8 . 9 4 , ” 3 / 16 / 2017 ” = 2 3 7 7 . 1 8 , ”
3 / 17 / 2017 ” = 2 3 7 7 . 6 4 )
2 > SP500 C l o s e [ 1 ]
3 3 / 13 / 2017
4 2373.47
5 > SP500 C l o s e [ ” 3 / 13 / 2017 ” ]
6 3 / 13 / 2017
7 2373.47
8 > SP500 C l o s e [ c ( 4 , 5 ) ]
9 3 / 16 / 2017 3 / 17 / 2017
10 2377.18 2377.64
11 > SP500 C l o s e [ 2 : 4 ]
12 3 / 14 / 2017 3 / 15 / 2017 3 / 16 / 2017
13 2365.45 2368.94 2377.18
14 > ( SP500 mean <− sum ( SP500 C l o s e ) / l e n g t h ( SP500 C l o s e ) )
15 [ 1 ] 2372.536
16 > mean ( SP500 C l o s e )
17 [ 1 ] 2372.536

Bin Zou (UW) CFRM 461 23/40


Matrix I
matrix(data = NA, nrow = 1, ncol = 1, byrow = FALSE,
dimnames = NULL)
I data: data vector
I byrow: the matrix is filled by columns (FALSE) or rows (TRUE)

1 > mdat <− m a t r i x ( c ( 1 , 2 , 3 , 1 1 , 1 2 , 1 3 ) , nrow = 2 , n c o l = 3 ,


byrow = TRUE,
2 + dimnames = l i s t ( c ( ” row1 ” , ” row2 ” ) ,
3 + c ( ”C. 1 ” , ”C. 2 ” , ”C. 3 ” ) ) )
4 > mdat
5 C. 1 C. 2 C. 3
6 row1 1 2 3
7 row2 11 12 13
8
9 > mx <− m a t r i x ( c ( 1 , 2 , 3 , 4 , 5 , 6 ) , byrow = TRUE, nrow = 2 )
10 > mx
11 [ ,1] [ ,2] [ ,3]
12 [1 ,] 1 2 3
13 [2 ,] 4 5 6

Bin Zou (UW) CFRM 461 24/40


Matrix II

1 > c o l 1 <− c ( 1 , 4 )
2 > c o l 2 <− c ( 2 , 5 )
3 > c o l 3 <− c ( 3 , 6 )
4 > (mx2 <− c b i n d ( c o l 1 , c o l 2 , c o l 3 ) )
5 col1 col2 col3
6 [1 ,] 1 2 3
7 [2 ,] 4 5 6
8 > row1 <− c ( 1 , 2 , 3 )
9 > row2 <− c ( 4 , 5 , 6 )
10 > (mx3 <− r b i n d ( row1 , row2 ) )
11 [ ,1] [ ,2] [ ,3]
12 row1 1 2 3
13 row2 4 5 6
14 > r name <− c ( ”Row 1 ” , ”Row 2 ” )
15 > rownames (mx2) <− r name
16 > mx2
17 col1 col2 col3
18 Row 1 1 2 3
19 Row 2 4 5 6

I cbind (rbind): Combine R Objects by Columns or Rows


I colnames (rownames): Column names or Row names of a matrix
Bin Zou (UW) CFRM 461 25/40
1 > mx2
2 col1 col2 col3
3 Row 1 1 2 3
4 Row 2 4 5 6
5
6 > rowSums (mx2)
7 Row 1 Row 2
8 6 15
9 > colSums (mx2)
10 col1 col2 col3
11 5 7 9
12 > dim (mx2)
13 [1] 2 3

I rowSums: returns the summation of all rows of a matrix


I colSums: returns the summation of all columns of a matrix
I dim: returns the dimension of a matrix, row number and column
number

Bin Zou (UW) CFRM 461 26/40


Selecting Elements of Matrix

1 > mx2
2 col1 col2 col3
3 Row 1 1 2 3
4 Row 2 4 5 6
5
6 > mx2 [ 1 , 2 ]
7 [1] 2
8 > mx2 [ 2 , 3 ]
9 [1] 6
10 > mx2 [ , 3 ]
11 [1] 3 6
12 > mx2 [ 2 , ]
13 [1] 4 5 6
14 > mx2 [ 1 , 2 : 3 ]
15 [1] 2 3
16 > mx2 [ 1 : 2 , 1 : 2 ]
17 col1 col2
18 Row 1 1 2
19 Row 2 4 5

Bin Zou (UW) CFRM 461 27/40


Matrix III
1 > # c r e a t e a 2 by 5 m a t r i x u s i n g t h e data s e q ( 1 , 5 , 0 . 5 )
2 > x data <− s e q ( 1 , 5 , 0 . 5 )
3 > x <− a r r a y ( x data , dim = c ( 2 , 5 ) )
4 > x
5 [ ,1] [ ,2] [ ,3] [ ,4] [ ,5]
6 [1 ,] 1.0 2.0 3.0 4.0 5
7 [2 ,] 1.5 2.5 3.5 4.5 1
8
9 > i <− c ( 1 , 4 , 7 )
10 > x[ i ]
11 [ 1 ] 1.0 2.5 4.0
12
13 > j <− a r r a y ( c ( 1 , 2 , 3 , 2 ) , dim = c ( 2 , 2 ) )
14 > j
15 [ ,1] [ ,2]
16 [1 ,] 1 3
17 [2 ,] 2 2
18 > x[ j ]
19 [ 1 ] 3.0 2.5
20
21 > a r r a y ( 0 , dim = c ( 2 , 3 ) )
22 [ ,1] [ ,2] [ ,3]
23 [1 ,] 0 0 0
24 [2 ,] 0 0 0

Bin Zou (UW) CFRM 461 28/40


Matrix Operations
I transpose of a matrix: t()
I multiplication: %*%
I crossproduct: crossprod(A, b) ⇔ t(A) %*% b
crossprod(A) ⇔ t(A) %*% A
I number of rows/columns: nrow() and ncol()
I diag(v): (1) if v is a vector, then diag(v) returns a diagonal
matrix; (2) if v is a matrix, then diag(v) return a vector of the
diagonal elements of v; (3) if v is a scalar number, then diag(v)
returns a v by v identity matrix
I Inverse of a matrix A: A−1 = solve(A)
Solving A x = b: x <- solve(A, b)
(less desired option: x <- solve(A) %*% b)
I ev <- eigen(A): eigenvalues and eigenvectors of a square matrix
ev$values and ev$vectors
Compute eigenvalues: eigen(A, [Link]=TRUE)$values
I determinant: det()
I out product: a %o% b or outer(a, b, "*")
Bin Zou (UW) CFRM 461 29/40
1 > ( m1 <− m a t r i x ( c ( 1 , 3 , 2 , 5 ) , nrow = 2 , byrow = TRUE) )
2 [ ,1] [ ,2]
3 [1 ,] 1 3
4 [2 ,] 2 5
5 > ( m2 <− m a t r i x ( c ( 1 , 2 , 3 , 4 , 5 , 6 ) , nrow = 2 , byrow = TRUE) )
6 [ ,1] [ ,2] [ ,3]
7 [1 ,] 1 2 3
8 [2 ,] 4 5 6
9 > d e t (m1)
10 [ 1 ] −1
11 > ( m3 <− s o l v e (m1) )
12 [ ,1] [ ,2]
13 [1 ,] −5 3
14 [2 ,] 2 −1
15 > b <− c ( 2 , 4 )
16 > ( x <− s o l v e (m1 , b ) )
17 [1] 2 0
18 > ev <− e i g e n (m1)
19 > ev $ v a l u e s
20 [1] 6 . 1 6 2 2 7 7 7 −0.1622777
21 > ev $ v e c t o r s
22 [ ,1] [ ,2]
23 [ 1 , ] −0.5024547 −0.9324647
24 [ 2 , ] −0.8646035 0 . 3 6 1 2 6 1 0

Bin Zou (UW) CFRM 461 30/40


Outline

1 Brief Introduction

2 Basic Mathematical Operations

3 Vector and Matrix Operations

4 Graphic Features

5 Writing Your Own Functions

6 Extra

Bin Zou (UW) CFRM 461 31/40


Basic command: plot(x, y, ...)
Please use help("plot") to read the help document (see below):

Use demo(graphics) to study examples from R

Bin Zou (UW) CFRM 461 32/40


1 > rm ( l i s t = l s ( ) )
2 > x <− s e q ( 0 , pi , l e n g t h = 1 0 0 )
3 > y <− s i n ( x )
4 > p l o t ( x , y , ” l ” , main=”y = s i n ( x ) ” )

To specify the plotting region, use xlim = and ylim =


e.g., xlim = c(0, pi/2)

Bin Zou (UW) CFRM 461 33/40


1 > i n s t a l l . p a c k a g e s ( ”quantmod” )
2 > l i b r a r y ( quantmod )
3 > getSymbols ( ”SBUX” )
4 [ 1 ] ”SBUX”
5 > p l o t (SBUX, main = ” S t a r b u c k s S t o c k P r i c e ” )

Bin Zou (UW) CFRM 461 34/40


1 > i n s t a l l . p a c k a g e s ( ”quantmod” )
2 > l i b r a r y ( quantmod )
3 > getSymbols ( ”SBUX” )
4 [ 1 ] ”SBUX”
5 > getSymbols ( ”MCD” )
6 [ 1 ] ”MCD”
7 > par ( mfrow = c ( 2 , 1 ) ) # 2 p l o t s i n one window
8 > p l o t (SBUX)
9 > p l o t (MCD)

Bin Zou (UW) CFRM 461 35/40


Outline

1 Brief Introduction

2 Basic Mathematical Operations

3 Vector and Matrix Operations

4 Graphic Features

5 Writing Your Own Functions

6 Extra

Bin Zou (UW) CFRM 461 36/40


Example
To calculate the correlation coefficient ρ of two variables X and Y
with observations xi and yi , i = 1, 2, · · · , n, we use
Pn
(xi − x̄)(yi − ȳ)
ρ = pPn i=1 Pn
2 2
i=1 i − x̄)
(x i=1 (xi − x̄)

1 c o r r e l <− f u n c t i o n ( x , y )
2 {
3 nx <− l e n g t h ( x )
4 ny <− l e n g t h ( y )
5 i f ( nx != ny )
6 s t o p ( ”Two i n p u t v e c t o r s have d i f f e r e n t d i m e n s i o n s ! ” )
7 x mean <− mean ( x )
8 y mean <− mean ( y )
9 xy <− sum ( ( x − x mean ) ∗ ( y − y mean ) )
10 x sq <− sum ( ( x − x mean ) ˆ 2 )
11 y sq <− sum ( ( y − y mean ) ˆ 2 )
12 c o r r <− xy / s q r t ( x sq ∗ y sq )
13 c a t ( ”The c o r r e l a t i o n c o e f f i c i e n t o f two v a r i a b l e s i s \n” )
14 corr
15 }

Bin Zou (UW) CFRM 461 37/40


Outline

1 Brief Introduction

2 Basic Mathematical Operations

3 Vector and Matrix Operations

4 Graphic Features

5 Writing Your Own Functions

6 Extra

Bin Zou (UW) CFRM 461 38/40


R Packages

I search(): list all currently loaded libraries


I find(): find the library for a function
I library(): list all libraries installed/load a library
I [Link](""): install packages
e.g., [Link]("quantmod")

1 > search ()
2 [ 1 ] ” . GlobalEnv ” ” tools : rstudio ” ” package : s t a t s ”
3 [ 4 ] ” package : g r a p h i c s ” ” package : g r D e v i c e s ” ” package : u t i l s ”
4 [ 7 ] ” package : d a t a s e t s ” ” package : methods ” ” Autoloads ”
5 [ 1 0 ] ” package : b a s e ”
6 > find (” solve ”)
7 [ 1 ] ” package : b a s e ”

Bin Zou (UW) CFRM 461 39/40


In this course, we shall study regression models, probability, statistical
inference, etc, and almost all of them can be implemented in R as well.
Please study related materials on your own.

Bin Zou (UW) CFRM 461 40/40

You might also like