Hot answers tagged

13

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 ...


10

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.


8

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 would be taking into account the "actual" return of the ...


8

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 ...


7

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 ...


7

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, ...


6

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 ...


6

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 ...


6

In long-short equities, it's common to use daily returns in $\frac{\mu}{\sigma}$ and then multiply by $\sqrt{252}$ to annualize.


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

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 ...


5

I don't feel I can give you an authoritative answer on what the "standard" approach is, maybe someone with more hands-on experience will be able to help. But my quick thoughts. As to the period, I've seen both daily and monthly returns being used. Weekly probably not that often. But in the end you annualize them either way to make them comparable. The ...


5

To expand on what Joshua has already stated, here is a truncated parameter list of similar functions, along with the package to which they belong. quantmod::Delt(x1,type = c("arithmetic", "log")) quantmod::periodReturn(x, type='arithmetic') # log would be "log" TTR::ROC(x, type=c("continuous", "discrete")) PerformanceAnalytics::CalculateReturns(prices, ...


5

Nowadays most quantitative researchers choose to use Information Ratio, developed and popularized by Grinold and Kahn (1999), as the gold standard for performance evaluation. Generally, though, it is called a Sharpe Ratio if returns are measured relative to the risk-free rate and an Information Ratio if returns are measured relative to some benchmark. ...


5

You're forgetting that -2.52 is still in natural logarithm terms. So the correct answer is 2.71828183 raised to the -2.52 power which equals 0.08. Your ending portfolio value is 8% of what it was a year ago.


5

Thanks gappy for your precise response. However the answer to this auto-correlation is much more important than an academic discussion of which portfolio performance ratio is best. Auto-correlation distorts max draw-down calculations raising the question of whether the (positive) auto-correlation will continue in the future producing large draw-downs, or ...


5

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.


5

I think the easiest method for calculating log returns is ROC from the TTR package: > data(ttrc) > roc <- ROC(ttrc[,"Close"]) http://cran.r-project.org/web/packages/TTR/


5

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 ...


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

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 ...


5

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 ...


4

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.


4

These returns are almost always modeled by finding some fundamental two-sided variable and modeling that. For options, we would model their prices as derivatives -- we would take the log-returns of underlying prices as the fundamental variable, possibly with other models for what would happen to volatilities and the like, and compute the consequences for ...


4

It seems that your real question is: is the PFP (Price Formation Process) diffusive from intraday to weekly sampling rate? It is a very good question since on intraday, some academics found some multifractal features into intraday returns, meaning that the PFP is not a Geometric Brownian Motion at small scales (even considering stochastic volatility). You ...


4

If I understand you correctly, your question is whether this is true: \begin{equation} \sqrt[10]{\prod_{i=1}^{10}{Y_i}} < \sqrt[10]{A} \end{equation} where $Y$ is the yearly cumulative returns (your method), and $A$ is the absolute cumulative return (your classmate's method). The question then becomes whether you find this relationship: \begin{...


4

For fixed income hedge funds, monthly returns are almost always used to calculate the Sharpe ratio, because some securities held are relatively illiquid and the dealers who do the pricing for the hedge funds are only willing to do month-end pricing. Daily returns are not available to be calculated for most such funds.


4

It should be cumprod. Say you have an index of 0.7, and a daily return of -10%. The new index should be 0.63, not 0.6.


4

Unless I'm missing something, your question simply boils down to arithmetic as you have the portfolio allocation and sector returns explicitly identified: Portfolio Return = (Sector 1 Allocation) * (Sector 1 Return) + (Sector 2 Allocation) * (Sector 2 Return) + ... + (Sector n Allocation) * (Sector n Return) Where the allocations among n sectors add up to ...



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