Hot answers tagged

17

Just to be painfully clear, it only seems to make sense to consider the logarithm of returns, i.e. $X=\log (1+\frac r{100})$ for a simple return of $r\%$ in an arbitrary period because this is what sums when returns are temporally aggregated. A basic property of cumulants is that cumulants of all orders are additive under convolution, for which a proof can ...


14

You are simply doing $log(S_t) - log(S_t) = 0$ for all $t$. Instead, try > n <- length(prices); > lrest <- log(prices[-1]/prices[-n]) Should do the trick.


13

In addition to John's answer and just to make things clear: The arithmetic mean is given by $$\mu_a = \frac{1}{n} \sum_{i=1}^n x_i$$ The geometric mean is given by $$\mu_g = \sqrt[n]{\prod_{i=1}^n (1+x_i)} -1$$ And we have that $$\mu_g \leq \mu_a$$ So not only would the geometric sharp ratio be taking into account the "actual" return of the ...


13

Basically, prices usually have a unit root, while returns can be assumed to be stationary. This is also called order of integration, a unit root means integrated of order 1, I(1), while stationary is order 0, I(0). Time series that are stationary have a lot of convenient properties for analysis. When a time series is non-stationary, then that means the ...


11

I'm not sure it makes sense to think of one as more correct than another. However, they do have significant differences. It may help to distinguish between ex-post evaluation of a strategy and ex-ante prediction of what the strategy's performance will be. For simplicity, let's assume the log returns of the strategy are approximately i.i.d. univariate ...


10

Concerning adjusted price series: Free yourself from terminology and definitions, as you can clearly see, Yahoo Finance got it wrong on the stock split you linked to (and as chrisaycock correctly pointed out). You need to focus on the problem not the term people use to describe the problem: You need to adjust time series for the stock split, period. So, it ...


9

I think this is a no-brainer. Only log-returns make sense. The average return can only be computed by averaging the sum of individual log returns. Taking the average of standard (relative) returns does not give you an average of the individual returns. Consider a simple case where the value of an investment alternates between 100 and 50 an odd number of ...


9

I think this is a no-brainer. Only log-returns make sense. The average return can only be computed by averaging the sum of individual log returns. Taking the average of standard (relative) returns does not give you an average of the individual returns. Consider a simple case where the value of an investment alternates between 100 and 50 an odd number of ...


9

Hmm, this table looks wrong. Here's what it should look like. After the most recent corporate action, the Close and Adjusted Close should be the same; only prices from before the most recent action should have a different Adjusted Close. Here's another example. I think Yahoo just has the wrong information. If you wanted to derive your own adjustments for ...


9

The initial investment is the capital in the account used to support the portfolio, not the cost of the assets in the portfolio. For example, when you sell a stock or bond short, your account doesn't actually accrue any cash. Instead you start receiving a regular cash flow. There isn't necessarily a difference between these quantities in a long-only ...


9

Looking at transaction prices, they would occur at the market bid if the active part is a seller, and at the ask if the active part is a buyer. With a random flow of sellers and buyers, the price will bounce between the bid and ask prices, creating a negative autocorrelation in returns. This penomenon is known as the bid-ask bounce, and has been discussed ...


8

I believe the concept you are looking for without really knowing it is the information coefficient (IC). IC is the correlation between your forecast and actual subsequent returns. If your IC is 1 (perfect correlation, also known in this context as perfect foresight), then your maximum return is the compounded sum of the greatest daily return of any stock ...


8

So those are cumulative pnl figures and you are interested in the percent changes in pnl from one data point to the next? Don't use log returns, simply generate the percent changes through r(t)/r(t-1)-1. 4.3922/5.2735-1 = -16.71% (in your example time series I made the assumption that the time series is in ascending order. Given your description of the ...


7

There are many variants proposed; some useful, some not so much. As an investor, the most important thing is to compare the exact same ratio, calculated in the exact same way, for each prospect. As the prospect/fund the most important thing is to be clear about the statistic you are reporting so your investors make well informed decisions. So let's start ...


7

I think the simplest method for calculating log returns is ROC from the TTR package: > data(ttrc) > roc <- ROC(ttrc[,"Close"]) https://CRAN.R-project.org/package=TTR


