SlideShare a Scribd company logo
PERFORMANCE
ANALYSIS WITH (I)
Jérémy Morvan
Assistant professor
January 2018
Université de Bretagne Occidentale
INTRODUCTION
2
Introduction
• Financial performance assessment is an important issue
• An economic issue
• Financialization of the economy has led financial markets to drive
economic coordination
• A methodological issue
• How assessing portfolio performance?
• A theoretical issue
• How do financial markets work?
3
Introduction
• This course is an introduction to financial performance
analysis by using the programming language R
• What is performance in finance?
• What are the expected results according to modern portfolio
theory?
• What are the measures of performance?
4
Introduction
• Contents (I)
1. Performance in finance
2. Descriptive statistics
3. Histogram and Normality tests
4. Mean-variance analysis
5
I. WHAT IS PERFORMANCE IN
FINANCE?
6
Performance in finance
• Historical
• Performance analysis is one of the basic issues that built the
modern portfolio theory
• Bachelier (1900) highlights that the rise and the fall of prices are
equiprobable at any time
• Prices fluctuate randomly
• Cowles (1933, 1944) highlights that investment advices from financial
analysts do not allow to outperform the market
• It is impossible to predict future prices
7
Performance in finance
• Efficient market hypothesis
• Definition
8
[…] the ideal is a market in which prices provide accurate signal for ressource
allocation: that is, a market in which firms can make production-Investment decisions,
and investors can choose among the securities that represent ownership of firms’
activities under the assumption that security prices at any time "fully reflect" all
available information. A market in which prices always "fully reflect" available
information is called "efficient". (Fama E., 1970)
[the market efficiency hypothesis is] the simple statement that security prices fully
reflect allavailable information. A precondition for this strong version of the hypothesis
is that information and tranding costs, the costs of getting prices to reflect information,
are always 0 (Grossman and Stiglitz (1980). A weaker and enconomically more
sensible version of the efficiency hypothesis says that prices reflect information to the
point where the marginal benefits of acting on information (the profits to be made) do
not exceed the marginal costs (Jensen (1978). (Fama E., 1991)
Performance in finance
• Efficient market hypothesis
• Definition
• The definition of efficient markets varies according to the informational
set considered (Fama, 1970)
9
Present information
(semi-strong form
efficiency)
Past information
(weak-form
efficiency)
All information sets,
including private
information (strong-
form efficiency)
Performance in finance
• Efficient market hypothesis
• Consequences
• Price is an unbiased estimate of the intrinsic value of a security
• There is no better financial analyst than the market
• Future variations are independent of past variations
• Random walk theory
• Investors cannot forecast prices successully
• The theory assumes that managers do not add value (a) to the portfolio
10
Performance in finance
• Efficient frontier (Markowitz, 1952)
• The efficient frontier is the set of optimal portfolios that offers the
highest expected return for a given level of risk or the lowest risk for
a defined level of expected return
• Two stochastic dominance decision rules
• An efficient portfolio optimizes the risk/reward ratio
• A diversified portfolio should have at least 50 investments (see Euro
Stoxx 50)
11
At a given level of return,
investors choose the less
risky asset
At a given level of risk,
investors choose the asset
with highest returns
Performance in finance
• Efficient frontier (Markowitz, 1952)
• Well-diversified portfolios tend to have similar return (given account
the risk) and rare extreme returns
12
Asset 1
Asset 2
Rf
0,00%
2,00%
4,00%
6,00%
8,00%
10,00%
12,00%
14,00%
0,00% 5,00% 10,00% 15,00% 20,00% 25,00%
Return (Ri)
Volatility (si)
Portfolio of two risky assets Portfolio with one risky asset and the risk free asset
Performance in finance
• Expected results
• Financial performance integrates return and risk
• There are several measures of return (max, mean…) and risk (min, s,
VaR…)
• Returns are random
• The most common representation of randomness is the Gaussian
distribution
• A skilled manager shows a similar performance to the market given
the risk
• Outperformance is impossible
• Underperformance is possible
13
A great number of causes Causes are independant
Each cause has
a small effect
Performance in finance
• Critics
• Behavioral Finance
• Many behavioral biases impact investment decisions
• Market anomalies
• Calendar anomalies
• "January effect" is an abnormal increase in stock prices in January
• "Weekend effect": stock returns on Monday are often significantly lower
• Other anomalies
• Small firms tend to outperfom
• There is a negative relation between PER and returns and between market to
book ratio and returns
• The Gaussian distribution imperfectly represents return ditribution
• … by underestimating risk
14
2. DATA ANALYSIS
15
Data analysis
• Definition
• Statistical procedure to determine the main characteristics of a
dataset
• We use the programming language
16
#install packages (collections of functions which allow more
statistical techniques, and graphical devices)
install.packages("quantmode")
install.packages("fBasics")
install.packages("moments")
install.packages("PerformanceAnalytics")
install.packages("normtest")
install.packages("tseries")
install.packages("roll")
install.packages("xts")
Data are available in the data.csv file with
- Pi are daily closing prices of the stock i
- Pm are daily closing prices of the market index m
- RFR are daily closing rates of a 10-year constant maturity fictitious sovereign bond
• Calculation of daily returns
• Logarithmic returns are a better measure
17
#read data
data<-read.csv2(file= file.choose(),header = TRUE,sep = ";",dec = ",")
#Compute daily returns
library(quantmode)
data$Ri<-Delt(x1 = data$Pi,x2 = NULL,k = 1,type = "log")
data$Rm<-Delt(x1 = data$Pm,x2 = NULL,k = 1,type = "log")
data$Rf<-log(1+data$RFR/250)
#Clean up data object
#suppress 1st row
data<-data[-1,]
#suppress colums 2,3,4 (we only keep colums 1, 5 to 7)
data<-data[,c(1,5:7)]









1,
,
, ln
ti
ti
ti
R
R
R
Data analysis
If the package “quantmode” doesn’t
work (it happens !), we can compute
daily returns as follows data$Ri[2:774]<-log(data$Pi[2:774]/data$Pi[1:773])
data$Ri[2:774]<-diff(log(data$Pi))
• Descriptive statistics
• Main measures
18
Ri Rm Rf
nobs 773.000000 773.000000 774.000000
NAs 0.000000 0.000000 0.000000
Minimum -0.035737 -0.032272 0.000093
Maximum 0.035524 0.025047 0.000156
I. Quartile -0.004088 -0.004349 0.000114
3. Quartile 0.005653 0.005855 0.000142
Mean 0.000491 0.000529 0.000127
Median 0.000639 0.000844 0.000130
Sum 0.379467 0.409023 0.097973
SE Mean 0.000298 0.000299 0.000001
LCL Mean -0.000094 -0.000057 0.000125
UCL Mean 0.001075 0.001115 0.000128
Variance 0.000069 0.000069 0.000000
Stdev 0.008278 0.008300 0.000017
Skewness -0.369131 -0.391430 -0.352644
Kurtosis I.794045 I.091768 -1.073065
 



n
t
itii RR
n 1
2
,
2
1
1
s
  

n
t
tiii R
n
RRE
1
,
1
library(fBasics)
basicStats(data[,2:4])















 

3
i
ii
i
RR
ESk
s















 

4
i
ii
i
RR
EK
s
Data analysis
• Descriptive statistics
• Main measures
19
Measures Definition
Mean
In finance, mean is a performance measure
The average is calculated on daily data. It must be annualized (n = 252 days)
Variance
In finance, the variance is a risk measure
The variance is calculated on daily data. It must be annualized
The variance is expressed in the square of the unit of measure ("%²"). The
standard deviation is the square root of the variance.
yMean.Ri<-mean(data$Ri)*252
yMean.Rm<-mean(data$Rm)*252
ySD.Ri<-sd(data$Ri)*sqrt(252)
ySD.Rm<-sd(data$Rm)*sqrt(252)
Data analysis
• Descriptive statistics
• Main measures
20
Measures Definition
Skewness
(Sk)
Skewness is a measure of asymmetry of the probability distribution
• If > 0, the most part of the distribution is concentrated on the left of the figure (the right tail
is longer)
• If < 0, the most part of the distribution is concentrated on the right of the figure (the left tail
is longer)
Kurtosis
(K)
Kurtosis is a measure of of the probability distribution (1 < K < ∞)
• If > 3, leptokurtic distribution (the data are heavy-tailed: extreme returns are more frequent
than predicted by the gaussian distribution)
• If < 3, platykurtic distribution (the data are light-tailed: extreme returns are less frequent
than predicted by the gaussian distribution)
Data analysis
Data analysis
• Descriptive statistics
• Main measures
• Some measures of kurtosis
• Kurtosis is sometimes calculated in excess of 3
21
[1] 1.794045
attr(,"method")
[1] "excess“
[1] 4.794045
[1] 1.806473
[1] 4.806473
library(moments)
kurtosis(data$Ri)
mean(((data$Ri-mean(data$Ri))/sd(data$Ri))^4)
library(PerformanceAnalytics)
kurtosis(data$Ri, na.rm = FALSE, method = "excess")
kurtosis(data$Ri, na.rm = FALSE, method = "moment")
Most explicit
command!
Data analysis
• Descriptive statistics
• Main measures
• Some measures of skewness
22
library(moments)
skewness(data$Ri)
mean(((data$Ri-mean(data$Ri))/sd(data$Ri))^3)
library(PerformanceAnalytics)
skewness(data$Ri, na.rm = FALSE)
Delt.1.log
-0.3698488
[1] -0.3691314
[1] -0.3698488
There are sometimes
(small) differences in
the results
3. NORMALITY TESTS
23
Normality tests
• Histogram of returns
• For financial theory, markets evolve randomly
• A common representation of randomness is the Gaussian distribution
• The Gaussian distribution has a causal structure that defines a relatively
stable world
• ... consistent with the EMH (and perfect competition)
• Extreme returns are rare
• Returns around mean are the most frequent
24
Brownian motion Stochastic process Random walk
Normality tests
• Histogram of returns
• Definition
• Graphic that represents the distribution of numerical data
• It is a graphical way to compare empirical and theoretical distributions
25
hist(data$Ri,main = "Histograms of Ri and Rm", breaks = 100, freq =
FALSE, xlab = "Ri", xlim = c(min(data$Ri,data$Rm),
max(data$Ri,data$Rm)), col = "green",axes = F)
axis(1, pos = 0, cex.axis = 0.8)
axis(2,pos = 0,cex.axis = 0.8,las = 2)
hist(data$Rm,breaks = 50, freq = FALSE, xlim =
c(min(data$Ri,data$Rm), max(data$Ri,data$Rm)), col = "red",,axes =
F,add = TRUE)
curve(dnorm(x, mean(data$Ri), sd(data$Ri)), xlim = c(min(data$Ri),
max(data$Ri)), lwd = 2,col = "grey", add = TRUE)
curve(dnorm(x, mean(data$Rm), sd(data$Rm)), xlim = c(min(data$Rm),
max(data$Rm)), lwd = 2,col = "red", add = TRUE)
legend("topleft",c("Histogram of Ri","Histogram of Rm"),lty =
c(1,1),col = c("green","red"),bty = "n")
Normality tests
• Histogram of returns
26
Sharper
distribution
Less returns
than expected
on both sides
"fat" tails
Normality tests
• Histogram of returns
• The Gaussian distribution poorly approximates the return
distribution
• It underestimates the probability of extreme returns
27
(min(data$Ri)-mean(data$Ri))/sd(data$Ri)
pnorm(q = (min(data$Ri)-mean(data$Ri))/sd(data$Ri),mean = 0,sd =
1, lower.tail = TRUE, log.p = FALSE)
format(x = pnorm(q = -4.376432,mean = 0,sd = 1, lower.tail =
TRUE,log.p = FALSE),scientific = FALSE, digits = 10)
format(x = 1/(pnorm(q = -4.376432, mean = 0, sd = 1,TRUE,
FALSE)*nrow(data$Ri)), scientific = FALSE, digits = 10)
[1] -4.376432
[1] 6.03189e-06
[1] "0.000006031890184"
[1] "214.4702608"
the worst return occurred 1 time
out of 773 or 214 times too
often…
• Normality test of distributions
• Jarque-Bera non-parametric test (1980) (for n >> 0)
• H0: Sk = 0 and K = 3 (the data follows a Gaussian distribution)
• H1: Sk ≠ 0 or K ≠ 3 (the data do not follow a Gaussian distribution)
28
Jarque-Bera test for normality
data: data$Ri
JB = 122.73, p-value < 2.2e-16
Title:
Jarque - Bera Normalality Test
Test Results:
STATISTIC:
X-squared: 122.7298
P VALUE:
Asymptotic p Value: < 2.2e-16
Jarque Bera Test
data: data$Ri
X-squared = 122.73, df = 2, p-value < 2.2e-16
  






22
3
4
1
6
ii
i
i KSk
n
JB
Normality tests
library(normtest)
jb.norm.test(data$Ri)
library(fBasics)
jarqueberaTest(data$Ri)
library(tseries)
jarque.bera.test(data$Ri)
Normality tests
• Normality test of distributions
• Non-parametric test of Kolgomorov-Smirnov
• H0: D = D0 (the data follow the Gaussian distribution)
• H1: D ≠ D0 (the data do not follow the Gaussian distribution)
29
Title: One-sample Kolmogorov-Smirnov test
Test Results:
STATISTIC:
D: 0.4878
P VALUE:
Alternative Two-Sided: < 2.2e-16
Alternative Less: < 2.2e-16
Alternative Greater: < 2.2e-16
library(fBasics)
ksnormTest(data$Ri)
At a = 10%, criticial value = 1,223/√n
At a = 5%, criticial value = 1,358/ √n
At a = 1%, criticial value = 1,629/ √n
If oberved value D > criticial value, H0 is rejected
3. MEAN-VARIANCE ANALYSIS
30
• Definition
• Combination of statistical hypothesis tests
• Parametric tests assume that sample data follow a probability
distribution based on a given set of parameters
• Two risks of error
• The type I error rate is the probability of rejecting the null hypothesis
given that it is true
• The type I error is the p-value (or significance level) a = 1%, 5% or 10%
• The type II error occurs when the null hypothesis is false, but is not
rejected
• The rate of the type II error (b is linked to the power of the test (1− b)
31
Mean-variance analysis
F-test of equality of
variances
Student t-test
Parameter
Null hypothesis
(H0)
Alternative
hypothesis (H1)
• Definition
• Combination of two statistical hypothesis tests on variance and
mean
32
21 mm 
21 mm 
22
1 2
ss 
22
1 2
ss 
1
1
2
2
22
1
2
11
1;1 21



n
Sn
n
Sn
F nn
   
 
2
11
21
21
2
22
2
11
2121
221









 nn
nn
SnSn
mmXX
T nn
When n1 = n2, 2
2
2
1
1;1 21
S
S
F nn 
Mean-variance analysis
• Parametric tests
• Decision rule
• F-test of equality of variances
• Student t-test
33
0
H0 is valid H0 is rejected
1 Critical value
at 10%
Critical value
at 5%
Critical value
at 1%
The value is more and more frequently calculated
• If p value < 1%, H0 is rejected at 1% (***)
• If p value < 5%, H0 is rejected at 5% (**)
• If p value < 10%, H0 is rejected at 10% (*)
Mean-variance analysis
H0 is valid H0 is rejected
Critical value
at 10%
Critical value
at 5%
Critical value
at 1%
• Parametric tests
• F-test of equality of variances
• Is the variance of Ri different from the variance of Rm?
34
F test to compare two variances
data: data$Ri and data$Rm
F = 0.99478, num df = 772, denom df = 772, p-value = 0.9421
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.8637999 1.1456325
sample estimates:
ratio of variances
0.994785
var.test(x = data$Ri,y = data$Rm)
The test
doesn’t follow
the convention
2
2
2
1 ss 
Mean-variance analysis
ifelse(var(data$Ri) > var(data$Rm), var(data$Ri) / var(data$Rm),
var(data$Rm) / var(data$Ri))
• Parametric tests
• Student t-test
• Is the mean of Ri different from the mean of Rm?
35
Paired t-test
data: data$Ri and data$Rm
t = -0.13619, df = 772, p-value = 0.8917
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.0005893457 0.0005128742
sample estimates:
mean of the differences
-3.823577e-05
t.test(x = data$Ri,y = data$Rm,paired = TRUE)
Mean-variance analysis
• Critics
36
Strenghts Weaknesses
Mean-variance analysis
The criticisms are
especially of
financial nature
• Critics
• Volatility is not stable over time
• Calculation of 20 day rolling volatility
37
#Computing 20 day rolling Std dev
library(roll)
data$SD_Ri<-roll_sd(data$Ri,width = 20)*sqrt(252)
data$SD_Rm<-roll_sd(data$Rm,width = 20)*sqrt(252)
#Converting date data to date format
date<-as.Date(data$Date,format = "%d/%m/%Y")
data<-cbind(date,data[,-1])
library(xts)
data<-xts(data[,2:6],order.by = data[,1])
#Drawing plot
windows()
plot(data$SD_Ri[23:773], xlab = "Date", ylab = "Annualized Std
Dev",type = "l", col = "green")
lines(data$SD_Rm,col = "red")
legend("topleft",c("Std dev of Ri","Std dev of Rm"),lty =
c(1,1),col = c("green","red"),bty = "n")
title(main = "20 day rolling std dev of Ri and Rm")
Mean-variance analysis
38
Mean-variance analysis
• Critics
• Volatility is not stable over time
Mean-variance analysis
• Critics
• Volatility is not stable over time
data<-read.csv2(file.choose(),header=T,sep=";",dec=",")
data$Ri[2:774]<-diff(log(data$Pi))
data<-data[-1,]
library(roll)
data$Ri<-as.matrix(data$Ri)
data$SD_Ri<-roll_sd(data$Ri,width = 20)*sqrt(252)
windows()
par(mfrow=c(2,1))
plot(data[,2],type="h",col="grey",xlab="Date",ylab="Price
(€)",ylim=c(round(min(data[,2])-5),round(max(data[,2])+5)),axes=F)
axis(1,pos=40)
axis(2,pos=0)
title(main="Price of i")
plot(data[,6],type="h",col="grey",xlab="Date",ylab="20 day rolling
volatility (%)",ylim=c(0,0.35),axes=F)
axis(1,pos=0)
axis(2,pos=0)
title(main="20 day rolling volatility of i")
Mean-variance analysis
• Critics
• Volatility is
not stable
over time
CONCLUSION
41
Conclusion
• Statistics is “the science of collecting, analyzing,
presenting, and interpreting data”
• Descriptive statistics summarize the population data
• The histogram and the normality test make it possible to evaluate
the adequacy between a variable and the statistical law of
reference
• The expectation variance analysis allows a comparison of the
variables
42
Conclusion
• Financial modelling seeks to improve the mathematical
representation of the behavior of securities
• Monofactorial models are the precursors
• Market model (Sharpe, 1963)
• Capital Asset Pricing Model (Lintner, 1965)
• Multifactor models try to integrate more variables
• Market timing (Treynor-Mazuy, 1966)
• Arbitrage pricing theory (Ross, 1976)
• Fama-French three factor model (1993)
• Carhart four factor model (1997)
43
References
Finance
• Bachelier L. (1900), Théorie de la spéculation, Annales scientifiques de l’ENS, (17)3, 21-86
• Carthart M. (1997), “On persistence of Mutual Fund Performance”, Journal of Finance, (52), 57-82
• Cowles A. (1933), “Can Stock Market Forecasters Forecast?”, Econometrica, (1)3, 309-324
• Cowles A. (1944), “Stock Market Forecasting”, Econometrica, (12)3-4, 206-214
• Fama E. (1970), “Efficient Capital Markets: A review of Theory and Empirical Work”, Journal of Finance,
(25)2, 383-417
• Fama E. (1991), “Efficient Capital Markets”, Journal of Finance, (46)5, 1575-1617
• Fama E., K. French (1993), “Common Risk Factors in the Returns on Stocks and Bonds”, Journal of
Financial Economics, (33), 3-56.
• Lintner J. (1965), “The valuation of risk assets and the selection of risky investments in stock portfolios and
capital budgets”, Review of Economics and Statistics, 47(1), 13–37
• Markowitz H. (1952), “Portfolio Selection”, Journal of Finance, (7)1, 77-91
• Ross S. (1976), "The Arbitrage Theory of Capital Asset Pricing". Journal of Economic Theory, (13)3, 341-
360
• Sharpe W. (1963), “A Simplified Model for Portfolio Analysis”, Management Science, (9)2, 277-293
• Treynor, J., Mazuy, K. (1966), “Can Mutual Funds Outguess the Market?” Harvard Business Review, (44),
131-136
Statistics
• Jarque C., Bera A. (1980). “Efficient tests for normality, homoscedasticity and serial independence of
regression residuals”, Economics Letters. (6) 3, 255–259
44
References
• Programming with R
45

More Related Content

What's hot

Business statistics review
Business statistics reviewBusiness statistics review
Business statistics reviewFELIXARCHER
 
3.5 Exploratory Data Analysis
3.5 Exploratory Data Analysis3.5 Exploratory Data Analysis
3.5 Exploratory Data Analysis
mlong24
 
R square vs adjusted r square
R square vs adjusted r squareR square vs adjusted r square
R square vs adjusted r square
Akhilesh Joshi
 
Correlation & Regression Analysis using SPSS
Correlation & Regression Analysis  using SPSSCorrelation & Regression Analysis  using SPSS
Correlation & Regression Analysis using SPSS
Parag Shah
 
Point Estimation
Point EstimationPoint Estimation
Point Estimation
DataminingTools Inc
 
Applied Statistics In Business
Applied Statistics In BusinessApplied Statistics In Business
Applied Statistics In Business
Ashish Nangla
 
Calculation of arithmetic mean
Calculation of arithmetic meanCalculation of arithmetic mean
Calculation of arithmetic mean
Sajina Nair
 
Hypothesis testing: A single sample test
Hypothesis testing: A single sample testHypothesis testing: A single sample test
Hypothesis testing: A single sample test
Umme Salma Tuli
 
Unit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptxUnit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptx
Malla Reddy University
 
Discrimination Analysis and working on SPSS assignment
Discrimination Analysis and working on SPSS assignmentDiscrimination Analysis and working on SPSS assignment
Discrimination Analysis and working on SPSS assignment
basitktr
 
Radix sort
Radix sortRadix sort
Radix sort
zahraa F.Muhsen
 
DUMMY VARIABLE REGRESSION MODEL
DUMMY VARIABLE REGRESSION MODELDUMMY VARIABLE REGRESSION MODEL
DUMMY VARIABLE REGRESSION MODEL
Arshad Ahmed Saeed
 
Multiple Regression
Multiple RegressionMultiple Regression
Multiple Regression
Khawaja Naveed
 
application of correlation
application of correlationapplication of correlation
application of correlation
sudhanyavinod
 
Time series Analysis
Time series AnalysisTime series Analysis
COVARIANCE IN PROBABILITY
COVARIANCE IN PROBABILITYCOVARIANCE IN PROBABILITY
COVARIANCE IN PROBABILITY
MOHD BILAL NAIM SHAIKH
 
Set in discrete mathematics
Set in discrete mathematicsSet in discrete mathematics
Set in discrete mathematics
University of Potsdam
 
Index Number
Index Number Index Number
Linear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec domsLinear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec doms
Babasab Patil
 

What's hot (20)

Business statistics review
Business statistics reviewBusiness statistics review
Business statistics review
 
3.5 Exploratory Data Analysis
3.5 Exploratory Data Analysis3.5 Exploratory Data Analysis
3.5 Exploratory Data Analysis
 
Index Number
Index NumberIndex Number
Index Number
 
R square vs adjusted r square
R square vs adjusted r squareR square vs adjusted r square
R square vs adjusted r square
 
Correlation & Regression Analysis using SPSS
Correlation & Regression Analysis  using SPSSCorrelation & Regression Analysis  using SPSS
Correlation & Regression Analysis using SPSS
 
Point Estimation
Point EstimationPoint Estimation
Point Estimation
 
Applied Statistics In Business
Applied Statistics In BusinessApplied Statistics In Business
Applied Statistics In Business
 
Calculation of arithmetic mean
Calculation of arithmetic meanCalculation of arithmetic mean
Calculation of arithmetic mean
 
Hypothesis testing: A single sample test
Hypothesis testing: A single sample testHypothesis testing: A single sample test
Hypothesis testing: A single sample test
 
Unit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptxUnit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptx
 
Discrimination Analysis and working on SPSS assignment
Discrimination Analysis and working on SPSS assignmentDiscrimination Analysis and working on SPSS assignment
Discrimination Analysis and working on SPSS assignment
 
Radix sort
Radix sortRadix sort
Radix sort
 
DUMMY VARIABLE REGRESSION MODEL
DUMMY VARIABLE REGRESSION MODELDUMMY VARIABLE REGRESSION MODEL
DUMMY VARIABLE REGRESSION MODEL
 
Multiple Regression
Multiple RegressionMultiple Regression
Multiple Regression
 
application of correlation
application of correlationapplication of correlation
application of correlation
 
Time series Analysis
Time series AnalysisTime series Analysis
Time series Analysis
 
COVARIANCE IN PROBABILITY
COVARIANCE IN PROBABILITYCOVARIANCE IN PROBABILITY
COVARIANCE IN PROBABILITY
 
Set in discrete mathematics
Set in discrete mathematicsSet in discrete mathematics
Set in discrete mathematics
 
Index Number
Index Number Index Number
Index Number
 
Linear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec domsLinear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec doms
 

Similar to Performance analysis with R

Random Portfolio using R to create investment strategy for Hedge Fund
Random Portfolio using R to create investment strategy for Hedge FundRandom Portfolio using R to create investment strategy for Hedge Fund
Random Portfolio using R to create investment strategy for Hedge FundKrunal Naik, MBA, PMP, CSM
 
1.1.Introduction Econometrics.pptx
1.1.Introduction Econometrics.pptx1.1.Introduction Econometrics.pptx
1.1.Introduction Econometrics.pptx
AyushKumar685245
 
C6
C6C6
The Process Of Portfolio Management
The Process Of Portfolio ManagementThe Process Of Portfolio Management
The Process Of Portfolio ManagementHitesh Kukreja
 
The Process of Portfolio Management
The Process of Portfolio ManagementThe Process of Portfolio Management
The Process of Portfolio ManagementHitesh Kukreja
 
BlueBookAcademy.com - Risk, Return & Diversification Techniques
BlueBookAcademy.com - Risk, Return & Diversification TechniquesBlueBookAcademy.com - Risk, Return & Diversification Techniques
BlueBookAcademy.com - Risk, Return & Diversification Techniquesbluebookacademy
 
RISK+AND+RETURN+I.ppt
RISK+AND+RETURN+I.pptRISK+AND+RETURN+I.ppt
RISK+AND+RETURN+I.ppt
Âñşĥûl Prakash
 
Unit_2_IAPM_PPT.pdf
Unit_2_IAPM_PPT.pdfUnit_2_IAPM_PPT.pdf
Unit_2_IAPM_PPT.pdf
amrutrajg
 
Statistical analysis
Statistical analysisStatistical analysis
Statistical analysisDharmik
 
Business Finance Chapter 11 Risk and return
Business Finance Chapter 11 Risk and returnBusiness Finance Chapter 11 Risk and return
Business Finance Chapter 11 Risk and return
Tinku Kumar
 
security analysis and port portfolio mgmt
security analysis and port portfolio mgmtsecurity analysis and port portfolio mgmt
security analysis and port portfolio mgmt
Babasab Patil
 
Ch01
Ch01Ch01
Portpolio mgt.ch01
Portpolio mgt.ch01Portpolio mgt.ch01
Portpolio mgt.ch01
Harihara puthiran
 
Portfolio management
Portfolio managementPortfolio management
Portfolio management
anilkumar
 
Perfmeasure.ppt
Perfmeasure.pptPerfmeasure.ppt
Perfmeasure.ppt
Mmdmmd4
 
Hidden Treasure of High Frequency Dynamics
Hidden Treasure of High Frequency DynamicsHidden Treasure of High Frequency Dynamics
Hidden Treasure of High Frequency DynamicsOlsen
 
The process of portfolio management
The process of portfolio managementThe process of portfolio management
The process of portfolio management
Saxbee Consultants
 
Capital Asset pricing model- lec6
Capital Asset pricing model- lec6Capital Asset pricing model- lec6
Capital Asset pricing model- lec6
University of Balochistan
 
Empowering Innovation Portfolio Decision-Making through Simulation
Empowering Innovation Portfolio Decision-Making through SimulationEmpowering Innovation Portfolio Decision-Making through Simulation
Empowering Innovation Portfolio Decision-Making through Simulation
Sopheon
 

Similar to Performance analysis with R (20)

Random Portfolio using R to create investment strategy for Hedge Fund
Random Portfolio using R to create investment strategy for Hedge FundRandom Portfolio using R to create investment strategy for Hedge Fund
Random Portfolio using R to create investment strategy for Hedge Fund
 
1.1.Introduction Econometrics.pptx
1.1.Introduction Econometrics.pptx1.1.Introduction Econometrics.pptx
1.1.Introduction Econometrics.pptx
 
C6
C6C6
C6
 
The Process Of Portfolio Management
The Process Of Portfolio ManagementThe Process Of Portfolio Management
The Process Of Portfolio Management
 
The Process of Portfolio Management
The Process of Portfolio ManagementThe Process of Portfolio Management
The Process of Portfolio Management
 
BlueBookAcademy.com - Risk, Return & Diversification Techniques
BlueBookAcademy.com - Risk, Return & Diversification TechniquesBlueBookAcademy.com - Risk, Return & Diversification Techniques
BlueBookAcademy.com - Risk, Return & Diversification Techniques
 
RISK+AND+RETURN+I.ppt
RISK+AND+RETURN+I.pptRISK+AND+RETURN+I.ppt
RISK+AND+RETURN+I.ppt
 
Unit_2_IAPM_PPT.pdf
Unit_2_IAPM_PPT.pdfUnit_2_IAPM_PPT.pdf
Unit_2_IAPM_PPT.pdf
 
Statistical analysis
Statistical analysisStatistical analysis
Statistical analysis
 
Business Finance Chapter 11 Risk and return
Business Finance Chapter 11 Risk and returnBusiness Finance Chapter 11 Risk and return
Business Finance Chapter 11 Risk and return
 
security analysis and port portfolio mgmt
security analysis and port portfolio mgmtsecurity analysis and port portfolio mgmt
security analysis and port portfolio mgmt
 
Ch01
Ch01Ch01
Ch01
 
Portpolio mgt.ch01
Portpolio mgt.ch01Portpolio mgt.ch01
Portpolio mgt.ch01
 
Portfolio management
Portfolio managementPortfolio management
Portfolio management
 
Perfmeasure.ppt
Perfmeasure.pptPerfmeasure.ppt
Perfmeasure.ppt
 
Hidden Treasure of High Frequency Dynamics
Hidden Treasure of High Frequency DynamicsHidden Treasure of High Frequency Dynamics
Hidden Treasure of High Frequency Dynamics
 
HTHFD
HTHFDHTHFD
HTHFD
 
The process of portfolio management
The process of portfolio managementThe process of portfolio management
The process of portfolio management
 
Capital Asset pricing model- lec6
Capital Asset pricing model- lec6Capital Asset pricing model- lec6
Capital Asset pricing model- lec6
 
Empowering Innovation Portfolio Decision-Making through Simulation
Empowering Innovation Portfolio Decision-Making through SimulationEmpowering Innovation Portfolio Decision-Making through Simulation
Empowering Innovation Portfolio Decision-Making through Simulation
 

More from Jérémy Morvan

III Gestion risque obligataire
III Gestion risque obligataireIII Gestion risque obligataire
III Gestion risque obligataire
Jérémy Morvan
 
IV Gestion risque de change
IV Gestion risque de changeIV Gestion risque de change
IV Gestion risque de change
Jérémy Morvan
 
Introduction gestion des risques
Introduction gestion des risquesIntroduction gestion des risques
Introduction gestion des risques
Jérémy Morvan
 
Financial markets: Theoretical Perspectives
Financial markets: Theoretical PerspectivesFinancial markets: Theoretical Perspectives
Financial markets: Theoretical Perspectives
Jérémy Morvan
 
Analyse de la performance financière avec R
Analyse de la performance financière avec RAnalyse de la performance financière avec R
Analyse de la performance financière avec R
Jérémy Morvan
 
Socially Responsible Investment (SRI)
Socially Responsible Investment (SRI)Socially Responsible Investment (SRI)
Socially Responsible Investment (SRI)
Jérémy Morvan
 
Presentation investissement socialement responsable
Presentation investissement socialement responsablePresentation investissement socialement responsable
Presentation investissement socialement responsable
Jérémy Morvan
 
Monetary policy: monetary orthodoxy or quantitative easing?
Monetary policy: monetary orthodoxy or quantitative easing?Monetary policy: monetary orthodoxy or quantitative easing?
Monetary policy: monetary orthodoxy or quantitative easing?
Jérémy Morvan
 
Politique monétaire
Politique monétairePolitique monétaire
Politique monétaire
Jérémy Morvan
 
Un siècle d'évolution des marchés financiers (1914 2015)
Un siècle d'évolution des marchés financiers (1914 2015)Un siècle d'évolution des marchés financiers (1914 2015)
Un siècle d'évolution des marchés financiers (1914 2015)
Jérémy Morvan
 
R for research in finance
R for research in financeR for research in finance
R for research in finance
Jérémy Morvan
 
Partie II - Strategie et gouvernance universitaires
Partie II - Strategie et gouvernance universitairesPartie II - Strategie et gouvernance universitaires
Partie II - Strategie et gouvernance universitaires
Jérémy Morvan
 
Partie I - L'université et sa gouvernance
Partie I - L'université et sa gouvernancePartie I - L'université et sa gouvernance
Partie I - L'université et sa gouvernance
Jérémy Morvan
 
Partie III - Gestion opérationnelle universitaire
Partie III - Gestion opérationnelle universitairePartie III - Gestion opérationnelle universitaire
Partie III - Gestion opérationnelle universitaire
Jérémy Morvan
 
La direction d'une composante universitaire en France
La direction d'une composante universitaire en FranceLa direction d'une composante universitaire en France
La direction d'une composante universitaire en France
Jérémy Morvan
 

More from Jérémy Morvan (15)

III Gestion risque obligataire
III Gestion risque obligataireIII Gestion risque obligataire
III Gestion risque obligataire
 
IV Gestion risque de change
IV Gestion risque de changeIV Gestion risque de change
IV Gestion risque de change
 
Introduction gestion des risques
Introduction gestion des risquesIntroduction gestion des risques
Introduction gestion des risques
 
Financial markets: Theoretical Perspectives
Financial markets: Theoretical PerspectivesFinancial markets: Theoretical Perspectives
Financial markets: Theoretical Perspectives
 
Analyse de la performance financière avec R
Analyse de la performance financière avec RAnalyse de la performance financière avec R
Analyse de la performance financière avec R
 
Socially Responsible Investment (SRI)
Socially Responsible Investment (SRI)Socially Responsible Investment (SRI)
Socially Responsible Investment (SRI)
 
Presentation investissement socialement responsable
Presentation investissement socialement responsablePresentation investissement socialement responsable
Presentation investissement socialement responsable
 
Monetary policy: monetary orthodoxy or quantitative easing?
Monetary policy: monetary orthodoxy or quantitative easing?Monetary policy: monetary orthodoxy or quantitative easing?
Monetary policy: monetary orthodoxy or quantitative easing?
 
Politique monétaire
Politique monétairePolitique monétaire
Politique monétaire
 
Un siècle d'évolution des marchés financiers (1914 2015)
Un siècle d'évolution des marchés financiers (1914 2015)Un siècle d'évolution des marchés financiers (1914 2015)
Un siècle d'évolution des marchés financiers (1914 2015)
 
R for research in finance
R for research in financeR for research in finance
R for research in finance
 
Partie II - Strategie et gouvernance universitaires
Partie II - Strategie et gouvernance universitairesPartie II - Strategie et gouvernance universitaires
Partie II - Strategie et gouvernance universitaires
 
Partie I - L'université et sa gouvernance
Partie I - L'université et sa gouvernancePartie I - L'université et sa gouvernance
Partie I - L'université et sa gouvernance
 
Partie III - Gestion opérationnelle universitaire
Partie III - Gestion opérationnelle universitairePartie III - Gestion opérationnelle universitaire
Partie III - Gestion opérationnelle universitaire
 
La direction d'une composante universitaire en France
La direction d'une composante universitaire en FranceLa direction d'une composante universitaire en France
La direction d'une composante universitaire en France
 

Recently uploaded

how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.
DOT TECH
 
Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...
Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...
Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...
beulahfernandes8
 
how to swap pi coins to foreign currency withdrawable.
how to swap pi coins to foreign currency withdrawable.how to swap pi coins to foreign currency withdrawable.
how to swap pi coins to foreign currency withdrawable.
DOT TECH
 
How to get verified on Coinbase Account?_.docx
How to get verified on Coinbase Account?_.docxHow to get verified on Coinbase Account?_.docx
How to get verified on Coinbase Account?_.docx
Buy bitget
 
how to sell pi coins at high rate quickly.
how to sell pi coins at high rate quickly.how to sell pi coins at high rate quickly.
how to sell pi coins at high rate quickly.
DOT TECH
 
Webinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont BraunWebinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont Braun
FinTech Belgium
 
how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.
DOT TECH
 
What website can I sell pi coins securely.
What website can I sell pi coins securely.What website can I sell pi coins securely.
What website can I sell pi coins securely.
DOT TECH
 
The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...
The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...
The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...
beulahfernandes8
 
USDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptxUSDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptx
marketing367770
 
The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...
Antonis Zairis
 
when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.
DOT TECH
 
how to sell pi coins on Binance exchange
how to sell pi coins on Binance exchangehow to sell pi coins on Binance exchange
how to sell pi coins on Binance exchange
DOT TECH
 
how can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYChow can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYC
DOT TECH
 
What price will pi network be listed on exchanges
What price will pi network be listed on exchangesWhat price will pi network be listed on exchanges
What price will pi network be listed on exchanges
DOT TECH
 
The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.
DOT TECH
 
Introduction to Indian Financial System ()
Introduction to Indian Financial System ()Introduction to Indian Financial System ()
Introduction to Indian Financial System ()
Avanish Goel
 
Isios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdfIsios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdf
Henry Tapper
 
what is the future of Pi Network currency.
what is the future of Pi Network currency.what is the future of Pi Network currency.
what is the future of Pi Network currency.
DOT TECH
 
Financial Assets: Debit vs Equity Securities.pptx
Financial Assets: Debit vs Equity Securities.pptxFinancial Assets: Debit vs Equity Securities.pptx
Financial Assets: Debit vs Equity Securities.pptx
Writo-Finance
 

Recently uploaded (20)

how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.
 
Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...
Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...
Exploring Abhay Bhutada’s Views After Poonawalla Fincorp’s Collaboration With...
 
how to swap pi coins to foreign currency withdrawable.
how to swap pi coins to foreign currency withdrawable.how to swap pi coins to foreign currency withdrawable.
how to swap pi coins to foreign currency withdrawable.
 
How to get verified on Coinbase Account?_.docx
How to get verified on Coinbase Account?_.docxHow to get verified on Coinbase Account?_.docx
How to get verified on Coinbase Account?_.docx
 
how to sell pi coins at high rate quickly.
how to sell pi coins at high rate quickly.how to sell pi coins at high rate quickly.
how to sell pi coins at high rate quickly.
 
Webinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont BraunWebinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont Braun
 
how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.how to sell pi coins in South Korea profitably.
how to sell pi coins in South Korea profitably.
 
What website can I sell pi coins securely.
What website can I sell pi coins securely.What website can I sell pi coins securely.
What website can I sell pi coins securely.
 
The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...
The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...
The Evolution of Non-Banking Financial Companies (NBFCs) in India: Challenges...
 
USDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptxUSDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptx
 
The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...
 
when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.when will pi network coin be available on crypto exchange.
when will pi network coin be available on crypto exchange.
 
how to sell pi coins on Binance exchange
how to sell pi coins on Binance exchangehow to sell pi coins on Binance exchange
how to sell pi coins on Binance exchange
 
how can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYChow can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYC
 
What price will pi network be listed on exchanges
What price will pi network be listed on exchangesWhat price will pi network be listed on exchanges
What price will pi network be listed on exchanges
 
The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.The secret way to sell pi coins effortlessly.
The secret way to sell pi coins effortlessly.
 
Introduction to Indian Financial System ()
Introduction to Indian Financial System ()Introduction to Indian Financial System ()
Introduction to Indian Financial System ()
 
Isios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdfIsios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdf
 
what is the future of Pi Network currency.
what is the future of Pi Network currency.what is the future of Pi Network currency.
what is the future of Pi Network currency.
 
Financial Assets: Debit vs Equity Securities.pptx
Financial Assets: Debit vs Equity Securities.pptxFinancial Assets: Debit vs Equity Securities.pptx
Financial Assets: Debit vs Equity Securities.pptx
 

Performance analysis with R

  • 1. PERFORMANCE ANALYSIS WITH (I) Jérémy Morvan Assistant professor January 2018 Université de Bretagne Occidentale
  • 3. Introduction • Financial performance assessment is an important issue • An economic issue • Financialization of the economy has led financial markets to drive economic coordination • A methodological issue • How assessing portfolio performance? • A theoretical issue • How do financial markets work? 3
  • 4. Introduction • This course is an introduction to financial performance analysis by using the programming language R • What is performance in finance? • What are the expected results according to modern portfolio theory? • What are the measures of performance? 4
  • 5. Introduction • Contents (I) 1. Performance in finance 2. Descriptive statistics 3. Histogram and Normality tests 4. Mean-variance analysis 5
  • 6. I. WHAT IS PERFORMANCE IN FINANCE? 6
  • 7. Performance in finance • Historical • Performance analysis is one of the basic issues that built the modern portfolio theory • Bachelier (1900) highlights that the rise and the fall of prices are equiprobable at any time • Prices fluctuate randomly • Cowles (1933, 1944) highlights that investment advices from financial analysts do not allow to outperform the market • It is impossible to predict future prices 7
  • 8. Performance in finance • Efficient market hypothesis • Definition 8 […] the ideal is a market in which prices provide accurate signal for ressource allocation: that is, a market in which firms can make production-Investment decisions, and investors can choose among the securities that represent ownership of firms’ activities under the assumption that security prices at any time "fully reflect" all available information. A market in which prices always "fully reflect" available information is called "efficient". (Fama E., 1970) [the market efficiency hypothesis is] the simple statement that security prices fully reflect allavailable information. A precondition for this strong version of the hypothesis is that information and tranding costs, the costs of getting prices to reflect information, are always 0 (Grossman and Stiglitz (1980). A weaker and enconomically more sensible version of the efficiency hypothesis says that prices reflect information to the point where the marginal benefits of acting on information (the profits to be made) do not exceed the marginal costs (Jensen (1978). (Fama E., 1991)
  • 9. Performance in finance • Efficient market hypothesis • Definition • The definition of efficient markets varies according to the informational set considered (Fama, 1970) 9 Present information (semi-strong form efficiency) Past information (weak-form efficiency) All information sets, including private information (strong- form efficiency)
  • 10. Performance in finance • Efficient market hypothesis • Consequences • Price is an unbiased estimate of the intrinsic value of a security • There is no better financial analyst than the market • Future variations are independent of past variations • Random walk theory • Investors cannot forecast prices successully • The theory assumes that managers do not add value (a) to the portfolio 10
  • 11. Performance in finance • Efficient frontier (Markowitz, 1952) • The efficient frontier is the set of optimal portfolios that offers the highest expected return for a given level of risk or the lowest risk for a defined level of expected return • Two stochastic dominance decision rules • An efficient portfolio optimizes the risk/reward ratio • A diversified portfolio should have at least 50 investments (see Euro Stoxx 50) 11 At a given level of return, investors choose the less risky asset At a given level of risk, investors choose the asset with highest returns
  • 12. Performance in finance • Efficient frontier (Markowitz, 1952) • Well-diversified portfolios tend to have similar return (given account the risk) and rare extreme returns 12 Asset 1 Asset 2 Rf 0,00% 2,00% 4,00% 6,00% 8,00% 10,00% 12,00% 14,00% 0,00% 5,00% 10,00% 15,00% 20,00% 25,00% Return (Ri) Volatility (si) Portfolio of two risky assets Portfolio with one risky asset and the risk free asset
  • 13. Performance in finance • Expected results • Financial performance integrates return and risk • There are several measures of return (max, mean…) and risk (min, s, VaR…) • Returns are random • The most common representation of randomness is the Gaussian distribution • A skilled manager shows a similar performance to the market given the risk • Outperformance is impossible • Underperformance is possible 13 A great number of causes Causes are independant Each cause has a small effect
  • 14. Performance in finance • Critics • Behavioral Finance • Many behavioral biases impact investment decisions • Market anomalies • Calendar anomalies • "January effect" is an abnormal increase in stock prices in January • "Weekend effect": stock returns on Monday are often significantly lower • Other anomalies • Small firms tend to outperfom • There is a negative relation between PER and returns and between market to book ratio and returns • The Gaussian distribution imperfectly represents return ditribution • … by underestimating risk 14
  • 16. Data analysis • Definition • Statistical procedure to determine the main characteristics of a dataset • We use the programming language 16 #install packages (collections of functions which allow more statistical techniques, and graphical devices) install.packages("quantmode") install.packages("fBasics") install.packages("moments") install.packages("PerformanceAnalytics") install.packages("normtest") install.packages("tseries") install.packages("roll") install.packages("xts") Data are available in the data.csv file with - Pi are daily closing prices of the stock i - Pm are daily closing prices of the market index m - RFR are daily closing rates of a 10-year constant maturity fictitious sovereign bond
  • 17. • Calculation of daily returns • Logarithmic returns are a better measure 17 #read data data<-read.csv2(file= file.choose(),header = TRUE,sep = ";",dec = ",") #Compute daily returns library(quantmode) data$Ri<-Delt(x1 = data$Pi,x2 = NULL,k = 1,type = "log") data$Rm<-Delt(x1 = data$Pm,x2 = NULL,k = 1,type = "log") data$Rf<-log(1+data$RFR/250) #Clean up data object #suppress 1st row data<-data[-1,] #suppress colums 2,3,4 (we only keep colums 1, 5 to 7) data<-data[,c(1,5:7)]          1, , , ln ti ti ti R R R Data analysis If the package “quantmode” doesn’t work (it happens !), we can compute daily returns as follows data$Ri[2:774]<-log(data$Pi[2:774]/data$Pi[1:773]) data$Ri[2:774]<-diff(log(data$Pi))
  • 18. • Descriptive statistics • Main measures 18 Ri Rm Rf nobs 773.000000 773.000000 774.000000 NAs 0.000000 0.000000 0.000000 Minimum -0.035737 -0.032272 0.000093 Maximum 0.035524 0.025047 0.000156 I. Quartile -0.004088 -0.004349 0.000114 3. Quartile 0.005653 0.005855 0.000142 Mean 0.000491 0.000529 0.000127 Median 0.000639 0.000844 0.000130 Sum 0.379467 0.409023 0.097973 SE Mean 0.000298 0.000299 0.000001 LCL Mean -0.000094 -0.000057 0.000125 UCL Mean 0.001075 0.001115 0.000128 Variance 0.000069 0.000069 0.000000 Stdev 0.008278 0.008300 0.000017 Skewness -0.369131 -0.391430 -0.352644 Kurtosis I.794045 I.091768 -1.073065      n t itii RR n 1 2 , 2 1 1 s     n t tiii R n RRE 1 , 1 library(fBasics) basicStats(data[,2:4])                   3 i ii i RR ESk s                   4 i ii i RR EK s Data analysis
  • 19. • Descriptive statistics • Main measures 19 Measures Definition Mean In finance, mean is a performance measure The average is calculated on daily data. It must be annualized (n = 252 days) Variance In finance, the variance is a risk measure The variance is calculated on daily data. It must be annualized The variance is expressed in the square of the unit of measure ("%²"). The standard deviation is the square root of the variance. yMean.Ri<-mean(data$Ri)*252 yMean.Rm<-mean(data$Rm)*252 ySD.Ri<-sd(data$Ri)*sqrt(252) ySD.Rm<-sd(data$Rm)*sqrt(252) Data analysis
  • 20. • Descriptive statistics • Main measures 20 Measures Definition Skewness (Sk) Skewness is a measure of asymmetry of the probability distribution • If > 0, the most part of the distribution is concentrated on the left of the figure (the right tail is longer) • If < 0, the most part of the distribution is concentrated on the right of the figure (the left tail is longer) Kurtosis (K) Kurtosis is a measure of of the probability distribution (1 < K < ∞) • If > 3, leptokurtic distribution (the data are heavy-tailed: extreme returns are more frequent than predicted by the gaussian distribution) • If < 3, platykurtic distribution (the data are light-tailed: extreme returns are less frequent than predicted by the gaussian distribution) Data analysis
  • 21. Data analysis • Descriptive statistics • Main measures • Some measures of kurtosis • Kurtosis is sometimes calculated in excess of 3 21 [1] 1.794045 attr(,"method") [1] "excess“ [1] 4.794045 [1] 1.806473 [1] 4.806473 library(moments) kurtosis(data$Ri) mean(((data$Ri-mean(data$Ri))/sd(data$Ri))^4) library(PerformanceAnalytics) kurtosis(data$Ri, na.rm = FALSE, method = "excess") kurtosis(data$Ri, na.rm = FALSE, method = "moment") Most explicit command!
  • 22. Data analysis • Descriptive statistics • Main measures • Some measures of skewness 22 library(moments) skewness(data$Ri) mean(((data$Ri-mean(data$Ri))/sd(data$Ri))^3) library(PerformanceAnalytics) skewness(data$Ri, na.rm = FALSE) Delt.1.log -0.3698488 [1] -0.3691314 [1] -0.3698488 There are sometimes (small) differences in the results
  • 24. Normality tests • Histogram of returns • For financial theory, markets evolve randomly • A common representation of randomness is the Gaussian distribution • The Gaussian distribution has a causal structure that defines a relatively stable world • ... consistent with the EMH (and perfect competition) • Extreme returns are rare • Returns around mean are the most frequent 24 Brownian motion Stochastic process Random walk
  • 25. Normality tests • Histogram of returns • Definition • Graphic that represents the distribution of numerical data • It is a graphical way to compare empirical and theoretical distributions 25 hist(data$Ri,main = "Histograms of Ri and Rm", breaks = 100, freq = FALSE, xlab = "Ri", xlim = c(min(data$Ri,data$Rm), max(data$Ri,data$Rm)), col = "green",axes = F) axis(1, pos = 0, cex.axis = 0.8) axis(2,pos = 0,cex.axis = 0.8,las = 2) hist(data$Rm,breaks = 50, freq = FALSE, xlim = c(min(data$Ri,data$Rm), max(data$Ri,data$Rm)), col = "red",,axes = F,add = TRUE) curve(dnorm(x, mean(data$Ri), sd(data$Ri)), xlim = c(min(data$Ri), max(data$Ri)), lwd = 2,col = "grey", add = TRUE) curve(dnorm(x, mean(data$Rm), sd(data$Rm)), xlim = c(min(data$Rm), max(data$Rm)), lwd = 2,col = "red", add = TRUE) legend("topleft",c("Histogram of Ri","Histogram of Rm"),lty = c(1,1),col = c("green","red"),bty = "n")
  • 26. Normality tests • Histogram of returns 26 Sharper distribution Less returns than expected on both sides "fat" tails
  • 27. Normality tests • Histogram of returns • The Gaussian distribution poorly approximates the return distribution • It underestimates the probability of extreme returns 27 (min(data$Ri)-mean(data$Ri))/sd(data$Ri) pnorm(q = (min(data$Ri)-mean(data$Ri))/sd(data$Ri),mean = 0,sd = 1, lower.tail = TRUE, log.p = FALSE) format(x = pnorm(q = -4.376432,mean = 0,sd = 1, lower.tail = TRUE,log.p = FALSE),scientific = FALSE, digits = 10) format(x = 1/(pnorm(q = -4.376432, mean = 0, sd = 1,TRUE, FALSE)*nrow(data$Ri)), scientific = FALSE, digits = 10) [1] -4.376432 [1] 6.03189e-06 [1] "0.000006031890184" [1] "214.4702608" the worst return occurred 1 time out of 773 or 214 times too often…
  • 28. • Normality test of distributions • Jarque-Bera non-parametric test (1980) (for n >> 0) • H0: Sk = 0 and K = 3 (the data follows a Gaussian distribution) • H1: Sk ≠ 0 or K ≠ 3 (the data do not follow a Gaussian distribution) 28 Jarque-Bera test for normality data: data$Ri JB = 122.73, p-value < 2.2e-16 Title: Jarque - Bera Normalality Test Test Results: STATISTIC: X-squared: 122.7298 P VALUE: Asymptotic p Value: < 2.2e-16 Jarque Bera Test data: data$Ri X-squared = 122.73, df = 2, p-value < 2.2e-16          22 3 4 1 6 ii i i KSk n JB Normality tests library(normtest) jb.norm.test(data$Ri) library(fBasics) jarqueberaTest(data$Ri) library(tseries) jarque.bera.test(data$Ri)
  • 29. Normality tests • Normality test of distributions • Non-parametric test of Kolgomorov-Smirnov • H0: D = D0 (the data follow the Gaussian distribution) • H1: D ≠ D0 (the data do not follow the Gaussian distribution) 29 Title: One-sample Kolmogorov-Smirnov test Test Results: STATISTIC: D: 0.4878 P VALUE: Alternative Two-Sided: < 2.2e-16 Alternative Less: < 2.2e-16 Alternative Greater: < 2.2e-16 library(fBasics) ksnormTest(data$Ri) At a = 10%, criticial value = 1,223/√n At a = 5%, criticial value = 1,358/ √n At a = 1%, criticial value = 1,629/ √n If oberved value D > criticial value, H0 is rejected
  • 31. • Definition • Combination of statistical hypothesis tests • Parametric tests assume that sample data follow a probability distribution based on a given set of parameters • Two risks of error • The type I error rate is the probability of rejecting the null hypothesis given that it is true • The type I error is the p-value (or significance level) a = 1%, 5% or 10% • The type II error occurs when the null hypothesis is false, but is not rejected • The rate of the type II error (b is linked to the power of the test (1− b) 31 Mean-variance analysis
  • 32. F-test of equality of variances Student t-test Parameter Null hypothesis (H0) Alternative hypothesis (H1) • Definition • Combination of two statistical hypothesis tests on variance and mean 32 21 mm  21 mm  22 1 2 ss  22 1 2 ss  1 1 2 2 22 1 2 11 1;1 21    n Sn n Sn F nn       2 11 21 21 2 22 2 11 2121 221           nn nn SnSn mmXX T nn When n1 = n2, 2 2 2 1 1;1 21 S S F nn  Mean-variance analysis
  • 33. • Parametric tests • Decision rule • F-test of equality of variances • Student t-test 33 0 H0 is valid H0 is rejected 1 Critical value at 10% Critical value at 5% Critical value at 1% The value is more and more frequently calculated • If p value < 1%, H0 is rejected at 1% (***) • If p value < 5%, H0 is rejected at 5% (**) • If p value < 10%, H0 is rejected at 10% (*) Mean-variance analysis H0 is valid H0 is rejected Critical value at 10% Critical value at 5% Critical value at 1%
  • 34. • Parametric tests • F-test of equality of variances • Is the variance of Ri different from the variance of Rm? 34 F test to compare two variances data: data$Ri and data$Rm F = 0.99478, num df = 772, denom df = 772, p-value = 0.9421 alternative hypothesis: true ratio of variances is not equal to 1 95 percent confidence interval: 0.8637999 1.1456325 sample estimates: ratio of variances 0.994785 var.test(x = data$Ri,y = data$Rm) The test doesn’t follow the convention 2 2 2 1 ss  Mean-variance analysis ifelse(var(data$Ri) > var(data$Rm), var(data$Ri) / var(data$Rm), var(data$Rm) / var(data$Ri))
  • 35. • Parametric tests • Student t-test • Is the mean of Ri different from the mean of Rm? 35 Paired t-test data: data$Ri and data$Rm t = -0.13619, df = 772, p-value = 0.8917 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -0.0005893457 0.0005128742 sample estimates: mean of the differences -3.823577e-05 t.test(x = data$Ri,y = data$Rm,paired = TRUE) Mean-variance analysis
  • 36. • Critics 36 Strenghts Weaknesses Mean-variance analysis The criticisms are especially of financial nature
  • 37. • Critics • Volatility is not stable over time • Calculation of 20 day rolling volatility 37 #Computing 20 day rolling Std dev library(roll) data$SD_Ri<-roll_sd(data$Ri,width = 20)*sqrt(252) data$SD_Rm<-roll_sd(data$Rm,width = 20)*sqrt(252) #Converting date data to date format date<-as.Date(data$Date,format = "%d/%m/%Y") data<-cbind(date,data[,-1]) library(xts) data<-xts(data[,2:6],order.by = data[,1]) #Drawing plot windows() plot(data$SD_Ri[23:773], xlab = "Date", ylab = "Annualized Std Dev",type = "l", col = "green") lines(data$SD_Rm,col = "red") legend("topleft",c("Std dev of Ri","Std dev of Rm"),lty = c(1,1),col = c("green","red"),bty = "n") title(main = "20 day rolling std dev of Ri and Rm") Mean-variance analysis
  • 38. 38 Mean-variance analysis • Critics • Volatility is not stable over time
  • 39. Mean-variance analysis • Critics • Volatility is not stable over time data<-read.csv2(file.choose(),header=T,sep=";",dec=",") data$Ri[2:774]<-diff(log(data$Pi)) data<-data[-1,] library(roll) data$Ri<-as.matrix(data$Ri) data$SD_Ri<-roll_sd(data$Ri,width = 20)*sqrt(252) windows() par(mfrow=c(2,1)) plot(data[,2],type="h",col="grey",xlab="Date",ylab="Price (€)",ylim=c(round(min(data[,2])-5),round(max(data[,2])+5)),axes=F) axis(1,pos=40) axis(2,pos=0) title(main="Price of i") plot(data[,6],type="h",col="grey",xlab="Date",ylab="20 day rolling volatility (%)",ylim=c(0,0.35),axes=F) axis(1,pos=0) axis(2,pos=0) title(main="20 day rolling volatility of i")
  • 40. Mean-variance analysis • Critics • Volatility is not stable over time
  • 42. Conclusion • Statistics is “the science of collecting, analyzing, presenting, and interpreting data” • Descriptive statistics summarize the population data • The histogram and the normality test make it possible to evaluate the adequacy between a variable and the statistical law of reference • The expectation variance analysis allows a comparison of the variables 42
  • 43. Conclusion • Financial modelling seeks to improve the mathematical representation of the behavior of securities • Monofactorial models are the precursors • Market model (Sharpe, 1963) • Capital Asset Pricing Model (Lintner, 1965) • Multifactor models try to integrate more variables • Market timing (Treynor-Mazuy, 1966) • Arbitrage pricing theory (Ross, 1976) • Fama-French three factor model (1993) • Carhart four factor model (1997) 43
  • 44. References Finance • Bachelier L. (1900), Théorie de la spéculation, Annales scientifiques de l’ENS, (17)3, 21-86 • Carthart M. (1997), “On persistence of Mutual Fund Performance”, Journal of Finance, (52), 57-82 • Cowles A. (1933), “Can Stock Market Forecasters Forecast?”, Econometrica, (1)3, 309-324 • Cowles A. (1944), “Stock Market Forecasting”, Econometrica, (12)3-4, 206-214 • Fama E. (1970), “Efficient Capital Markets: A review of Theory and Empirical Work”, Journal of Finance, (25)2, 383-417 • Fama E. (1991), “Efficient Capital Markets”, Journal of Finance, (46)5, 1575-1617 • Fama E., K. French (1993), “Common Risk Factors in the Returns on Stocks and Bonds”, Journal of Financial Economics, (33), 3-56. • Lintner J. (1965), “The valuation of risk assets and the selection of risky investments in stock portfolios and capital budgets”, Review of Economics and Statistics, 47(1), 13–37 • Markowitz H. (1952), “Portfolio Selection”, Journal of Finance, (7)1, 77-91 • Ross S. (1976), "The Arbitrage Theory of Capital Asset Pricing". Journal of Economic Theory, (13)3, 341- 360 • Sharpe W. (1963), “A Simplified Model for Portfolio Analysis”, Management Science, (9)2, 277-293 • Treynor, J., Mazuy, K. (1966), “Can Mutual Funds Outguess the Market?” Harvard Business Review, (44), 131-136 Statistics • Jarque C., Bera A. (1980). “Efficient tests for normality, homoscedasticity and serial independence of regression residuals”, Economics Letters. (6) 3, 255–259 44