全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 统计软件培训班VIP答疑区
3177 1
2010-06-13
我在做金融资产组合问题。涉及到使用SOLVOPT函数进行最优化。我对SAS比较熟, 但网上只找到这个程序的matlab和c版。
我不清楚这个程序与一般的(比如SAS 的PROC NLP)非线性优化程序有什么区别?是否可以用别的方法替代。

还有,我希望加入一个形如ΣX(+)<=1(结果中所有为正的值之和小于等于1)的约束。不知道如何加入。
无论是matlab还是SAS/IML都可以,还请高手指点。



以下是其说明:
SOLVOPT version 1.2 (June, 1997)
   by Alexei Kuntsevich and Franz Kappel
   University of Graz, Austria

   The function SOLVOPT performs a modified version of Shor's r-algorithm in
   order to find a local minimum resp. maximum of a nonlinear function
   defined on the n-dimensional Euclidean space

   or

   a solution of a nonlinear constrained problem:

   min { f(x): g(x) (<)= 0, g(x) in R(m), x in R(n) }
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-8-16 13:17:22
比如,f(x)=x1*x2*x3
s.t x1+x2+x3=1
x1,x,2,x3>0
1.编写目标函数m文件confun1.m
function f=myfun1(x)
f=-x(1)*x(2)*x(3);

2.调用fmincon函数m文件Solveconfun1.m
options = optimset('LargeScale','off','display','iter');
%参数设置使用中等规模算法,显示迭代过程
Aeq=[1,1,1]; %线性等式约束系数矩阵

beq=[1];%线性等式约束常量向量
x0=[0.3,0.4,0.3];%初始迭代点
lb=[0,0,0]%变量下线
[x,fval,exitflag,output,lambda,grad,hessian]= fmincon(@myfun1,x0,[][],Aeq,beq,lb,[],[],options)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群