optim_portfolio: Optimal portfolio.

View source: R/optim_portfolio.R

optim_portfolioR Documentation

Optimal portfolio.

Description

Optimal Portfolio.

Usage

optim_portfolio(w_ini, fn, lb, ub, eqfun, eqB, w_bench = NULL,
  lb_act = NULL, ub_act = NULL, ineqfun = NULL, ineqLB = NULL,
  ineqUB = NULL, method = "RI", fixed = NULL, n.restarts = 10,
  n.sim = 20000, type = "absolute", itermax = 1000, NP = 100,
  max.time = 180)

Arguments

w_ini

Initial weights.

fn

Objective function or list of objective function. By default it corresponds to the mean-var utility.

lb

Lower bound.

ub

Upper bound.

eqfun

Equality constraint function returning vector.

eqB

Equality constraints.

w_bench

Benchmark weigths.

lb_act

Lower bound active weight per asset

ub_act

Upper bound active weight per asset

ineqfun

Inequality constraint function returning vector.

ineqLB

Inequality lower bound.

ineqUB

Inequality upper bound.

method

Gradient descent (GD), GD with random initialization (RI), differential evolution (DE), Genetic Opt. using Derivative (GE), Generalized Simulated Annealing (SA) or Memetic with local search (MALS).

fixed

Numeric index indicating parameters that stay fixed.

n.sim

Random parameters for every restart of the solver.

type

Type of objective function. absolute or relative.

itermax

Maximum iteration (population generation) allowed.

NP

Number of population members.

max.time

Max time in seconds. Applied to SA.

n.restars

Number of solver restarts.

Value

Optimal weights.


veldanie/SuraInvestmentAnalytics documentation built on March 29, 2025, 7:43 p.m.