R is a programming language possesses an extensive catalog of statistical and graphical methods. It includes machine learning algorithm, linear regression, time series, statistical inference to name a few. Most of the R libraries are written in R,but many large companies also use R programming language, including Uber, Google, Airbnb, Facebook and so on

AD1

Email subscriptions

Enter your email address:

Delivered by FeedBurner

Monday, January 13, 2020

How to move Stock Price TSLA

Stock Price TSLA

tslachartseries

[1] "TSLA"
> chartSeries(Cl(TSLA))
> addRSI()
> addMomentum()
> rettsla <- dailyReturn(Cl(TSLA), type='log')
> par(mfrow=c(2,2))
> acf(rettsla, main="Tsla Return ACF");
> pacf(rettsla, main="Tsla Return PACF");
> acf(rettsla^2, main="Tsla Squared return ACF");
> pacf(rettsla^2, main="Tsla Squared return PACF")
Tsla Return ACF

> par(mfrow=c(1,1))
> m=mean(ret);s=sd(ret);
> kurtosis(rettsla)
[1] 5.814273
attr(,"method")
[1] "excess"
> plot(density(rettsla), main='Tsla Return EDF - upper tail', xlim = c(0.1, 0.2),
+      ylim=c(0,2));
> curve(dnorm(x, mean=m,sd=s), from = -0.3, to = 0.2, add=TRUE, col="red")
'Tsla Return EDF - upper tail

'Tsla Return EDF - upper tail

> ret.tsla <- dailyReturn(Cl(TSLA), type='log')
> chartSeries(rettsla)
 chartSeries(rettsla)

(rettsla)

> garch11.spec = ugarchspec(variance.model = list(model="sGARCH",garchOrder=c(1,1)), mean.model = list(armaOrder=c(0,0)))
> tsla.garch11.fit = ugarchfit(spec=garch11.spec, data=rettsla)

No comments:

Post a Comment

a