Tag Info

Hot answers tagged

2

Here is a quick example, you grab the total returns for each holding period, avg them out and compare the days for each level of return. You can change tmp1 for whatever is your preferred filtered data set. require(PerformanceAnalytics) require(sqldf) data(edhec) tmp1=edhec[,1] period_seq = 1:nrow(tmp1) combos=expand.grid(period_seq,period_seq) ...


2

The calculation of rebalanced portfolio returns using PerformanceAnalytics functions makes use of what the package authors call "end-of-period" weights. As described in the documentation for Return.portfolio, the rebalancing uses the weights for the last trading day of the period to rebalance the portfolio after the markets close on that day. As an ...


1

First. Use quotes around the quoted part of this question to make it clear what isn't your opinion. Second. White noise is exactly what efficiency should generate. This para. neither makes sense nor is supported (if the support is elsewhere in the quoted article please post it). My questions in parentheses prefaced with "AC": "Under the null hypothesis ...


1

The R code is correct. You could also use the I() operator. You can look here on page 53. The code then would be lm(stock~market+I(market^2)+I(market^3), data=example) EDIT: going more into detail: Doing the above you define regressors $market^2$ and $market^3$. The coefficients will be calculated the usual way (covariance of response with the regressors ...


1

Please check whether this has what you are looking for: https://research.stlouisfed.org/fred2/downloaddata/


1

Try the following: library(quantmod) # also loads xts and TTR # Fetch all Symbols & store only the tickers to retrieve the data symbols <- stockSymbols() symbols <- symbols[,1] Next we will specify where to to store data dataset<- xts() # Only run once The following code is the loop that will download OHLC data to your environment. It ...


1

There exist a lot of way to choose risk factors and the choice differs according to the kind of underlying assets. In your case, particularly, since the portfolio is composed by currencies, I would choose the risk factors mainly among all the macroeconomic variables available in your dataset or data provider. After that, to choose on which of them basing ...



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