6
\alias{minvariancePoints}
11
\alias{equalWeightsPoints}
12
\alias{singleAssetPoints}
13
\alias{twoAssetsLines}
14
\alias{sharpeRatioLines}
16
\alias{monteCarloPoints}
19
\title{Efficient Frontier Plot}
24
Plots the efficient frontier of an
25
optimized portfolio and allows to add
26
points and lines from specif portfolios
31
\code{frontierPlot} \tab Plots efficient frontier, \cr
32
\code{minvariancePoints} \tab Adds minimum variance point, \cr
33
\code{cmlPoints} \tab Adds market portfolio, \cr
34
\code{cmlLines} \tab Adds capital market Line, \cr
35
\code{tangencyPoints} \tab Adds tangency portfolio point, \cr
36
\code{tangencyLines} \tab Adds tangency line, \cr
37
\code{equalWeightsPoints} \tab Adds point of equal weights portfolio, \cr
38
\code{singleAssetPoints} \tab Adds points of single asset portfolios, \cr
39
\code{twoAssetsLines} \tab Adds EF for all combinations of two assets, \cr
40
\code{sharpeRatioLines} \tab Adds Sharpe ratio line, \cr
41
\code{monteCarloPoints} \tab Adds randomly produced feasible portfolios. }
47
frontierPlot(object, frontier = c("both", "lower", "upper"),
48
col = c("black", "grey"), add = FALSE, labels = TRUE,
49
return = c("mean", "mu"), risk = c("Cov", "Sigma", "CVaR", "VaR"),
50
auto = TRUE, title = TRUE, \dots)
52
minvariancePoints(object, return = c("mean", "mu"),
53
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
54
cmlPoints(object, return = c("mean", "mu"),
55
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
56
cmlLines(object, return = c("mean", "mu"),
57
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
58
tangencyPoints(object, return = c("mean", "mu"),
59
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
60
tangencyLines(object, return = c("mean", "mu"),
61
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
62
equalWeightsPoints(object, return = c("mean", "mu"),
63
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
64
singleAssetPoints(object, return = c("mean", "mu"),
65
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
66
twoAssetsLines(object, return = c("mean", "mu"),
67
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
68
sharpeRatioLines(object, return = c("mean", "mu"),
69
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
71
monteCarloPoints(object, mcSteps = 5000, return = c("mean", "mu"),
72
risk = c("Cov", "Sigma", "CVaR", "VaR"), auto = TRUE, \dots)
79
an S4 object of class \code{fPORTFOLIO}, containing slots call, data,
80
specification, constraints, portfolio, title, description.
83
a character string, determining which part of the frontier should be
84
extracted. \code{"both"} stands for the full hyperbola, \code{"lower"}
85
for all points below the minimum variance return and \code{"upper"}
86
for the actual efficient frontier, by default "both".
89
a character string vector, setting the color. For \code{frontierPlot}
90
it is a two dimensional a vector; first entry is the upper part of the
91
frontier,\cr second entry the lower, by default "black" and "grey".\cr
92
For the other functions the argument defines the color representation,
93
by default sets the default color is the rainbow palette.
96
a logical value, determining whether the frontier should be added to
97
an existing plot, by default FALSE.
100
a character string denoting which type of return should be
101
plotted. Allowed values for the
102
return are either \code{"mean"}, or \code{"mu"}.
105
a character string denoting which type of risk should be
106
plotted. Allowed values for the
107
risk measure are either \code{"cov"}, \code{"sigma"},
108
\code{"VaR"}, or \code{"CVaR"}.
111
a logical flag denoting if the type of return and risk to be
112
plotted should be selected automatically, by default TRUE.
115
a logical flag, should the plot be automatically labeled and
116
decorated? By default \code{TRUE}.
119
a logical flag, should the plot obtain a default main title and
120
x- and y-labels? By default \code{TRUE}.
123
an integer value, the number of Monte Carlo steps.
126
optional arguments to be passed.
134
\bold{Frontier Plot:}\cr
136
The \code{frontierPlot} function allows to plot the efficient
139
\emph{Selecting the upper and/or lower part of the frontier:}
141
One can choose one from three different plot options selectable
142
by the argument \code{frontier}.
143
The part superior to the minimum variance portfolio is plotted with
144
argument \code{frontier="upper"}.
145
The part below is plotted with \code{frontier="lower"}.
146
Both parts are plotted with \code{frontier="both"}, which is default.
148
\emph{Selecting the color of the frontier points:}
150
Different colors for the lower and upper part are selected from the
151
argument \code{col}, the defaults are grey and black, the first for
152
the lower part of the frontier, thye second for the upper part.
154
\emph{Plotting the frontiers for several portfolios in one plot:}
156
The function comes with an argument \code{add}. If \code{add=FALSE}
157
then a new plot is opended displaying the frontier for the selected
158
portfolio. On the other hand setting \code{add=TRUE} allows to add
159
new efficient frontiers from other portfolios to the same plot.
161
\emph{Removing labels from the plot:}
162
By default we have \code{labels=TRUE} and thus additional information
163
is plotted on the third side of the graph. To discard this information
164
one has to set \code{labels = FALSE}.
166
\emph{Adding user supplied title and axis-labels:}
167
By default we have \code{title=TRUE} and thus a default main title and
168
default x- and y-labels are automatically added. To discard this
169
kind of decoration set \code{title=FALSE}. Then using the function
170
\code{title} allows to add user specified titles and axis-labels.
172
\emph{The dot arguments:}
173
With the \code{\dots} arguments one can pass additional arguments to
174
the internal plot and points functions.
185
Data = as.timeSeries(data(smallcap.ts))
186
Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
189
## portfolioFrontier -
190
# Compute Long Only Efficient Frontier
191
Frontier = portfolioFrontier(Data)
195
# Plot Upper Part of Frontier:
196
frontierPlot(Frontier, pch = 19, xlim = c(0, 0.25), ylim = c(0, 0.035))
198
abline(h = 0, col = "grey")
199
abline(v = 0, col = "grey")
202
minvariancePoints(Frontier, pch = 19, col = "red")
203
tangencyPoints(Frontier, pch = 19, col = "blue")
204
tangencyLines(Frontier, col = "blue")
205
equalWeightsPoints(Frontier, pch = 15, col = "grey")
206
singleAssetPoints(Frontier, pch = 19, cex = 1.5, col = topo.colors(6))
207
twoAssetsLines(Frontier, lty = 3, col = "grey")
208
sharpeRatioLines(Frontier, col = "orange", lwd = 2)
210
## Feasible Portfolios:
211
frontierPlot(Frontier, col = c("orange", "orange"), pch = 19)
212
monteCarloPoints(Frontier, mcSteps = 5000, cex = 0.25, pch = 19)
213
twoAssetsLines(Frontier, lwd = 2, col = "orange")