Introducing Hypotesis Testing in Mean-Variance analysis for portfolios

2 次查看(过去 30 天)
I am using some build in functions from the Financial Toolbox to perform a mean-variance optimization analysis on selected portfolios. I hypothesize that combining two portfolios of assets into one will yield better results in terms of risks and returns, in comparison to being separetely.
Is there any possible way to introduce hypothesis testing (Such as T-tests) in this analysis? I would like to test whether combining two portfolios has indeed a significant effect in terms of risk and returns in comparison to each portfolio separately. The problem is that I am not running regressions and I can't find an obvious way to do a statistical test on build in functions.
Any advice that would help clear things a bit more would be highly appreciated.
This is part of my code:
%% Creating a Portfolio and plotting efficient frontier
p = Portfolio('AssetList',symbol,'RiskFreeRate',0.03/252); %Assuming Risk-Free rate is 3% per annum (US 30-year rate)
p = estimateAssetMoments(p, dailyReturn); %Estimating Means and Covariances of the portfolio's Assets
p = setDefaultConstraints(p); % So that we can not short any asset and have to invest 100% of our capital. All of the capital is invested in risky assets and none in cash or risk free assets
plotFrontier(p,15)
weights = estimateMaxSharpeRatio(p); %To find the optimal weights for max Sharpe Ratio
[risk1, ret1] = estimatePortMoments(p, weights); %To find the optimal risk(standard deviation) and return(mean) of the portfolio
hold on
plot(risk1,ret1,'*r');
Sharpe = estimatePortSharpeRatio(p,weights);
Thank you in advance.

回答(1 个)

Saarthak Gupta
Saarthak Gupta 2023-9-21
Hi,
I understand you are trying to perform Hypothesis Testing on two portfolios, to compare their mean returns and risk.
Assuming the returns of both portfolios are available and that they are normally distributed, we can conduct the two-sample T-test, using the ‘ttest2’ function. Null hypothesis would be that the returns come from independent random samples from normal distributions with equal means and unknown variances. Variances may or may not be equal.
Refer to the following command to achieve the same:
h = ttest2(dailyReturns1, dailyReturns2, "Alpha", 0.05)
If ‘h’ is equal to 0, it implies that the null hypothesis holds for the given returns. Otherwise, the alternate hypothesis holds.
In case the variances are NOT assumed to be equal, specify the “VarType” property of ‘ttest2’ to ‘unequal’, as follows:
h = ttest2(dailyReturns1, dailyReturns2, "Alpha", 0.05, "VarType", unequal)
Refer to the following MATLAB documentation for further reference:

类别

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