tseries and efficient frontier

View: New views
3 Messages — Rating Filter:   Alert me  

tseries and efficient frontier

by John P. Burkett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yesterday I reported that my effort to compute and plot an efficient
frontier using the fPortfolio package had produced an asymmetric curve
rather than the anticipated hyperbola. Using the same data, I have now
tried computing and plotting an efficient frontier using the tseries
package. The result is again an asymmetric curve.

My code is as follows:
library(fPortfolio)
Data = as.timeSeries(data(smallcap.ts))
Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
Data
x <- as.matrix(Data)
vcvd <- cov(Data)
pmv <- rep(0,100)
psv <- rep(0,100)
minr <- min(mean(Data))
maxr <- max(mean(Data))
vcv <- cov(x)
iv <- 0:99
mrv <- minr*(1-iv/99) + maxr*(iv/99)
pmv[1] <- min(mean(Data))
pmv[100] <-max(mean(Data))
psv[1] <- 0.2226543
psv[100] <- 0.1674082
for (i in 2:99) {
pmv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$pm
psv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$ps
}
plot(psv,pmv)

On the resulting curve, risk is minimized at point 62. But the curve is
not symmetric around this point. (Moving 37 points in either direction
from this point raises risk by the same amount. In contrast moving 37
points back lowers the mean return far less than moving 37 points
forward raises the mean return.)  I wonder whether this asymmetry is a
bug or an accurate portrayal of a type of efficiency frontier different
from the hyperbolas that appear in textbooks. I would be most grateful
for suggestions about how to resolve this puzzle.

Best regards,
John


--
John P. Burkett
Department of Environmental and Natural Resource Economics
and Department of Economics
University of Rhode Island
Kingston, RI 02881-0808
USA

phone (401) 874-9195

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

Re: tseries and efficient frontier

by klswacha :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think the reason is that the function "portfolio.optim"  has the
default option, short=FALSE. If you use the option short=TRUE you
should achieve the symmetrical shape of the efficient frontier.
When you constain the portfolio only to accept positive weights of
each asset, there will generally be bumps and asymmetries in the
efficient frontier.
The textbook examples usually assume short selling is allowed.
Charles Ward

2008/5/4 John P. Burkett <burkett@...>:

> Yesterday I reported that my effort to compute and plot an efficient
> frontier using the fPortfolio package had produced an asymmetric curve
> rather than the anticipated hyperbola. Using the same data, I have now tried
> computing and plotting an efficient frontier using the tseries package. The
> result is again an asymmetric curve.
>
>  My code is as follows:
>  library(fPortfolio)
>  Data = as.timeSeries(data(smallcap.ts))
>  Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
>  Data
>  x <- as.matrix(Data)
>  vcvd <- cov(Data)
>  pmv <- rep(0,100)
>  psv <- rep(0,100)
>  minr <- min(mean(Data))
>  maxr <- max(mean(Data))
>  vcv <- cov(x)
>  iv <- 0:99
>  mrv <- minr*(1-iv/99) + maxr*(iv/99)
>  pmv[1] <- min(mean(Data))
>  pmv[100] <-max(mean(Data))
>  psv[1] <- 0.2226543
>  psv[100] <- 0.1674082
>  for (i in 2:99) {
>  pmv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$pm
>  psv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$ps
>  }
>  plot(psv,pmv)
>
>  On the resulting curve, risk is minimized at point 62. But the curve is not
> symmetric around this point. (Moving 37 points in either direction from this
> point raises risk by the same amount. In contrast moving 37 points back
> lowers the mean return far less than moving 37 points forward raises the
> mean return.)  I wonder whether this asymmetry is a bug or an accurate
> portrayal of a type of efficiency frontier different from the hyperbolas
> that appear in textbooks. I would be most grateful for suggestions about how
> to resolve this puzzle.
>
>  Best regards,
>  John
>
>
>  --
>  John P. Burkett
>  Department of Environmental and Natural Resource Economics
>  and Department of Economics
>  University of Rhode Island
>  Kingston, RI 02881-0808
>  USA
>
>  phone (401) 874-9195
>
>  _______________________________________________
>  R-SIG-Finance@... mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>  -- Subscriber-posting only.
>  -- If you want to post, subscribe first.
>

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

Re: tseries and efficient frontier

by John P. Burkett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, Charles!  You are absolutely correct.  Inserting the option
shorts=TRUE produces a symmetrical curve. I'm very grateful to you for
calling this to my attention.
Best regards,
John

Charles Ward wrote:

> I think the reason is that the function "portfolio.optim"  has the
> default option, short=FALSE. If you use the option short=TRUE you
> should achieve the symmetrical shape of the efficient frontier.
> When you constain the portfolio only to accept positive weights of
> each asset, there will generally be bumps and asymmetries in the
> efficient frontier.
> The textbook examples usually assume short selling is allowed.
> Charles Ward
>
> 2008/5/4 John P. Burkett <burkett@...>:
>> Yesterday I reported that my effort to compute and plot an efficient
>> frontier using the fPortfolio package had produced an asymmetric curve
>> rather than the anticipated hyperbola. Using the same data, I have now tried
>> computing and plotting an efficient frontier using the tseries package. The
>> result is again an asymmetric curve.
>>
>>  My code is as follows:
>>  library(fPortfolio)
>>  Data = as.timeSeries(data(smallcap.ts))
>>  Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
>>  Data
>>  x <- as.matrix(Data)
>>  vcvd <- cov(Data)
>>  pmv <- rep(0,100)
>>  psv <- rep(0,100)
>>  minr <- min(mean(Data))
>>  maxr <- max(mean(Data))
>>  vcv <- cov(x)
>>  iv <- 0:99
>>  mrv <- minr*(1-iv/99) + maxr*(iv/99)
>>  pmv[1] <- min(mean(Data))
>>  pmv[100] <-max(mean(Data))
>>  psv[1] <- 0.2226543
>>  psv[100] <- 0.1674082
>>  for (i in 2:99) {
>>  pmv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$pm
>>  psv[i] <- portfolio.optim(x, pm = mrv[i], covmat = vcv)$ps
>>  }
>>  plot(psv,pmv)
>>
>>  On the resulting curve, risk is minimized at point 62. But the curve is not
>> symmetric around this point. (Moving 37 points in either direction from this
>> point raises risk by the same amount. In contrast moving 37 points back
>> lowers the mean return far less than moving 37 points forward raises the
>> mean return.)  I wonder whether this asymmetry is a bug or an accurate
>> portrayal of a type of efficiency frontier different from the hyperbolas
>> that appear in textbooks. I would be most grateful for suggestions about how
>> to resolve this puzzle.
>>
>>  Best regards,
>>  John
>>
>>
>>  --
>>  John P. Burkett
>>  Department of Environmental and Natural Resource Economics
>>  and Department of Economics
>>  University of Rhode Island
>>  Kingston, RI 02881-0808
>>  USA
>>
>>  phone (401) 874-9195
>>
>>  _______________________________________________
>>  R-SIG-Finance@... mailing list
>>  https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>  -- Subscriber-posting only.
>>  -- If you want to post, subscribe first.
>>
>


--
John P. Burkett
Department of Environmental and Natural Resource Economics
and Department of Economics
University of Rhode Island
Kingston, RI 02881-0808
USA

phone (401) 874-9195

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.