dat <- read.Alteryx("#1")
# Set "risk aversion parameter", a = 8
a <- 8
cov_mat <- as.data.frame(-2*a*cov(dat))
write.Alteryx(cov_mat, 1)
Warn
lb=0
ub="Inf"
type="C"
1973
1.075
0.942
0.852
0.815
0.698
1.023
0.851
1.677
1974
1.084
1.02
0.735
0.716
0.662
1.002
0.768
1.722
1975
1.061
1.056
1.371
1.385
1.318
1.123
1.354
0.76
1976
1.052
1.175
1.236
1.266
1.28
1.156
1.025
0.96
1977
1.055
1.002
0.926
0.974
1.093
1.03
1.181
1.2
1978
1.077
0.982
1.064
1.093
1.146
1.012
1.326
1.295
1979
1.109
0.978
1.184
1.256
1.307
1.023
1.048
2.212
1980
1.127
0.947
1.323
1.337
1.367
1.031
1.226
1.296
1981
1.156
1.003
0.949
0.963
0.99
1.073
0.977
0.688
1982
1.117
1.465
1.215
1.187
1.213
1.311
0.981
1.084
1983
1.092
0.985
1.224
1.235
1.217
1.08
1.237
0.872
1984
1.103
1.159
1.061
1.03
0.903
1.15
1.074
0.825
1985
1.08
1.366
1.316
1.326
1.333
1.213
1.562
1.006
1986
1.063
1.309
1.186
1.161
1.086
1.156
1.694
1.216
1987
1.061
0.925
1.052
1.023
0.959
1.023
1.246
1.244
1988
1.071
1.086
1.165
1.179
1.165
1.076
1.283
0.861
1989
1.087
1.212
1.316
1.292
1.204
1.142
1.105
0.977
1990
1.08
1.054
0.968
0.938
0.83
1.083
0.766
0.922
1991
1.057
1.193
1.304
1.342
1.594
1.161
1.121
0.958
1992
1.036
1.079
1.076
1.09
1.174
1.076
0.878
0.926
1993
1.031
1.217
1.1
1.113
1.162
1.11
1.326
1.146
1994
1.045
0.889
1.012
0.999
0.968
0.965
1.078
0.99
CPLEX_LP
True
quadprog
QP
matrix
{"fileType":"CPLEX_LP","filePath":"","solver":"quadprog","inputMode":"matrix","maximize":true,"problemType":"QP"}
0
[]
[]
landing
Matrix Input Mode
Percentage
==
1
C:\Users\kliu\AppData\Local\Temp\Engine_10116_3465cc1e033a482c8dab9ca996075de9_\Engine_10016_8a8b6ca507914d25940c15d06ab81f16_.yxdb
C:\Users\kliu\AppData\Local\Temp\Engine_10116_3465cc1e033a482c8dab9ca996075de9_\Engine_10016_8a01700167ae4728abf41373984afd4b_.yxdb
C:\Users\kliu\AppData\Local\Temp\Engine_10116_3465cc1e033a482c8dab9ca996075de9_\Engine_10016_13cfc91b23f9452eac674e22d974f8cc_.yxdb
Single
Report
Portfolio Optimization with Optimization tool (Quadratic Programming)
Percentage=1
Container 34
Field_2=-16*[Field_2]
Field_3=-16*[Field_3]
Field_4=-16*[Field_4]
...
Horizontal
PortfolioVan