Apply Maximum Drawdown Daily Report for Fund Holding

Jonathan Legrand
LSEG Developer Community
2 min readOct 4, 2023

--

Read Raksina’s full article on the Developer Portal.

Maximum Drawdown (MDD) is a downside risk indicator; the smaller the MDD the more indication that up movements could be volatile. With that said, MDD measures most significant losses, and not he frequency of losses or the magnitude of gains:

Where, P is the Peak (the highest price) of the period & L is the lowest price of the period.

In this article, we retrieve pricing data of funds from Datastream’s Python library and calculate MDDs.

In this article, we’re going to calculate the MDD with the daily prices of funds. To make it easier to explain, let’s look at this period of the sample fund above. During this period, the 1st peak of this fund is 14.63 AUD, and it decreases to 13.60 AUD, which is the 1st lowest price of the period, then it increases to 14.71 AUD and 14.93 AUD, which are 2nd peak and 5th peak of the period respectively. However, as MDD is the most negative cumulative return over a given time period, the prices to be calculated are the 1st peak and 1st lowest price, not the 5th peak, which is the maximum price during this period (you may see the image above to see the MDD line that shows the most negative cumulative return).

The MDD calculation of this fund is

Which is around -7.04 (rounded from -7.04032809296)

Now that we know how to calculate the MDD, don’t hesitate to read the full article to calculate MDDs of funds! In this article we go though:

  • Calculate Maximum Drawdown with Python
  • Retrieve and calculate the data using DataStream
  • Step 1) Below is the stuff required to get started with DataStream
  • Step 2) Searching for the instrument that you’re looking for
  • Step 3) Let’s do the coding part
  • What can you do with MDDs?
  • Conclusion
  • Reference

--

--