Risk_Objective_Import imports the Risk objective's data from an excel file.
The required data are a sheet containing parcels' Sigma and a sheet containing parcels' Correlation.
Function creates a list named
Risk_Objective[["Sigma"]] stores the the sigmas of parcels,
Risk_Objective[["Correlation"]] stores the the Correlation of parcels.
This function is not sensitive to the order the parcels are stored in the sheet and will automatically store parcels sorted with the same order they were stored in
1 2 3
A string: the location and name of the excel file.
A string: the name of the sheet holding the parcels' sigmas' data. (Default: "Sigma")
A string: the name of the sheet holding the parcels' Correlations' data. (Default: "Correlation")
A binary parameter: if
the environment where the package should create or access variables. By default the package works in the R's Global environment. (Default: .GlobalEnv)
Risk objective is a quadratic function representing the portfolio optimization problem, and this function is to be Minimized.
The optimal value for this objective is zero and the optimal solution is to have all parcels divested (unprotected).
Therefore, there is no single objective optimizer for this objective, as its optimal solution is priorly known. (For more information refer to the paper)
To import the data, the excel file should include two sheets. A sheet including parcels' sigmas, and the name of the sheet is passed as
The first row of this sheet will be ignored as captions. The first column of the sheet should include names, and the second column should include sigmas.
Here is an example Sigma table:
The second sheet should include the matrix of parcels' correlation, and the name of the sheet is passed as
The first row of this sheet will be ignored. If the problem has
n parcels, then the correlation sheet should
n+1 columns. The first column of the sheet should include names and the other
n columns should have the
n*n correlation matrix. The Correlation matrix should be a symmetric matrix whose diogonal elements are all one.
The member in the
i+1'th row and
j+1'th column will then be the correlation between the parcels whose names are in the
row in the first column. Remember the first column has the parcel names.
Here is an example Correlation table:
NULL (creates some variables in the environment but returns nothing)
Other Risk Objective:
1 2 3 4 5 6
## Not run: Risk_Objective_Import("C:\\example.xlsx", Sigma_Sheet = "Sigma", Correlation_Sheet= "Correlation") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.