7

We actually managed to come up with the answer to this question ourselves but wanted to share the answer since it might be relevant to others as well. The calculation depends on what method is used to calculate the cost. There is the FIFO, LIFO and the average cost method, see: http://www.accounting-basics-for-students.com/fifo-method.html If FIFO or LIFO ...


7

The correct answer has some intuition though it doesn't generalize to continuous time very easily: Think about the paper below like this: $Var(X+Y) = Var(X) + Var(Y) + 2Cov(X,Y)$ The generalization is slightly hard because the dynamics of $\mu$ and $\sigma^2$ could be dependent for arbitrary returns. You can use a GMM estimator to derive the asymptotic ...


7

Usually the formula for the sample variance of a stock is given by: \begin{equation} Var(R_{i}) = E (R_t - E(R_t))^2 \end{equation} If you are using daily data to compute the variance then the second term: $E(R_t) \approx 0$, therefore you can drop it from the computation. Which yields: \begin{equation} Var(R_{i}) \approx E (R_t)^2 \end{equation} ...


6

An easy way to perform what you need is do it this way: if your data are daily then : > prices <- data$cl > log_returns <- diff(log(prices), lag=1) would provide you with daily log returns, if you change the $lag=1$ to $lag=5$ then you will get weekly moving log returns.


6

Such tests should always be done using adjusted prices. In fact, ideally, you should reconstruct your own price series using the total returns series. To see this, suppose you have a 10:1 split rather than a relatively small cash dividend. Then it is clear that the cointegration relationship can only hold with respect to the adjusted series.


6

Whether its possible? Absolutely. However, you should probably keep in mind a couple points: * Many people claim a lot while proving very little to none. This is fine if the issue is a small-talk conversation. Believe it or not, no harm done. However, this is about money, and from my experience I cannot stress enough how important it is to do a very ...


6

The answer is that it depends. In addition to the Lo paper above, there are a number of excellent references that go into depth about annualizing or time scaling non-i.i.d. returns, one of which is Roger Kauffman, "Long-Term Risk Management", 2005 which can be found at http://www.rogerkaufmann.ch/all-Budapest.pdf. There are some well known cases where the ...


6

You cannot use the clt to test something, it is a theorem about convergence. You can only use a statistical test to test something which basis is in many cases the clt. In this case you could e.g. use a so called t-test. In R you would e.g. type: t.test(data.Rb,data.Ra) to test whether the difference in the means is significant.


6

Perhaps overly simplistic and repeating the pt above, but when doing statistics, ideally we want to compare like with like. Returns can be comparable with each other. Prices on the other hand always depend on the previous price.


6

What you describe is known as the Equity Premium Puzzle - and it really is, as the name says, a real enigma: "The equity premium puzzle (EPP) is a phenomenon that describes the anomalously higher historical real returns of stocks over government bonds." Source: https://www.investopedia.com/terms/e/epp.asp#ixzz5HlCdHS2Z A good first introduction can be ...


5

You will struggle to put a number on the potential returns of high-frequency trading (HFT) and I think it wouldn't make any sense anyway if you don't take into consideration its risk and its leverage. Achieving 100% return with low volatility seems highly improbable; so ask the trader in question his Sharpe ratio to start with and compare it with yours. ...


5

The study you cited seems to be exaggerating slightly. 1) "An interesting fact of returns is that all of the stock returns since 1993 are from overnight returns" -> This is simply factually incorrect. Why don't you pick the S&P 500 names, you calculate the log returns taking into account price changes from the open to the close, then you do the same ...


5

Some of the used heavy-tail distributions are: Log-Cauchy and Log-Gamma Lévy Burr and Weibull Mixed normal Here two papers that cover some of them and others: http://ect-pigorsch.mee.uni-bonn.de/data/research/papers/Financial_Economics,_Fat-tailed_Distributions.pdf http://www.rff.org/RFF/Documents/RFF-DP-11-19-REV.pdf


5

Not acutally a paper, but there is even a book on Multifractal Models. It is, to my knowledge, the standard reference on this topic by Calvet and Fisher: Multifractal Volatility: Theory, Forecasting, and Pricing (Academic Press Advanced Finance)


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