New answers tagged portfolio
R package TTR has rolling window algorithms and understands day counting etc. It stands on the shoulders of xts (which extends zoo) and quantmod
Usually you would solve a system of equations to get the answer to textbook problems like this. Here you have 4 assets and 3 states of the world, so your system will have infinite solutions. If you want your asset to have exactly $ 30 of value at time 1, then just set one of the weights (3 or 4) as zero and solve the system. Otherwise, to solve a more ...
Looking at your code, you seem to be mixing the risk minimization formulation of the mean-variance problem with the risk aversion formulation. Both formulations include the "budget" constraint, that the sum of the weights equal 1, and can require that each of the weights be greater than zero, the "long-only" inequality constraints. In the risk minimization ...
Top 50 recent answers are included