Thank you Brian, that is useful advice and my question is now clear!

My question can be summarised as;
Is it possible to plot the Kendall risk estimator efficient frontier
changing the x-axis to the standard deviation?

Right - here is my code using one of the default datasets.

library(fPortfolio)
data=250*(as.timeSeries(data(LPP2005REC))[,2:6])
summary(data)
#set riskfree rate rf
rf= 0.05
# set number of portfolios num
num=10
#portfolioSpec() is the default setting for the portfolio
portfolioSpec()
#Type is mean-variance
#Optimize is minimum risk
# default constraints are "Long Only"
par(mfrow=c(1,2))
#First Basic portfolio######################
spec01=portfolioSpec()
con01="LongOnly"
setRiskFreeRate(spec01)=rf
setNFrontierPoints(spec01)=num
f1=portfolioFrontier(data,spec01,con01)
frontierPlot(f1)
print(f1)
#note that the Cov column shows units from 0.3057 to 1.4211

#Now estimate using Kendall rank Estimator
#Kendall rank Estimator
kendallEstimator =
function (x,spec=NULL,...) {
mu=colMeans(x)
Sigma=cov(x, method="kendall")
list(mu=mu, Sigma=Sigma)}

spec02=portfolioSpec()
setNFrontierPoints(spec02)=num
setEstimator(spec02)="kendallEstimator"
f2 = portfolioFrontier(data,spec02)
print(f2)
#note that in the Target Return and Risk para
#the Cov and indeed all the other columns except the Sig column
#shows the same units as in f1

#If we now plot the Kendall risk estimator efficient frontier
# there is an option which appears to offer different risk measures
(scales?)
frontierPlot(f2,risk=c("Sig"))
frontierPlot(f2,risk=c("Cov"))
#but changing the risk option does not appear to have any effect
#so is it possible to plot the Kendall risk estimator efficient frontier
#against the standard deviation?

Charles Ward

On Mon, Mar 1, 2010 at 11:41 AM, Brian G. Peterson <brian@braverock.com>wrote:

> No worries.  Unfortunately now I can't really be of much assistance.
>
> I suspect that you may have changed the portfolioSpec, and changing the
> option again doesn't change it back, but I don't really know without  code
> to examine.
>
> I'd suggest using one of the standard data sets, like 'edhec' or anything
> from fEcoFin, and building a little test script.  The list software will
> allow you to attach PDF's of the output, and your test script will let
> Diethelm or others more knowledgeable in fPortfolio replicate the problem.
>
> Regards,
>
>    - Brian
>
> Charles Ward wrote:
>
>> I am sorry Brian - my query was unclear.
>> I plotted the frontier on two different graphs. In both cases, it was the
>> same calculation - only the options in the frontierPlot were changed.
>> I am not quite clear what the units are in the default plot of the Kendall
>> estimator but the x-axis shows units of 150, 200 and 250 with the settings
>>                          risk=c("Sig") If I then repeat the function with
>> the option set to         risk= c("Cov")  I would have expected the
>> horizontal scale to show the standard deviation where the units would be in
>> the region of 0.008 to 0.011. In fact, the graph appears unchanged with the
>> same units of 150, 200 and 250.
>> So my question really was about the option    risk = ... in the
>> frontierPlot function.
>> What does it do?
>> Charles
>>
>>
>> On Mon, Mar 1, 2010 at 11:11 AM, Brian G. Peterson <brian@braverock.com<mailto:
>> brian@braverock.com>> wrote:
>>
>>    Charles Ward wrote:
>>
>>        But if I calculate the frontier using the Kendall method (stored
>>        in f9) and
>>        plot two frontiers using frontierPlot,
>>        they appear on the same horizontal risk-scale. Shouldn't the two
>>        scales be
>>        different?
>>
>>
>>    Charles,
>>
>>    The two efficient frontiers would not be comparable if plotted on
>>    different axes on the same chart.
>>
>>    The (typical) reason for plotting multiple efficient frontiers is to
>>    see how the unconstrained (or long only) Markowitz mean-variance
>>    frontier 'shrinks' with different constraints or risk measures.  By
>>    definition, the area under these more-restricted efficient frontiers
>>    will be smaller than the unconstrained or long-only case.
>>
>>    A modification to this approach that we use often it to set the
>>    'risk' axis to the risk measure you really care about, such as CVaR,
>>    and then plot the unconstrained or long-only efficient frontier
>>    on/against *that* axis.
>>
>>    Regards,
>>
>>       - Brian
>>
>>    --    Brian G. Peterson
>>    http://braverock.com/brian/
>>    Ph: 773-459-4973
>>    IM: bgpbraverock
>>
>>
>>
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>

	[[alternative HTML version deleted]]

