# Squared returns and volatility

Squared returns are considered pillars of GARCH/ARCH modelling and most used method for forecasting or studying volatility.

Can you tell me how to calculate it from simple stock price. Is it better it to calculate based on logs or just simple prices?

UPDATE from the Original Poster (posted as an answer)

My question is that do taking log or not taking logs and getting squared returns, would reveal the same volatility. I actually did not take log as I saw on Youtube a method to calculate returns. Now when I find justification for using squared returns, can I quote squared returns as same as logaritmic squared returns and say that I follow the same squared returns as used for GARCH modelling? I want to say that I used squared returns because it is used in volatility models and is a convention in finance but problem is that it uses logrithmic squared returns. Can I still quote that I follow the tradition of GARCH / ARCH modelling while using squared returns (squared returns calculated as simple formula but not taking log). My problem is whether I can still say that I follow the same pattern as GARCH models do for squared returns despite I do not use logarithmic squared returns?

• When GARCH is applied in finance it is the logarithm of price which is assumed to have independent increments distributed according to $N(0,\sigma_t^2)$ and therefore the estimation and updating of $\sigma^2$ is based on squared changes in log of price (in other words logarithmic returns). – Alex C Jul 1 '19 at 17:37

There is no single best way of modeling time series. Taking or not taking logs is a modeling question. The answer in general depends on either your belief about the structure of the data set or some model selection method (the one that you believe in) or maybe something else.

That being said, the usual way to go is to take logs and apply (G)ARCH on the log-returns $$r_t$$, defined as $$r_t=\log p_t-\log p_{t-1},$$ where $$p_t$$ is the price at time $$t$$.

Sample code using the R package rugarch is below. The code fits an EGARCH(1,1) model with Student's $$t$$ errors to the S&P 500 returns in some period and then plots the standardized residuals.

library(rugarch)
data(sp500ret)
spec <- ugarchspec(variance.model = list(model = 'eGARCH', garchOrder = c(1, 1)), distribution = 'std')
fit <- ugarchfit(spec, sp500ret[1:1000, , drop = FALSE], solver = 'hybrid')
plot(fit, which=9)


For a tutorial on rugarch see for example this tutorial.