Hi,
First wanted to thank everyone for a lot of very good hard work done on R and the subsequent packages.
So I've been looking at the maxratioPortfolio code in fPortfolio. One thing I notice is how the range is decided for the search. It looks like the range is decided by passing "interval = range(getMu(Data))" While this works well in a completely unrestrained situation it does not work when there are constraints. To give an example. I am trying to optimize a portfolio with 3 assets with the following constraints :
c("minW[1:nAssets] = -0.5", "maxW[1:nAssets] = 0.5", "eqsumW[1:nAssets] = 1e-7", "Partial")
In other words I want a dollar neutral portfolio with no weight greater or less than .5, -.5 respectively. As a side note having to pass in 1e-7 is somewhat counterintuitive but I could not find another way as passing in 0, removed that constraint.
My mu and sigma are :
$mu
S VZ T
0.007075173 -0.001899547 -0.001357274
$Sigma
S VZ T
S 0.008534089 0.0015257184 0.0015642080
VZ 0.001525718 0.0009147493 0.0008163796
T 0.001564208 0.0008163796 0.0009165100
Now just taking the min and max of my mu as the range is wrong. They are not feasible portfolios as I can not allocate 100% to that. In general in other optimizers I've seen the range is decided by solving for the max return given the constraints and no constraint on the variance. Its usually a simple linear programming problem.
In my case the weights would be 0.5, -0.5, 0 to get me the maximum returns within my portfolio and within my constraints.
Sorry if anything above is incorrect, out of context, or just stupid. I'm fairly new to R so I have no doubt I'm mistaken on many things.
Thanks... mike
DISCLAIMER: The information contained herein is to be co...{{dropped:13}}