0

Anybody can please tell me how I can use Quadratic Risk Programming in netlogo? I wish to use following portfolio choice rule -

Max:U = E - φσ

Where, U = utility, E = expected returns from assets, φ = risk aversion parameter, σ = variances

In R i got following codes to execute such model -

Create the portfolio specification

port_spec <- portfolio.spec(assets = colnames(index_returns))

Add a full investment constraint such that the weights sum to 1

port_spec <- add.constraint(portfolio = port_spec, type = "full_investment")

Add a long only constraint such that the weight of an asset is between 0 and 1

port_spec <- add.constraint(portfolio = port_spec, type = "long_only")

Add an objective to maximize portfolio mean return

port_spec <- add.objective(portfolio = port_spec, type = "return", name = "mean")

Add an objective to minimize portfolio variance

port_spec <- add.objective(portfolio = port_spec, type = "risk", name = "var", risk_aversion = 10)

Solve the optimization problem

opt <- optimize.portfolio(R = index_returns, portfolio = port_spec, optimize_method = "ROI")

But, is there any similar codes in netlogo? I tried all the possible sources but failed to get a similar code or model in netlogo. The major parts of my model is executed in netlogo. So, I need a netogo-based similar model.

  • 2
    You need to provide the relevant parts of your model and describe what, exactly, is going wrong. StackOverflow is about helping you fix your code, not creating it for you. You might want to try the NetLogo users group to see if anyone has done something similar. – JenB Jun 23 '20 at 17:53
  • I edited my question. Please let me know if still this is irrelevant. But,I have not found similar problem in Netlogo user group. – Kazi Masel Jun 23 '20 at 19:52
  • If you're asking whether there is a NetLogo extension (like a package in R) that will do quadratic risk programming, not that I know of. But someone on the NetLogo users group may be aware of something. Also, the R extension could allow you to do this in R, calling it from NetLogo. – JenB Jun 23 '20 at 20:42
  • Thank you JenB. I am also trying to do something like this though I could not present that in question properly. I will also ask this question in Netlogo user group. – Kazi Masel Jun 23 '20 at 21:35

0 Answers0