PortfolioConstraints       package:fPortfolio       R Documentation

_P_o_r_t_f_o_l_i_o _C_o_n_s_t_r_a_i_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     A collection and description of functions, which  allow to set,
     manipulate and/or view portfolio  constraints. Type of constraints
     include box/group  constraints of weights, and covariance
     risk-budget  constraints. 

     The functions are:

       'portfolioConstraints'  Checks portfolio constraints for consistency.

_U_s_a_g_e:

     portfolioConstraints(data, spec = portfolioSpec(), constraints = NULL)

_A_r_g_u_m_e_n_t_s:

constraints: [setConstraints] - 
           a character value or character vector, containing the
          constraint strings. Setting constraints is described in the
          details section  

    data: [setConstraints] - 
           a list, having a statistics named list, having named entries
          'mu' and 'Sigma', containing the information of the
          statistics


    spec: [setConstraints] - 
           an object of class 'fPFOLIOSPEC', containing slots call,
          model, portfolio, title, description. 

_D_e_t_a_i_l_s:

     *How to define constraints?* 

      Constraints are defined by a character string or a vector of
     character strings.

     _Special Constraint Settings:_

     There are three special cases, the settings 'constraints=NULL',
     'constraints="Short"', and 'constraints="LongOnly"'. Note, that
     these three constraint settings are not allowed to be combined 
     with more general constraint definitions.

     'NULL': This selection defines the default value and is equivalent
     to the '"LongOnly"' case, see below.

     '"Short"': This selection defines the case of unlimited short
     selling. i.e. each weight may range between '-Inf' and 'Inf'. 
     Consequently, there are no group constraints. Risk budget
     constraints are not included in the portfolio optimization.

     '"LongOnly"': This selection is the same as the default setting.
     Each weight may range between '0' ans '1'. No group constraints
     and risk budget constraints will be included in the  portfolio
     optimization.

     _Tailored Weight Constrained Portfolios:_

     Weight constrained portfolios may be specified by a vector of
     character strings which describe executable code, setting values
     to to vectors 'minW', 'maxW', 'minsumW', and 'maxsumW'. The
     individual string elements of the vector have the following form:

     _b_o_x _c_o_n_s_t_r_a_i_n_t_s '"minW[Asset(s)]=Value(s)"', and/or 
           '"maxW[Asset(s)]=Value(s)"'.

     _s_e_c_t_o_r _c_o_n_s_t_r_a_i_n_t_s '"minsumW[Asset(s)]=Value(s)"', and/or 
           '"maxsumW[Asset(s)]=Value(s)"'. 

     'Asset(s)' is an index of one or more assets, and 'value'  a
     numeric value or vector assigning the desired value. Note, if the 
     'values' range between zero and one, then we have a long only 
     portfolio allowing for box and group constraints of the weights.
     If  the values are set to negative values, and values larger than
     one,  then (constrained) short selling will be allowed. 

     _Tailored Risk Budget Constrained Portfolios:_

     By default, risk budgets are not included in the portfolio
     optimization. Covariance risk budgets have to be added
     explicitely, and have the  following form:

     _b_o_x _c_o_n_s_t_r_a_i_n_t_s '"minB[Asset(s)]=Value(s)"', and/or 
           '"minB[Asset(s)]=Value(s)"'.

     Again, 'Asset(s)' is an index of one or more assets, and 'value' 
     a numeric value or vector with numbers ranging between zero and
     one, assigning the desired risk budgets.

_A_u_t_h_o_r(_s):

     Diethelm Wuertz and Oliver Greshake for the Rmetrics port.

_S_e_e _A_l_s_o:

     'PortfolioData', 'PortfolioSpec', 'fPORTFOLIO', 'PortfolioPlots'.

_E_x_a_m_p_l_e_s:

     ## portfolioConstraints -
        # Load Data, i.e. a List of Returns:
        Data = as.timeSeries(data(smallcap.ts))
        Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
        Data
        # Specification:
        Spec = portfolioSpec() 
        # Portfolio Constraints:
        Constraints = "minW[1:4]"
        portfolioConstraints(Data, Spec, Constraints)

