| feasiblePortfolio {fPortfolio} | R Documentation |
Returns properties of a feasible portfolio.
feasiblePortfolio(data, spec = portfolioSpec(), constraints = "LongOnly")
constraints |
a character string vector, containing the constraints of the form"minW[asset]=percentage" for box constraints resp. "maxsumW[assets]=percentage" for sector constraints.
|
data |
a multivariate time series described by an S4 object of class
timeSeries. If your timeSerie is not a timeSeries
object, consult the generic function as.timeSeries to
convert your time series.
|
spec |
an S4 object of class fPFOLIOSPEC as returned by the function
portfolioSpec.
|
A Feasible Portfolio:
A feasible portfolio is a portfolio with given weights which lies inside the feasible region of portfolios.
The function requires three arguments: data, spec
(specifications), and constraints, see above. Be sure that
the specification structure "spec" has defined a weights
vector which is different from "NULL". To assign values
to the weights in the specification structure, use the function
setWeights.
The feasiblePortfolio function returns the properties of
the feasible portfolio as an S4 object of class fPORTFOLIO.
feasiblePortfolio function returns an S4 object of class
"fPORTFOLIO", with the following slots:
@call |
a call, returning the matched function call. |
@data |
a list with two named elements, series holding the time series
data if available, otherwise NA, and statistics, itself a
named list with two named elements mu and Sigma
holding the vector of means and the matrix of covariances.
|
@description |
a character string, allowing for a brief project description. |
@portfolio |
a list, containing parameter specifications for the portfolio:weights a numeric vector specifying the portfolio
weights,targetReturn a numeric value specifying the target
return,targetRisk a numeric value specifying the target
risk,targetMean a numeric value specifying the target
return determinated with function mean(),targetStdev a numeric value specifying the target risk in
standart deviation as risk measure.
|
@specification |
a list with one named element spec which represents an object
of class fPFOLIOSPEC, including all information about
the portfolio specifications.
|
@title |
a title string. |
## data -
# Load Data and Convert to timeSeries Object:
Data = as.timeSeries(data(smallcap.ts))
Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
Data
## portfolioSpec -
# Set Default Specifications:
Spec = portfolioSpec()
setWeights(Spec) = rep(0.25, times = 4)
Spec
## Allow for unlimited Short Selling:
Constraints = "LongOnly"
## Compute properties of Efficient Portfolio
feasiblePortfolio(Data, Spec, Constraints)