I found a solution.If u want your optimal portfolio result from fPortfolio
is identical to Excel if Short is allowed.
u can modify in the function maxratioPortfolio:
portfolio = optimize(f = ratioFun, interval = range(getMu(Data)),
        maximum = TRUE, data = Data, spec = spec, constraints = constraints)

into

portfolio = optimize(f = ratioFun, interval = 8*range(getMu(Data)),
        maximum = TRUE, data = Data, spec = spec, constraints = constraints)

and

in the function portfolioFrontier:

targetReturns <- seq(min(mu), max(mu), length = nFrontierPoints)

into

targetReturns <- seq(min(mu), max(mu)*8, length = nFrontierPoints)

maybe we can get an option if we need to enlarge the range because maybe for
someone, an answer which is identical to Excel is important.

Now I am doing my big homework with R instead of Excel although the
teacher's suggestion is to use Excel.


2009/4/19 BearXu <bearxu83@gmail.com>

> Whoops that's not an estimator problem.
>
> 2009/4/19 BearXu <bearxu83@gmail.com>
>
> Who can help me to tune the covEstimator?
>>
>> 2009/4/18 BearXu <bearxu83@gmail.com>
>>
>> when I use fPortfolio to find the biggest Sharpe Ratio, I found the result
>>> is smaller than the Excel
>>> Using Solver in Excel will give u a more wide range of standard deviation
>>> which gives u a better sharpe ratio,
>>>
>>> so can I change sth in fPortfolio to enlarge the range and find a better
>>> result?
>>>
>>> thanks
>>>
>>
>>
>

	[[alternative HTML version deleted]]

