Calculate your VaR the easy way!

Calculate your VaR the easy way!

The late Sir Dennis Weatherstone of J P Morgan requested that a firm-wide report on portfolio risk be known to the top management at 4:15 PM every working day, so that they had an inkling of an idea of what kind of market risk their portfolio carried. Although the gist of Value At Risk has been in existence even before , the idea as it is know today, is credited to J P Morgan.

If you are a trader , the metric will tell you what is your worst loss in your portfolio say tomorrow with a probability attached to that number. You could lose $100,000 in 1-day with a 99% confidence and so on.

VaR calculations can range from the very easy to very hard depending on the portfolio , the models used and the assumptions taken therein. However these days there are many ways to calculate VaR easily.

If you are a derivatives trader it is ideal that you have some idea of the risk your portfolio is assuming. I have created an easy way to help you calculate VaR if you know some basic python.

Assume your portfolio.csv looks like this:



Make sure you have named all your csv columns correctly as shown. Also make sure the values in various cells are strings or numbers as the case may be. Follow the lines in the image below.


Voila! That would create a VaR report for you.


So according to the above report for your simulated portfolio the 1-day VaR is approximately-375K and this is the worst you can lose with 99% confidence!




Gopi Krishna Suvanam

Entrepreneur | Author | AI & Decentralization proponent | Alumnus of IIT-M & IIM-A

2 个月

I love how you make quant finance sound simple :)

回复

要查看或添加评论,请登录

Raghuraman Ramachandran, CQF的更多文章

  • Caveat Emptor - A Sojourn into a statistical prevarication!

    Caveat Emptor - A Sojourn into a statistical prevarication!

    I came across a large advertisement post in a leading Indian regional newspaper from an educational app company that…

    2 条评论
  • In one's prime!

    In one's prime!

    God may not play dice with the universe, but something strange is going on with the prime numbers - Paul Erdos It is…

  • to err is human, to help divine..

    to err is human, to help divine..

    It is often the embarrassing moments in the past that make us laugh the most. Perhaps we develop a self-deprecating…

  • Silence is golden

    Silence is golden

    It was my 5th grade in school. I was living in a small town in southern India.

  • Open talk with a generative pre-trained transformer.

    Open talk with a generative pre-trained transformer.

    I had a conversation with the new talk of the town gizmo. Here goes: Me: There exists a distinct possibility that…

  • Ruy Lopez / Sicilian defense?!

    Ruy Lopez / Sicilian defense?!

    A tribute to the ongoing chess olympiad in Chennai, we must talk about openings! Not the usual chess openings but…

  • A random walk down stupidity and profiting

    A random walk down stupidity and profiting

    Today I am going to indulge you, in a story in two parts: The first part is an anecdotal article I read many years ago…

  • Value, Birbal & Happiness

    Value, Birbal & Happiness

    The idea of value is complicated. Here I refer to value not from an ethical point of view but that of a 'value' that…

    3 条评论
  • life, death and machines

    life, death and machines

    An innocuous WhatsApp puzzle set me out thinking about the problem on hand. I am sure many of the esteemed readers…

    4 条评论
  • Staying Alive

    Staying Alive

    The cuckoo bird chirped and woke him up. The reality was a bit less appealing than the dreams he was having for the…

    4 条评论

社区洞察

其他会员也浏览了