How to optimise taxes

조회 수: 2 (최근 30일)
Joao Pereira
Joao Pereira 2020년 1월 6일
댓글: Joao Pereira 2020년 1월 6일
Hi everyone
I have working on a code which would allow me to look the optimal level of taxes the goverment could apply, so I have created both demand and supply functions and I have used fmincon but I do not know how can set Government tax= T*Q.
Should I create another function?
This is what I have so far:
function [x, fval, expected_return] = effportfolio(fun, Sigma, mu, mu_p_0, initial_guess, optimisation_options)
%EFFPORTFOLIO solves for the efficient portfolio
%optimisation_options
if nargin<6
optimisation_options=[];
end
%% constraints
Aeq = [mu' ; ones(1,length(mu))];
beq = [mu_p_0;1];
%% Minimisation
if strcmp(fun, 'quadprog')
[x, fval] = quadprog(Sigma, [], [], [], Aeq, beq) ;
else
[x, fval] = fmincon(@effportobj, initial_guess, [], [], Aeq, beq, [], [], [], optimisation_options, Sigma) ;
end
expected_return = x'*mu;
end
function z = effportobj(x, Sigma)
z = x'*Sigma*x;
end
function fun = myfun2
fun{1} = @(P) 1*Q+10+T;
fun{2} = @(P) -3*Q+90;
end
Thank you very much
  댓글 수: 1
Joao Pereira
Joao Pereira 2020년 1월 6일
I have also find this example which I think it may be
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.mathworks.com%2Fhelp%2Foptim%2Fug%2Fexample-nonlinear-constrained-minimization.html%3Ffbclid%3DIwAR0yYyblrh29WZ9HcUwnH0l68qsyp5rF1fRAiZcBtDW4eVd2t0TTrGytOuo&h=AT249AnzXCK9gaJYHhNeD0A2_3uTNILsHWjcjuog7SpK5EO9HUjSFH38YFT0s6H40pg3c395KjFsTH57folQs_Mgbq0UFMBkyJOkbMA433GUG-bW0nFNRxtWv1Lv9d-PKJcXDg

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by