Formula for calculating marginal risk contributions (video MATLAB for Advanced Portfolio Construction and Stock Selection Models)

4 views (last 30 days)
Steven Niggebrugge on 8 Feb 2017
Answered: Jan Studnicka on 24 Jul 2017
Hi, i just watched the video https://nl.mathworks.com/videos/matlab-for-advanced-portfolio-construction-and-stock-selection-models-120626.html?elqsid=1485902640730&potential_use=Commercial
In slide number 7, there is a formula for calculating the marginal risk contribution for an asset i, given a weights vector and the covariance matrix MC(i) = sum(w(j) * cov(i,j)) / stdev(portfolio returns) - loop j from 1:n
However, after 5min5sec in the video, it shows the m-file marginalRiskContribution. There it seems that the denominator of that formula is replaced by stdev(asset i returns).
Can anyone tell me which formula is correct to calculate the marginal risk contribution for asset i?
thanks so much.

Jan Studnicka on 24 Jul 2017
Hi, correct formula is in slide number 7.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8234814,"math_prob":0.8126045,"size":1183,"snap":"2022-05-2022-21","text_gpt3_token_len":286,"char_repetition_ratio":0.10262935,"word_repetition_ratio":0.048484847,"special_character_ratio":0.23161454,"punctuation_ratio":0.098130845,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99630314,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-01-27T05:28:13Z\",\"WARC-Record-ID\":\"<urn:uuid:1a7755b8-c6fb-4450-b171-2ea3fbd95e33>\",\"Content-Length\":\"103625\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bed9c433-cd35-4976-880f-bdea51ccaacf>\",\"WARC-Concurrent-To\":\"<urn:uuid:5ade8241-f2ee-4b55-abae-959fc7f421fe>\",\"WARC-IP-Address\":\"104.68.243.15\",\"WARC-Target-URI\":\"https://ch.mathworks.com/matlabcentral/answers/324001-formula-for-calculating-marginal-risk-contributions-video-matlab-for-advanced-portfolio-constructio\",\"WARC-Payload-Digest\":\"sha1:HELSUUDSZTOHZM3WSIDMG4HYGH65GSBX\",\"WARC-Block-Digest\":\"sha1:J6NDTRJHLCSMKP7UM3OITMVI3P2AMMTG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-05/CC-MAIN-2022-05_segments_1642320305141.20_warc_CC-MAIN-20220127042833-20220127072833-00177.warc.gz\"}"}