Tag Info

Hot answers tagged

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


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.


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

You are calculating the geometric mean as if these are arithmetic returns. If you let $$L_{t}\equiv \frac{P_{t}}{P_{t-1}}-1$$ and $$C_{t}\equiv log(P_{t})-log(P_{t-1})$$ then $$L_{t}=exp\left(C_{t}\right)-1$$ Thus, to calculate the geometric return on log returns, you would recognize that $$\prod\left(1+L_{t}\right)=exp\left(\sum C_{t}\right)$$ The ...


4

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.


4

Based on Ito's isometry, \begin{align*} E_t (r^2_{t+1}) &= E_t \bigg(\int_t^{t+1} \sigma_s dW_s \int_t^{t+1} \sigma_s dW_s\bigg)\\ &= E_t \bigg(\int_t^{t+1} \sigma_{\tau}^2 \,d\tau\bigg) \\ &= E_t\bigg(\int_0^1 \sigma_{\tau+t}^2 \,d\tau\bigg) \\ &=\int_0^1 E_t\big(\sigma_{\tau+t}^2\big) \,d\tau. \end{align*} The identity \begin{align*} E_t ...


4

Surely, there is; search for aggregational gaussianity in Google Scholar or ScienceDirect. In fact, 5 minutes returns are leptokurtic and fat-tailed; then as you increase timeframe, returns become more and more normal. Yearly data is almost normal, if you have enough points.


3

Perhaps this works : http://en.wikipedia.org/wiki/Geometric_standard_deviation In particular, see under "Derivation"


3

Just a bit of illustration added to @John's answer. Look at log prices $\log(P_t)$, assume that you know $P_0$ then $$ \log(P_t) = \log(P_0) + r_1 + \cdots r_t $$ where $r_i = \log(P_i)-\log(P_{i-1})$ are the log returns. By modelling the log-returns (which as already said take values on the whole real line which is a nice property for modelling) we model ...


3

My main reference will be "Dan Xu, Christian Beck - Transition from lognormal to chi-square superstatistics for financial time series" Non-equilibrium statistical mechanics (more specifically, superstatistics) gives some ideas of explaining the relation between time frame and its distribution: "...to regard the time series as a superposition of local ...


2

I'm going to separate your question in two. The key thing you're asking is that how does Return.rebalancing treat your different frequencied and number of asset return and weight objects. Data munging: It subsets the first ncol(weight) columns of R (as ncol(edhec) > ncol(weights) ncol R is now 11. Checks if the first date in R is less than the first date ...


2

I found out that the upper time series is the result of a call > tail(Return.rebalancing(edhec,weights)) portfolio.returns 2009-03-31 0.005082048 2009-04-30 0.022982981 2009-05-31 0.037432398 2009-06-30 0.011107189 2009-07-31 0.025580507 2009-08-31 0.017983519 (by optical comparison. ;-) ) A glance ...


2

The coefficients assuming they are statistically significant can be interpreted whether or not the underlying portfolio is efficient. The CAPM or FF4 simply tries to decompose a portfolio into a series of linear exposures + an intercept (alpha) which can be viewed as constant added value. In mathematical terms the regression is explaining how much of ...


2

There are many ways answering this, here is one: We assume the asset price at $t=T$, $S_T = S_{T-1} \times (S_T / S_{T-1})$. Assuming continuous compounding, we can write, $S_T = S_{T-1} \times \exp(R_{T-1})$. Working the same way for the previous period, we get $S_{T} = S_{T-2} \times \exp(R_{T-1}+R_T)$. Working all the way back to the initial value of ...


2

You can't really combine the assets' log returns. You should calculate percentage returns for the three assets. Then at each time step, the portfolio's total return is: $r(i) = 0.5 \times \text{asset1_return}(i) + 0.25 \times \text{asset2_return}(i) + 0.25 \times \text{asset3_return}(i)$ Once you've calculated the time series of the portfolio's returns, ...


2

Unfortunately I don't think it's possible to compute returns purely based on yields... There are a few options: If you're on the buy side, you can easily get access to Barclay, Citi, or BofA's bond indices. These are very high quality datasets for studying historical bond returns. If you have Bloomberg, they've started providing bond indices as well. They ...


2

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


2

If you wanted to see the following (price $S_t$, log return $r$, simple return $R$) then $$ r = \log(S_{t+1}) - \log(S_t) = \log(S_{t+1}/S_{t}), $$ and $$ R = S_{t+1}/S_{t}-1, $$ thus $$ R = \exp(r)-1 $$ and $$r = \log(1+R).$$ Was this the question?


2

The simple answer is that when you calculate the value weighted return at time $t$ all you really need is the return during time $t$ and the market-capitalization weight as of $t-1$. You can filter the securities to remove the missing ones (and others that you may remove for other reasons, e.g. too small or price too low), calculate weights based on the ...


2

In practice, for heavily traded assets (above 60% quantile of average daily dollar volume), individual asset return is pretty scalable across different time frame by a factor of $\sqrt{T}$. However, for covariance among different assets, moving between different time frame is not linearly scalable (although it should be in math). This is known as "Epps ...


2

You are doing it right. The differences are rounding issues and can be safely ignored for any practical purpose.


2

Yes, that can be really sophisticated even using such nice tools as pandas. But the basic idea is to find position enters & exits to derive cashflow. Here is my code to derive all that stuff from generated signals (in my backtester signals are fractions of 2 stocks in portfolio for each moment). I hope I've found all bugs here, but no warranties. ...


2

When position = 1, then you are long the S&P ETF. When position is -1, your portfolio consist of a short position of -1 S&P ETF. You will therefore have a vector like $Pos = (1,1,1,1,1,-1,-1,-1,-1,1,1,1,-1,-1,-1, \ldots)$, that will give you the evolution of your portfolio. Your returns are then the daily returns on the S&P multiplied by your ...


1

True this is a stackoverflow question but have you tried the fool around with the package Pandas? You can do in Python import pandas as pd data = pd.read_csv('filepath/file.csv') That's the easiest way.


1

Do you want to model the returns in a risk-neutral framework (for derivatives) or in the real world measure (for risk analysis/portfolio construction)? For the first approach (say modelling under $Q$) you should go to the literature on bond and FX-derivatives. I would go more into detail if this is your aim. The formulation $N(\mu-\sigma^2/2,\sigma)$ ...


1

For a random variable $\xi$, the variance is defined by $$mean\Big(\big(\xi -mean (\xi)\big)^2\Big).$$ Then the geometric variance should be defined by $$\prod_{i=1}^n\Bigg(1+ \bigg[x_i-\prod_{j=1}^n(1+x_j)^{1/n}\,\bigg]^2\, \Bigg)^{1/n}.$$ Addendum ---- The definition given in the link below is only a way of thinking. However, it does not provide a ...


1

Using a t-test should be ok because even when the underlying distribution is not normal you have a large enough sample size which justifies the assumption that the distribution of the sample means should be approximately normal due to the Central Limit Theorem.


1

If log returns have a symmetric distribution, prices will have a positively skewed distribution, since exponentiating induces positive skew.


1

Use your total wealth allocated to the trades as denominator. Total wealth allocated would include all collateral. In this way you (or your broker) make sure that the denominator is always positive. Presumably this would also reflect what you really want to track. The only problem that remains is what amount of your wealth needs to be allocated. But this is ...


1

Both approaches can be useful. For stocks, sorting into quantiles is popular because it's easy to understand and explain it's a simple matter to build factor portfolios and track or backtest their performance, while the translation from expected returns to a portfolio is a bit more involved more robust than a single-stock regression, because it is less ...



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