kjames05

0 Reputation

2 Badges

13 years, 139 days

MaplePrimes Activity


These are questions asked by kjames05

I'm trying to have Maple automatically assign values to variables that are given in a list.

This is my function:

optp:=Maximize(F(w1,w2,w3))

optp:=[0.345,[w1=0.05,w2=0.6,w3=0.35]]

Now how do I get Maple to automatically assign w1,w2, and w3 to the values given in the output?

I tried this code:

w1:= optp[2][1];

I have a non linear Sharpe ratio with 3 portfolio weights w1,w2 and w2. I want to (globally) maximize the sharpe ratio by choosing w1,w2 and w2 subject to the constraints that each of the variables is in the range of 0 to 1, and that their summation is equal to 1. I also want the maximization to start at an initial point of [w1=0.35,w2=0.6,w3=0.05].

The function is:

SR:= (0.012w1+0.007w2+0.0384w3-0.009)/(stdev)

where stdev is the standard deviation of the portfolio ...

I'm having trouble maximizing this funciton:

 

S=  (w1*E1+w2*E2+w3*E3)/(CoVar[1,2]), subject to the constraint w1+w2+w3=1

 

I need it to choose w1, w2, and w3 to maximize S

Page 1 of 1