Tag Info

New answers tagged

0

You have the budget constaint on the sum of weights, the constraint that the portfolio return equal the target return, and the constraint on beta. With three equality constraints, you can set a row in Amat for each constraint, and then take the transpose to pass to solve.QP. bvec is set to the right-hand side of the constraint equations and the parameter ...


0

Say we have $n$ assets. Suppose that the covariance matrix is $\Sigma$. Now suppose that $x$ is the vector of weights of your assets, $\mu$ is the vector of mean returns on the assets, $\mathbb{1}$ is the vector of all ones, $B$ is the vector of betas on each asset, and $\tau$ your target return. You want to solve the following quadratic program $$Min_x\;\; ...


2

Use PortfolioAnalytics See my previous response here: http://quant.stackexchange.com/a/16002/2154 , you will find links to the documentation there. You can use the constraint function to add a factor exposure constraint of 0. use add.constraint(your_portfolio_name,type='factor_exposure',B = your_vector_of_betas,lower=0,upper=0)


1

This is a feature, when you pass a vector it's because the risk free rate has changed over time. E.g. you can assume a constant or changing risk free rate as each period of returns can have an associated risk free rate.


1

Nothing to be worried about: Method is the type of correlation which is not a graphical parameter. The method argument is being passed to the pairs function... The function is saying this not a graphical parameter It can be fixed in the source code (or just ignore it!)



Top 50 recent answers are included