optimization - using fmin
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
have a non linear maximization problem in Matlab (Max utility):
A=(((V/I)-Epsilon_A_S)*S_Initial-Epsilon_A_c*Call_Price)*
(1+r)+Epsilon_A_S*S_A-(Gamma/2)*(Epsilon_A_S^2)*(Sigma_i^2)
B=(((V/I)-Epsilon_A_S)*S_Initial-Epsilon_A_c*Call_Price)*(1+r)+
(Epsilon_A_S+Epsilon_A_c)*S_A-(Gamma/2)*(Epsilon_A_S+Epsilon_A_c)^2*(Sigma_i^2)-
Epsilon_A_c*K
z=(K-S_A)/Sigma_i
Utility_A=-exp(-Gamma*A)*normcdf(z+Gamma*Epsilon_A_S*Sigma_i)
+-exp(-Gamma*B)*(1-normcdf(z+Gamma*(Epsilon_A_S+Epsilon_A_c)*Sigma_i))
I want to maximize utility function by finding: Epsilon_A_S, Epsilon_A_c
The constraints are:
Epsilon_A_S<=2
Epsilon_A_c>=-1
All the rest are parameters.
How do I do I set this problem in Matlab?
1 Commento
Rik
il 16 Mag 2018
Sent by email:
"Dear Rik, Thank you very much for helping me with fminseach problem, as I'm doing my first steps in matlab. I still having problem for finding this equilibrium (I cannot find a feasible solution while trying to get the results in this paper in figure 1: https://www.scirp.org/journal/PaperInformation.aspx?PaperID=74734 can you please help me with that? kind regards, Yossi"
The advice offered on this page is applicable here as well. I won't invest the time to read an academic paper outside my field just to help you write code. If you write a good description of what you want to implement, you can post your question on this forum. Make sure to include what you tried and what specifically is different from your intended result. Have a read here and here. It will greatly improve your chances of getting an answer.
Risposta accettata
Rik
il 10 Mag 2018
7 Commenti
Rik
il 10 Mag 2018
Because when Epsilon_A_S<=2 becomes false (so when the solver tries a non-valid solution), 1/(Epsilon_A_S<=2)-1 becomes inf. Because the solver tries to minimize the function value, this means that it will only ever find a non-valid solution when the cost function is inf everywhere. For solutions that do comply with the conditions, this extra part becomes 0, so it has no effect on the rest of the cost function.
Più risposte (2)
Yossi
il 13 Mag 2018
2 Commenti
Rik
il 13 Mag 2018
Is the pattern clear? You need to add the 1/(test)-1 with your additional constraint. I've added it in the lines below.
minimize_function=@(Epsilon_A_S,Epsilon_A_c)...
-Utility_A(Epsilon_A_S,Epsilon_A_c)+...
1/(Epsilon_A_S<=2)-1+...
1/(Epsilon_A_S>=-1)-1+...
1/(Epsilon_A_c>=-1)-1;
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!