optimalES: use the DEoptim algorithm to calculate the optimal ES by...

Description Usage Arguments Value

View source: R/optimalES.R

Description

use the DEoptim algorithm to calculate the optimal ES by using the box constriant

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
optimalES(
  stockNames,
  returns,
  wMin = 0,
  wMax = 1,
  searchSize = 50000,
  itermax = 200,
  min_sum = 0.99,
  max_sum = 1.01,
  p = 0.95,
  trace = FALSE
)

Arguments

stockNames

the ticker of stocks

returns

the return matrix of a bunch of stocks

wMin

the minimum weight of each stock

wMax

the maximum weight of each stock

searchSize

the search steps of DEoptim algorithm

itermax

the parameter for DEoptim.control function

min_sum

the minimum of the weight sum

max_sum

the maximum of the weight sum

p

the confidence level of the ES

trace

whether print the interctive process or not

Value

A numeric value


zlfccnu/econophysics documentation built on Feb. 23, 2022, 10:22 p.m.