Get Langrangian function including short-selling restriction

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am making portfolios in Python. I want to have two scenarios's: one where short-selling is allowed and one were short-selling is not allowed. This I my utility function for some risk aversion parameter c:



U = w′μ − (c/2 w′ 'variance matrix' w)



This quantity I intend to minimize under restrictions: Sum(wi) = 1 wi greater or equal to 0 (this is the no-short selling is allowed restriction).



I want to solve this via a Langragian function so that I can calculate the weights in my program in Python. But I do not know how my Langragian function looks like and how to solve it. Hope anyone can help!










share|cite|improve this question





















  • Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
    – José Carlos Santos
    Sep 5 at 9:31














up vote
0
down vote

favorite












I am making portfolios in Python. I want to have two scenarios's: one where short-selling is allowed and one were short-selling is not allowed. This I my utility function for some risk aversion parameter c:



U = w′μ − (c/2 w′ 'variance matrix' w)



This quantity I intend to minimize under restrictions: Sum(wi) = 1 wi greater or equal to 0 (this is the no-short selling is allowed restriction).



I want to solve this via a Langragian function so that I can calculate the weights in my program in Python. But I do not know how my Langragian function looks like and how to solve it. Hope anyone can help!










share|cite|improve this question





















  • Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
    – José Carlos Santos
    Sep 5 at 9:31












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am making portfolios in Python. I want to have two scenarios's: one where short-selling is allowed and one were short-selling is not allowed. This I my utility function for some risk aversion parameter c:



U = w′μ − (c/2 w′ 'variance matrix' w)



This quantity I intend to minimize under restrictions: Sum(wi) = 1 wi greater or equal to 0 (this is the no-short selling is allowed restriction).



I want to solve this via a Langragian function so that I can calculate the weights in my program in Python. But I do not know how my Langragian function looks like and how to solve it. Hope anyone can help!










share|cite|improve this question













I am making portfolios in Python. I want to have two scenarios's: one where short-selling is allowed and one were short-selling is not allowed. This I my utility function for some risk aversion parameter c:



U = w′μ − (c/2 w′ 'variance matrix' w)



This quantity I intend to minimize under restrictions: Sum(wi) = 1 wi greater or equal to 0 (this is the no-short selling is allowed restriction).



I want to solve this via a Langragian function so that I can calculate the weights in my program in Python. But I do not know how my Langragian function looks like and how to solve it. Hope anyone can help!







functions






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Sep 5 at 9:27









user9891079

1




1











  • Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
    – José Carlos Santos
    Sep 5 at 9:31
















  • Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
    – José Carlos Santos
    Sep 5 at 9:31















Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Sep 5 at 9:31




Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Sep 5 at 9:31















active

oldest

votes











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2906070%2fget-langrangian-function-including-short-selling-restriction%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2906070%2fget-langrangian-function-including-short-selling-restriction%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Carbon dioxide

Why am i infinitely getting the same tweet with the Twitter Search API?