Value-at-risk (VaR) - variance-covariance and historical simulation methods (Excel) (SUB)

Sdílet
Vložit
  • čas přidán 15. 01. 2020
  • Hello everyone!
    In today's video, I'm going to explain the Value-at-Risk (VaR) measure of the risk of loss of investments. It estimates how much a set of investments might lose (with a given probability), given normal market conditions, in a set time period such as a day. I will also demonstrate how to calculate it in Excel, using the data on HSBC, Barclays, Lloyds, RBS and Standard Chartered.
    Don't forget to subscribe to NEDL and give this video a thumbs up if you want more videos in Finance!
    Please consider supporting NEDL on Patreon: / nedleducation

Komentáře • 101

  • @NEDLeducation
    @NEDLeducation  Před 3 lety +7

    You can find the spreadsheets for this video and some additional materials here: drive.google.com/drive/folders/1sP40IW0p0w5IETCgo464uhDFfdyR6rh7
    Please consider supporting NEDL on Patreon: www.patreon.com/NEDLeducation

  • @joeaoun6321
    @joeaoun6321 Před 2 lety +4

    Another extremely helpful video. You do an outstanding job making it look easy!

  • @crentistDaDentist
    @crentistDaDentist Před rokem

    Most underrated channel for finance. Amazing content and God level excel skills.

  • @rigtee
    @rigtee Před 2 lety +2

    Thanks a lot for this video! This was so helpful for a project of mine for my Derivatives class!

  • @lostthe80s
    @lostthe80s Před 3 lety +1

    Absolutely first class work - fantastic step-by-step guide (which I have used for to model my Crypto portfolio of 15 coins). My most sincere thanks !

  • @fabiosanti7153
    @fabiosanti7153 Před rokem +1

    It was extremely helpful. Thanks!

  • @jakeu9623
    @jakeu9623 Před 3 lety +3

    your videos have helped me a lot with my excel assignments for my investment management module. It was the best content I could find on youtube. You deserve more viewers and will surely get them soon enough

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      Hi Jake, thank you for your kind words, really appreciate it, and glad you found the video helpful! :)

    • @avinashmishra6783
      @avinashmishra6783 Před 3 lety

      +1

  • @jb_makesgames2264
    @jb_makesgames2264 Před rokem +1

    Great Video - as a former bank risk manager I was pleasantly surprised that you referred to Basel regs and VaR

    • @NEDLeducation
      @NEDLeducation  Před rokem

      Hi, and thanks for the feedback! Always flattered when practitioners find my videos helpful :)

  • @jodyli9653
    @jodyli9653 Před rokem +1

    Very helpful, thank you 👍

  • @CFATrainer
    @CFATrainer Před měsícem

    this is just excellent stuff

  • @marf982b
    @marf982b Před rokem

    One of my favourite video....

  • @lukethomas5660
    @lukethomas5660 Před 3 lety +1

    Many thanks Savva, another great video. Just joined your Patreon too, best money I ever spent! With either VCV or HS VaR methods, is it possible to incorporate a decay / lambda to the time series so that recent returns are given a greater weighting?

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      Hi Luke, and many thanks for your support, really appreciate it! Please send me a direct message on Patreon to claim your reward :) As for your question, I have examined the most common technique for incorporating decay in VaR - the so-called BRW VaR - in one of the later videos, check it out if you are interested: czcams.com/video/CAsgjA7KodQ/video.html

  • @fatimaalmadhi1727
    @fatimaalmadhi1727 Před 4 lety +3

    thank you sooooooooooooooooo much for the video, helped me a lot

    • @NEDLeducation
      @NEDLeducation  Před 4 lety

      Hi Fatima, thank you very much for your feedback, glad it was helpful:)

  • @olegivanov4883
    @olegivanov4883 Před 4 lety +2

    Здорово, мне понравилось видео. Особенно наглядность и простота (в хорошем смысле) примера. Знаю английский, но русские субтитры - хорошая идея.

    • @NEDLeducation
      @NEDLeducation  Před 4 lety

      Спасибо за фидбек, в ближайших планах - сделать русские субтитры для всех видео на канале.

  • @amirhoseinyaftian2510
    @amirhoseinyaftian2510 Před rokem +1

    thank you 🙏😌

  • @mohanbandaru06
    @mohanbandaru06 Před 5 měsíci

    thank you very much....

  • @rajuchoudhari2409
    @rajuchoudhari2409 Před 2 dny

    very nice 😊

  • @yanxiliu6818
    @yanxiliu6818 Před 4 lety +2

    Thanks for your video!! Very clear and detailed. It really helps me a lot with my homework! Just one question, when we calculate the historical VaR, do we need to first reorganize the portfolio returns in order from worst to best, and then apply the PERCENTILE.EXC equation?

    • @NEDLeducation
      @NEDLeducation  Před 4 lety

      Hi Yanxi, and many thanks for your feedback! Glad the video helped you study. To apply the PERCENTILE.EXC function, the returns do not need to be sorted. However, for some other purposes (graph plotting, distribution fitting) sorted returns are required.

    • @yanxiliu6818
      @yanxiliu6818 Před 4 lety

      @NEDL Got it! Thank you so much!

  • @saadeddinerafiky7743
    @saadeddinerafiky7743 Před 4 lety +1

    great video !!!! thanks for the upload just one question can i use the same method for more than 5
    securities or is there a variation in the calculation ??

    • @NEDLeducation
      @NEDLeducation  Před 4 lety +1

      Hi Saad, many thanks for the feedback and for the question! Yes, the same method is applicable to any number of securities.

    • @saadeddinerafiky7743
      @saadeddinerafiky7743 Před 4 lety

      @@NEDLeducation thank you very much !!! keep up the great work !!!

  • @renalnunes1692
    @renalnunes1692 Před 3 lety +1

    Hello, this is a nice explanation. How can I use the historical stimulation approach and the model building approach to calculate the VaR of a single stock?

    • @NEDLeducation
      @NEDLeducation  Před 3 lety +1

      Hi Renal, and glad you liked the video! For a single stock, you can simply treat its portfolio weight as 100% in this template, or use historical mean and standard deviation for VCV. For historical simulation, just apply the percentile function to the array of individual stock returns rather than portfolio returns. Hope it helps!

  • @qu44ck65
    @qu44ck65 Před 2 lety +1

    I totally understood the video! but just one thing I would like to ask: How should I go about calculating returns on the portoflio if i am allocating my capital according to different weighing schemes?

    • @NEDLeducation
      @NEDLeducation  Před 2 lety +1

      Hi, and thanks for the question! For VaR simulations, simply use the SUMPRODUCT function and apply it to your returns and respective portfolio weights. I have got several videos in the portfolio management tutorial on weighting schemes and their Excel applications, so check these out if you are interested, for example:
      czcams.com/video/fGov9fvug8o/video.html

  • @MG-yt4om
    @MG-yt4om Před 2 lety +1

    Hi Matt in many other examples found online the formula to compute the VCV VaR don not include the addition of the portfolio mean return.
    do you have any idea why.
    Since adding the mean results in significally differente VaR I would like to better understand the reasoning behind including or excluding the mean.
    Thanks

    • @NEDLeducation
      @NEDLeducation  Před 2 lety

      Hi, and thanks for the question! Adding or not adding the mean does depend ultimately on the nature of the assets you calculate VaR for (some assets such as commodities can be expected to have theoretically zero drift) and on the time horizon as well (the shorter it is, the more negligible is the effect of the mean onto the calculations).

  • @lucapetruccioli4078
    @lucapetruccioli4078 Před 3 lety +6

    Thanks for posting this, very helpful indeed. One question for you: how would you change this model in case you wanted to calculate 10 days VaR for the same portfolio of assets on certain dates, for instance on 04.07.2020 and 04.06.2020 ?

    • @Valeria-qh9yj
      @Valeria-qh9yj Před 3 lety +2

      I have the same question, thank you!

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      Hi Luca, and many thanks for the feedback! As for your question: to calculate a 10-day VaR you can just scale the mean and variance accordingly, i.e., multiply the mean by 10 (or preferably use the geometric formula) and the standard deviation by square root of 10. We have a separate video on volatility scaling that investigates the issue in greater depth: czcams.com/video/_z-08wZUfBc/video.html. When you have 10-day mean and standard deviation, you can apply the same VaR procedure. As for VaR on different dates, the only thing that would be different for a VaR on 4th June and 4th July is the available historical data you can use to calculate mean and variance (or use for historical simulation). Theoretically, you can apply a "rolling" VaR for different dates, using all observations available up to a certain time period. Hope it helps!

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      @@Valeria-qh9yj Hi Valeria, and thanks for the question! Please check the reply above. Hope it helps.

    • @Valeria-qh9yj
      @Valeria-qh9yj Před 3 lety +1

      @@NEDLeducation Many thanks! The video is extremely helpful! Could you please also suggest whether you have a video / or advise on how to use the SMA and EMA returns in the VCV matrix?

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      @@Valeria-qh9yj Hi Valeria and glad the video helped! As for SMA and EMA for value-at-risk, the SMA return is actually applied in this video, as all historical observations are given exactly the same weight both when calculating average return and variance for the VCV VaR and when considering the historical simulation VaR. As a matter of fact, we have already got the video that applies the logic of exponential moving averages (assigning a higher informational weight to more recent observations) to historical simulation VaR (it is also known as BRW VaR, check it out if you are interested: czcams.com/video/CAsgjA7KodQ/video.html). As for EMA for VCV VaR, here the trick is even easier: you can just use the same weighting factors as in BRW VaR to calculate the average return as well as the standard deviation of a portfolio, and then use the standard parametric VaR formula. Perhaps I can record a video on that around next week if that would be helpful?

  • @JorgeOporto
    @JorgeOporto Před rokem +1

    I saw your video of Value at Risk, and my doubt is, how do you make the VaR measure if you allow short sellings in your portfolio?

  • @What_ever2024
    @What_ever2024 Před 9 měsíci

    hey can you please show me how to calculate it using a rolling window analysis that moves 1 day at a time but mantains a 1 year length, im struggling to derive a covariance matrix for all the rolling window periods at the same time

  • @fascinationarts
    @fascinationarts Před 4 lety +2

    For long/short portfolio do you just take the returns of the stock you wanna go short * -1 or is it calculated in a different way?

    • @NEDLeducation
      @NEDLeducation  Před 4 lety +1

      In essence, that is correct. If you want to build a self-financing (zero-investment) long-minus-short portfolio, your return will be just the difference of your long and short portfolio returns. If you have a portfolio with arbitrary weights and you want to short some assets in it, they will just go into it with negative weights (longs go in with positive weights as usual). For example, if you have invested $100,000 of your equity and your weights are 120% in stock A and -20% in stock B that means you have short-sold $20,000 worth of stock B to fund purchasing $120,000 of stock A. Overall, sometimes it is easier to think of short-selling as your personal "leverage" in portfolio management. Hope it helps!

    • @fascinationarts
      @fascinationarts Před 4 lety

      @@NEDLeducation Thanks a lot!

  • @ck-gl7jd
    @ck-gl7jd Před 3 lety

    thank you for the video! it helped me a lot!!
    I have some more questions. I have calculated the VaR using historical simulation and variance-covariance method.
    Now I have to determine the mean relative bias, the root mean squared relative bias, annualized percentage volatility and fraction of outcomes covered. Do you have any idea how to calculate this?

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      Hi and glad you liked the video!
      As for your question, these techniques mainly revolve around comparing different VaR models and evaluating their forward-looking performance. I might make a video on it in the near future. Long story short, mean relative bias shows how much the particular VaR model under- or over-predicts exposures compared to other models, root mean squared relative bias shows how far on average it deviates from them, and fraction of outcomes covered can be used to compare parametric methods to historical methods or to test out-of-sample performance. As for annualised volatility, if you assume return independence, you can just multiply daily volatility by the square root of the number of trading days in a year (most commonly around 252). Under return dependence, volatility scaling is more complicated, you might want to check this video: czcams.com/video/_z-08wZUfBc/video.html
      Hope it helps!

  • @techlover555
    @techlover555 Před 3 lety +1

    Thanks for posting. I have a question. How do you calculate the annual historical VaR from the daily historical VaR? I know how to do it for the covariance-variance method by scaling the mean and std dev but the same cannot be done with the historical method. Also why can't you use the built in stddev function in excel instead of using the covariance matrix to find the portfolio stddev?

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      Hi and many thanks for the questions! To calculate annual historical VaR, you can either apply bootstrapping (random subsamples from a larger sample. however this would assume return independence), or retrieve a large dataset (5-10 years, for example), and calculate cumulative returns for overlapping consecutive 1-year periods, estimating HS VaR based on these. As for the stdev function for the portfolio, you are correct, you can just calculate portfolio returns by weighting the returns day-by-day, and then apply stdev directly. Hope it helps!

  • @way2worldoffinance436
    @way2worldoffinance436 Před 2 lety +1

    Suggest could have used Matrix Multiplication technique for calculating Covariance- Variance Matrix, creating Returns-Average Returns array and then MMULT(Excess Return Array), Transpose(Excess Return Array))/n-1. Simpler than using Index function! I think

    • @NEDLeducation
      @NEDLeducation  Před 2 lety

      Hi Vaidyanathan, and thanks for the question! I actually cover this very method in this video: czcams.com/video/8GNcF7yqKyQ/video.html

  • @nebesnistalker
    @nebesnistalker Před 2 lety +1

    Что-то на гениальном 😩

  • @way2worldoffinance436
    @way2worldoffinance436 Před 8 měsíci

    I feel its better to use lognormal returns than discreet returns because lognormal returns can be additive but not discreet returns

  • @alejadroigoyanes
    @alejadroigoyanes Před rokem

    could you do the montecarlo simulation method aswell?

  • @rmdfra
    @rmdfra Před 3 lety +1

    What would this work for a FX Forward contract? Would you take the returns for the interest rates as well?

    • @NEDLeducation
      @NEDLeducation  Před 3 lety +1

      Hi Rafael, and thanks for the question! VaR can be applied to foreign exchange as well, where returns can be calculated as daily changes in the exchange rate. Interest rates, if charged on the contract, can be accommodated daily as well using a total return index for a currency, with daily interest rate capitalised onto the exchange rate.

  • @user-zn7dt9bd4x
    @user-zn7dt9bd4x Před 5 měsíci

    Can I calculate the Portfolio VaR using your same method or how Can I find the portfolio VaR?

  • @figuredoutfitness8154
    @figuredoutfitness8154 Před 5 měsíci

    How to make t+1 day line in excel? Like the one which some software shows in simulation

  • @michaelcheung4524
    @michaelcheung4524 Před rokem +1

    did we already assume the normality assumption when you did this example? Will I be wrong if I use log return instead

    • @NEDLeducation
      @NEDLeducation  Před rokem +1

      Hi Michael, and thanks for the question! Normality is assumed as we use the normal distribution function in parametric (VCV) VaR. I have got a video that implements non-normal parametric VaR (czcams.com/video/icC5Z5FM_Sw/video.html). As for log-returns, you can use them as well, but apply the transformation only after you have constructed your portfolio (averaging over log-returns is incorrect when building a portfolio).

  • @Maftunaish
    @Maftunaish Před 3 lety +1

    Привет! Огромное спасибо за видео, очень информативно и ясно. Можно ли применить данные шаги рассчета VAR для рисков обменного курса, кредитных рисков и рисков ликвидности, т.е. банковских рисков? Если да, то какие переменные для ликвидности банков необходимо брать? Заранее благодарю!

    • @NEDLeducation
      @NEDLeducation  Před 3 lety +2

      Привет! Рад, что видео оказались полезными, и спасибо за вопрос! Для рисков обменного курса - конечно, просто вместо цен акций можно взять обменные курсы по отношению к некоторой базовой валюте, и тогда можно смоделировать риск валютного портфеля. С кредитным риском все чуть сложнее, потому что профили доходностей кредитных портфелей асимметричны слева (есть очень много способов получить от должника меньше денег, чем договаривались, но очень мало способов получить больше). Поэтому кредитный риск лучше считать с помощью каких-нибудь дискретных распределений типа Лапласа и Пуассона, либо асимметричных непрерывных распределений. Но исторический VaR на доходностях кредитных портфелей прогнать можно, хуже не будет. Моделирование риска ликвидности в зачаточном состоянии, пока что он все еще измеряется всякими тяжеловесными коэффициентами (LCR, NSFR), а не теоретически обоснованными моделями, поэтому скорее нет. Про функцию INDEX - аргументы в квадратных скобочках необязательны, и их можно не вписывать, все будет работать (например, если выделен только один столбец, номер столбца можно не указывать, хватит только номера строки). Надеюсь, удалось ответить на все вопросы :)

  • @alexhongnhungvu3564
    @alexhongnhungvu3564 Před 3 lety +1

    Thank you for your great tutorial. Could you please kindly explain why the function percentile.exc is used instead of percentile.inc? Thanks in advance!

    • @NEDLeducation
      @NEDLeducation  Před 3 lety +1

      Hi Alex, and many thanks for your feedback! Exclusive percentile is used instead of the inclusive percentile as returns are treated as continuous. Inclusive percentiles can be more useful when the sample size is meaningful (e.g., we want to find an observation with a particular integer rank). From a risk management perspective, losses calculated using exclusive percentiles are always larger, so it can also be treated as a more conservative approach. Hope it helps!

    • @alexhongnhungvu3564
      @alexhongnhungvu3564 Před 3 lety

      NEDL that’s a very helpful answer! Thanks a lot and stay safe!

  • @AG-ow3oe
    @AG-ow3oe Před 2 lety +1

    Hi and thank you for the content! Ran some VaR calculations and VCV VaR is much greater than HS VaR for all confidence intervals. What could explain this?

    • @NEDLeducation
      @NEDLeducation  Před 2 lety

      Hi Alex, and thanks for the question! This may imply that your returns have negative kurtosis, and therefore normal distribution tails are thicker than the historical distribution. This is quite unusual for financial data but possible.

    • @AG-ow3oe
      @AG-ow3oe Před 2 lety

      @@NEDLeducation Thank you for the response! Wanted to also ask you why you do not compute logarithmic returns instead? I noticed that there are very slight differences when doing so. Should I consider them negligible?

    • @AG-ow3oe
      @AG-ow3oe Před 2 lety

      Hi again! I caclulated Kurtosis but it isn't negative. So what would this imply for the distribution returns given that VCV VaR is much greater than HS VaR for all confidence intervals? I cannot seem to find an answer for this online. Thank you.

  • @vebe7109
    @vebe7109 Před rokem +1

    How to calculate VaR for cupon bond portfolio? Any suggestions?

    • @NEDLeducation
      @NEDLeducation  Před rokem

      Hi Vebe, and thanks for the question! Generally, VaR is estimated the same way for any assets that are continuously traded. So simply plug your bond prices and proceed with exactly the same steps.

  • @kelz5732
    @kelz5732 Před 4 lety

    Will using log return here be different to simple return?

    • @NEDLeducation
      @NEDLeducation  Před 4 lety +1

      Hi Kel, and thanks for the question! Yes, it will be different, yet in case of daily returns only marginally. For variance-covariance VaR you would also apply log-returns instead of holding period returns if you were to assume that the distribution is not normal but log-normal. But again, the differences in this case are negligible.

    • @monour7907
      @monour7907 Před 3 lety

      @@NEDLeducation is there any problem if i will use the LN return because our professorworks with the LN return to calculate the VaR ??

  • @mastertigr
    @mastertigr Před 3 lety +1

    Спасибо большое за ваши ролики и ваши труды, очень доходчиво все описано) Единственное я нигде не нашел информации про масштабирование исторического VaR на несколько дней. С вариационно-ковариационным я разобрался по вашим ответам в комментариях, а вот про исторический так и не понял, в нем видь не используется не среднее значение, не отклонение. Извините, кажется я тупенький

    • @NEDLeducation
      @NEDLeducation  Před 3 lety +1

      Привет, Илья, и рад что видео оказались полезными! Исторический VaR действительно масштабировать менее очевидно и чуть труднее. Самый простой и очевидный подход: рассчитать кумулятивные доходности по интервалу продолжительности, которая интересует (например, кумулятивные доходности по пятидневным периодам), и пятидневный VaR тогда будет считаться как соответствующий перцентиль этих кумулятивных доходностей.

    • @mastertigr
      @mastertigr Před 3 lety +1

      @@NEDLeducation спасибо большое за ответ, и за ваш прекрасный канал)

  • @khanjack4758
    @khanjack4758 Před 4 lety

    Hi I am confused by a basic question - when you are taking the average of return numbers which have negative returns - is it simply because you are adding them all and if the addition leads to a negative total - would up with a negative average otherwise it will be positive - hence the average of a return of -5% and say +6% would simply be +0.5%. Very basic question :)

    • @NEDLeducation
      @NEDLeducation  Před 4 lety

      Hi Khan and many thanks for your question! Yes, that is exactly the reason why the average has been negative in this example - it turned out to be that the portfolio has lost in value over the sample period :) Obviously, a more accurate representation would be the geometric mean, but the arithmetic mean (simple average) most of the time leads to decent approximations.
      If you are interested, please check out our channel and playlists for even more videos on VaR :)

  • @user-yx5vf8ep5m
    @user-yx5vf8ep5m Před 2 lety +1

    Thank you, but I have a question. How to measure VaR by semi-parametric methods. I want a practical example.

    • @NEDLeducation
      @NEDLeducation  Před 2 lety

      Hi, and thanks for the question! It depends on what methods you consider semi-parametric and which you are interested in. The simplest method among the ones I covered you could call semi-parametric is perhaps BRW-VaR: czcams.com/video/CAsgjA7KodQ/video.html. Hope this helps!

  • @Newgoldnuggets
    @Newgoldnuggets Před 2 měsíci

    in Covarienece matrix, why your diagnoal elements are not 1.

  • @monour7907
    @monour7907 Před 3 lety +1

    thanks , please i have question on how to lock a row with the keyboard ??

    • @NEDLeducation
      @NEDLeducation  Před 3 lety +1

      Hi Omar, and thanks for your question! Just put a dollar sign ($) in front of the row number, alternatively you can use F4. Hope it helps.

  • @archanap107
    @archanap107 Před 3 lety +1

    Wt if we do it for monthly data

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      Hi Archana, and thanks for the question! The model is applicable to monthly returns as well, it is just it is more common to apply it for daily frequency (banks are required to do so, for example). Hope it helps!

  • @LUICT15
    @LUICT15 Před 2 lety +1

    Does the final value mean you are 99% confident that you will not lose more than $27,370 in a single day or in a year or two years?

    • @NEDLeducation
      @NEDLeducation  Před 2 lety +1

      Hi, and thanks for the question! It is a daily VaR, so in one day.

  • @archanap107
    @archanap107 Před 3 lety

    How to lock rows?

    • @NEDLeducation
      @NEDLeducation  Před 3 lety

      Just put the "dollar sign" ($) in front of the row number. You can also use the F4 hotkey when having a formula selected.

  • @user-yx5vf8ep5m
    @user-yx5vf8ep5m Před 2 lety

    Please, I wanna the exel file.

  • @hotpost4067
    @hotpost4067 Před 4 lety

    нихуя не понял, но очень интересно

    • @hotpost4067
      @hotpost4067 Před 4 lety

      ставлю лайк на всякий случай

    • @NEDLeducation
      @NEDLeducation  Před 4 lety +2

      Добавили русские субтитры, чтобы было немного понятнее :) Спасибо за лайк!