Stock price of infosys

The stock price of Infosys -R

"INFY.NS"
> chartSeries(Cl(INFY.NS))
stock price of Infosys





> infyret <- dailyReturn(Cl(INFY.NS), type='log')
> par(mfrow=c(2,2))
> acf(infyret, main="Return ACF");
> pacf(infyret, main="Return PACF");
> acf(infyret^2, main="Squared return ACF");
> pacf(infyret^2, main="Squared return PACF")
stock price of Infosys

> par(mfrow=c(1,1))
> m=mean(infyret);s=sd(ret);
> par(mfrow=c(1,2))
> hist(infyret, nclass=40, freq=FALSE, main='Return histogram');curve(dnorm(x,mean=m,sd=s), from = -0.3, to = 0.2, add=TRUE, col="red")
stock price of Infosys

> plot(density(infyret), main='Return empirical distribution');curve(dnorm(x,mean=m,sd=s), from = -0.3, to = 0.2, add=TRUE, col="red")
stock price of Infosys

> kurtosis(infyret)
daily.returns 
     307.8082 
> plot(density(infyret), main='Return EDF - upper tail', xlim = c(0.1, 0.2),ylim=c(0,2));
> qqnorm(infyret)
> qqline(infyret);
conclusion
> chartSeries(infyret)
stock price of Infosys

> garch11.spec = ugarchspec(variance.model = list(model="sGARCH",
+ garchOrder=c(1,1)), mean.model = list(armaOrder=c(0,0)))
> infy.garch11.fit = ugarchfit(spec=garch11.spec, data=infyret)
Reactions

Post a Comment

0 Comments