This function simulates the payoff of different kinds of dynamic strategies. Depending on the option chosen, the output may be concave or convex.

simulate_strategy(
  budget = 10000,
  horizon = 6/12,
  step = 1/252,
  mu = 0.2,
  sigma = 0.4,
  rf = 0.04,
  n_simul = 10000,
  strategy = c("max_utility", "buy_hold", "cppi", "obpi"),
  allocation = 0.5,
  floor = budget * 0.9,
  multiple = 10,
  aggressiveness = 0.5
)

Arguments

budget

A double. The initial investment.

horizon

A double. The investment horizon, in years.

step

A double. The time frequency, in years.

mu

A double. The mean of the process, in years.

sigma

A double. The volatility of the process, in years.

rf

A double. The risk-free rate, in years.

n_simul

A integer. The number of simulations to be conducted.

strategy

A character. One of: "max_utility", "buy_hold", "cppi", "obpi".

allocation

A double between 0 and 1. Only used for "max_utility" and "buy_hold".

floor

A double. The amount the investor doesn't want to loose. Only used if strategy = "cppi".

multiple

A integer showing how aggressive the investor should be.

aggressiveness

A double between 0 and 1 showing how aggressive the investor should be. Higher numbers are connected with higher convexity.

Value

An S3 list of the DynamicStrategies class.

Examples

simulate_strategy()
#> << Dynamic Strategy >> #> time : 0 0.003968254 0.007936508 ... 0.4920635 0.4960317 0.5 #> portfolio_series : 10000 9985.648 10025.4 ... 9821.782 9963.535 9867.884 #> market_series : 10000 9969.708 10047.5 ... 9243.591 9508.94 9324.857 #> percentage_series: 0.5 0.5 0.5 ... 0.5 0.5 0.5 #> underlying_index : 9324.857 9966.653 5856.154 ... 6394.964 8122.401 9655.367 #> portfolio_value : 9867.884 10192.31 7803.852 ... 8175.575 9197.936 10015.56