Active overweight constraint in portCons

조회 수: 8 (최근 30일)
Deepak
Deepak 2021년 10월 19일
답변: Alejandra Pena-Ordieres 2024년 11월 25일
I want to define active overweight. Formula is Max(0, Portwt - IndexWt) i.e. if a stk's wt in portfolio is 0.15 and in index it is 0.10, the active overwt is 0.05 whereas in a reverse scenario the active overwt is zero. This is done for each stk. The sum of this formula for all stks put together should not be more than say 0.3. How to incorporate this constraint in the portcons?

답변 (2개)

Meet
Meet 2024년 11월 18일
Hi Deepak,
You can define custom constraints using the "portcons" function by specifying the "ConstType" as "Custom". For example, I have structured a sample code with the constraints you mentioned for a portfolio of three stocks:
% Number of assets
NumAssets = 3;
% Portfolio weights and Index weights (example values)
PortWt = [0.15, 0.12, 0.08];
IndexWt = [0.10, 0.15, 0.05];
% Determine the active overweight constraint
A = zeros(1, NumAssets);
for i = 1:NumAssets
if PortWt(i) > IndexWt(i)
A(i) = 1; % Active overweight position
else
A(i) = 0;
end
end
% Maximum allowable active overweight
b = 0.3;
% Constraint set using portcons
ConSet = portcons('Custom', A, b);
Hope this helps!!

Alejandra Pena-Ordieres
Alejandra Pena-Ordieres 2024년 11월 25일
Hi Deepak,
First, I'd recommend using the Portfolio object instead of portcons. The Portfolio object is the most up-to-date functionality for portfolio optimization and it supports more constraints and workflows. See Portfolio Optimization Examples Using Financial Toolbox for some example problems that can be solved with the Portfolio object and its related methods.
In your case, you'd want to use the setOneWayTurnover method with BuyTurnover set to 0.3, SellTurnover set to [], and InitPort set to IndexWt.
p = Portfolio(AssetMean=assetMean,AssetCocar=assetCovar);
p = setOneWayTurnover(0.3,[],IndexWt);
Hope this heps,
Alejandra

카테고리

Help CenterFile Exchange에서 Portfolio Optimization and Asset Allocation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by