Hot answers tagged

4

Large? ? The relationship between normal and log returns is $$(normal return) = exp(log return)-1$$ Therefore log-returns can be from $-\infty$ to $+\infty$ while normal ones can only be between $-1$ and $+\infty$.


3

Well, it wasn't easy because you didn't mentioned how your data is formatted. I create my own data.frame() basing on data you provided. You can skip this part if your data.frame is ready. Here's code I used to create a dataframe: > #given dates > dates=c("2000-1-3","2000-1-4","2000-1-5","2000-1-6","2000-1-7","2000-1-10","2000-1-11") > #formating ...


2

Computing returns is one of the first things you learn when you start studying finance but I believe it's one the trickiest one once you get to complicated cases. The source you mentioned seems actually very good to me and it already takes into account different approaches and different subtleties like dividend payment. But this is in fact only the top of ...


2

The result is: $ e^{(-230%)} - 1 = -89% $


1

It isn't strictly speaking possible to convert a log vol to a normal vol, although it may be possible to get a rough idea. I am assuming you only have the vol of log returns but not the actual time series here. If you had the original time series, then you would just calculate the standard deviation of the prices to get the normal vol. I assume this is ...


1

The geometric mean of quantities $\{a_1, \dots, a_n\}$ is $$ \bar{a}_g = \left( \prod_{i=1}^n a_i \right)^{1/n} $$ Taking the logarithm of both sides gives $$ \log \bar{a}_g = \frac{1}{n} \sum_{i=1}^n \log a_i $$ so the log of the geometric mean is equal to the arithmetic mean of the logs. In your case, the relevant quantities $a_i$ are the growth rates ...


1

In theory, stock prices are lognormally distributed. People usually prove lognormality by referring to positivity and right skewness of stock prices. Mathematically (or philosophically if you wish), lognormality follows from the following equation $\frac{S}{dS}={\mu}dt+{\sigma}dW$, which you may see a lot in quantitative finance ("random walk") or in ...


1

In Python, simple geometric returns: import numpy as np import pandas as pd sp500 = pd.io.data.DataReader('^GSPC', 'yahoo')['Close'] simple_ret = sp500.pct_change() (1+simple_ret).cumprod()[-1] -1 0.74751768460019963 Log-returns: log_ret = np.log(1+simple_ret) np.exp(log_ret.cumsum()[-1]) -1 0.74751768460020074 In ...


1

When doing series like this in Python, I usually just add 1 to each return, then multiply across these sums for cumulative returns. Such as, if my returns over three days were -5.2%, 2.1% & 4.8%, then the values I would store would be: 1 + (-0.052) = 0.948 1 + (0.021) = 1.021 1 + (0.048) = 1.048 Then, to calculate my cumulative returns, I ...


1

In practice, when you encounter a relationship between historical financial variables that looks good on levels but not on returns, the model you get from it essentially always fails to be predictive. I generally think of this as being due to the historical relationship arising from some confounding third (plus fourth and fifth...) variable effects that ...


1

If you are short you need to use log((entryprice-fees)/exitprice). It is the same logic as in log long return case. You just need to change your entryprice and exitprice inputs. In this case, entryprice is the selling operation and exitprice will be the buying operation (just the opposite).


1

The high serial correlation you are getting in the first case is a spurious correlation. The correct way to do it is with returns. The price series has a unit root. You need to take diff(log(prices))) in order to have a stationary time series, on which you can then estimate autocorrelations, auto regressive coefficients, etc. properly. This was shown by ...


1

The log likelihood function is indeed rather flat in the $\mu$-direction, for small time horizons (you used $T = 1$ it looks like). As you may have noticed, increasing the number of observations but keeping the time horizon the same DOES NOT IMPROVE the accuracy of the estimate of $\mu$ - this is a bit counterintuitive, if you ask me. But, increasing the ...



Only top voted, non community-wiki answers of a minimum length are eligible