-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent results in using equally-weighted portfolio. #192
Comments
These formulations aren't the same at all. The first formulation: e1 <- Return.portfolio(edhec, geometric = TRUE) creates an equal weight portfolio and then lets the weights float (no rebalancing) the second formulation: eq_wts_ts <- xts(
matrix(rep(1/13, nrow(edhec)*ncol(edhec)), ncol = 13),
order.by = index(edhec))
e2 <- Return.portfolio(edhec, weights = eq_wts_ts, geometric = TRUE) rebalances to equal weight on every period. Which one do you actually want? |
Perhaps (if you want to rebalance every period) since the e3 <- Return.portfolio(edhec, geometric = TRUE, rebalance_on='months')
by passing an xts object in You could also see the difference in what is happening by specifying verbose=TRUE |
Thank you for your prompt response to my earlier query. I have read the documentation and used My goal was to develop a general formulation where I could specify dynamic portfolio weights. This would allow for the following scenarios:
To achieve this, I opted to represent the weights as a matrix, with each row corresponding to a specific date and each column to an asset. Which is why, even for equally weighted portfolios, I chose to represent the weight matrix to contain the same weights (e.g., equal weights) across all periods. This weight matrix set-up is preferred as its more general (can handle equally weighted buy & hold, as well as dynamic changing due to rebalancing/adding to positions), without having to write separate functions to handle the two scenarios. The below might not be desirable, as the rebalancing could be irregular How could I represent the equally weighted portfolio, matrix wise ? |
your scenario 1. which you describe as "simple buy and hold" is not correct. "buy and hold" means you buy once, and then the weights float. This is equivalent to your A dynamic rebalancing is possible on whatever frequency and weights you want by creating an xts object of rebalance periods (dates and/or times) and the weights that you want to rebalance to on those periods. If you want to dynamically rebalance when you have a view, you would enter that date/time and express your view with new weigts. if your 'neutral' view is to rebalance to equal weight and then "buy and hold" you would do that once, at the beginning of your "buy and hold" period, and let the weights float till your next periodic rebalancing. It is extremely unlikely that you would do tiny trades every day to maintain an equal weight portfolio. This would be very expensive both in time and taxes. to answer your question about how you would represent an arbitrary rebalancing schedule (and weights), create an xts object with an index of your (regular or irregular) rebalancing periods and weights and pass that in the |
Greetings,
I am comparing two methods - which should both be implementing an equally weighted portfolio
(1) specifying
Return.portfolio(assets, geometric = T)
(2) specifying a weights its object, where in each date, the returns are equal weights, and then using:
Return.portfolio(assets,weights = wts_xts, geometric = T)
These two however give different results, as can be confirmed by other downstream functions e.g.
table.Annualizedreturns
The text was updated successfully, but these errors were encountered: