turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-06-2016 02:26 PM

Hello,

In this program I’m trying to maximize portfolio skewness under constraints.

Nevertheless , I have one more problem. In my case, I have one linear constraint and one Nonlinear constraint (quartic constraint about portfolio kurtosis which is less than a scalar). As I understand while reading chapter 14 about Nonlinear optimization examples, I must use **NLPQN** instead of **NLPNRA**! IS that sufficient?

In the other hand, I still think about the mining of **“optn”**! and if **x0** must take always only two initial values?

Finally, I want to state decision variables wi as positive, I question whether it been subject to a further constraint.

Sorry for those lots of questions. Thank you in advance!

**proc** **iml**;

M3 = {**32** **-7** **-7** **-8**,

**-7** **-8** **-8** **17**};

start skpf(p) global(M3);

w = p`; /* w is column vector */

return w` * M3 * (w@w);

finish;

/* specify linear constraints */

con = { **0** **0** . ., /* min w[i] */

**1** **1** . ., /* max w[i] */

**1** **1** **0** **1**}; /* sum(w) = 1 */

x0 = {**0.5** **0.5**};

optn = {**1** /* maximize objective function */

**1** }; /* summarize iteration history */

call nlpnra(rc, xOpt, "skpf", x0, optn, con);

maxVal = skpf(xOpt);

**print** rc, xOpt maxVal;

Accepted Solutions

Solution

10-11-2016
10:47 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to JANET1987

10-11-2016 07:24 AM

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to JANET1987

10-07-2016 12:33 AM

Yes. If you have nonlinear constraint , you have to switch into NLPQN.

if you have three assets , then you have to have three initial value for x0.

con={} already constraint 0<= w1 ,w2 <=1,

if you have nonlinear constrain condition,you need add one more option in it.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

10-10-2016 05:48 AM

Hello,

Thank you very much! Your recommandations are highly appreciated. I'm still trying to solve the problem.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

10-10-2016 11:04 AM

Hello,

Sorry, but what about if I have 500 assets, should I have 500 initial values for X0?

thank you in advance

Solution

10-11-2016
10:47 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to JANET1987

10-11-2016 07:24 AM

Yes. I think so .

You can easily define it as

x0=j{1,500,1}/500;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

10-11-2016 10:46 AM

Great!!! Thank you so much!