How to optimise taxes

5 ビュー (過去 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 Center および File ExchangeSolver 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