# How are Commodity Curves Built Up?

How are Commodity Curves built up?
That was a question that was recently raised to me and because I think it might be of general interest, I thought I will try to explain it here.

Commodity Curves are setup and then utilized for example when key figures are calculated using the Market Risk Analyzer. For that they are linked to an Evaluation Type.

But before discussing how they are used, let us check how they are setup in first place. For that we have to use transaction TANCCMASTER.

There you must define the DCS ID, MIC and Commodity Curve Type and can now create your own Curve.

Now you are presented with several pieces of information that you can enter.

Currency Unit and Unit of Measure is prefilled based on the Quotation Currency and Quotation Unit of Measure of the DCS. Expiration Date Logic and Derivative Category is also determined based on the DCS. The Commodity Curve Rate Type can be maintained but is more of a visual thing without a direct impact. But it makes especially sense in case you plan to use curves for bid, mid and ask.

The Price Type defines which prices are considered to build up the curve.

Now to the interesting part. Inter- and Extrapolation.

With Interpolation you can define how the curve should behave between two prices that have been found. For example:

Gold October Price is currently at 1951.6 USD/OZ (Maturity Keydate is at 27th October 2023)
Gold November Price is currently at 1961.8 USD/OZ (Maturity Keydate is at 28th November 2023)

What would now be the expected price that the curve should return for 1st November?
This is where prices are interpolated.

• Constant Forward Interpolation means that the price from 27th October is valid until the next maintained price is found (in this case until 28th November). So, for 1st November it would be 1951.6 USD/OZ
• Constant Backward Interpolation means that the next maintained price will be valid for the timeframe between the two found prices. So, in our case from 28th October until 28th November the price of the 28th November will be used. So, for 1st November it would be 1961.8 USD/OZ
• Linear Interpolation means that the system will calculate the number of days between the available prices (so between 27th October and 28th November which would be 32 days) and for each day add a part of the differential of the two prices so that it will reach the target price on 28th November (meaning calculation would be 1961.8 USD/OZ – 1951.6 USD/OZ which is 10.2 USD/OZ. This divided by 32 equals 0.31875 USD/OZ and now for each day the price of the day before is increased by 0.31875 USD/OZ). So, for 1st November it would be 1953.19375 USD/OZ
• Cubic Spline Interpolation is a bit more complex, so please excuse that I do not outline the math behind it here but instead point you towards Wikipedia: https://en.wikipedia.org/wiki/Spline_interpolation. For our example the price for 1st November would be 1952.059137 USD/OZ
• Monotone Convex Interpolation is also a complex interpolation method. However, this Interpolation logic is not supported for DCS based curves.

Extrapolation allows you to define how prices are determined at the end of your curve. Meaning for our example before 27th October or after 28th November

• Constant Value means that the system should consider the first/last known price. So, for 25th October it would be 1951.6 USD and for 1st December it would be 1961.8 USD/OZ
• Linear Extrapolation means that it will use the interpolated differential to determine future prices. In that case the interpolated differential between 27th October and 28th November is 0.31875 USD/OZ (as described for linear interpolation) and this is now added for each day after 28th So, for 1st December the price would be 1962.75625 USD/OZ

Read Procedure defines how prices are fetched from the market price table to build up the curve. For example: We maintained the above prices on 4th September and try to build up a curve for 7th September. Now based on the Read Procedure the prices from 4th September will be found or not.

• In case Read Back is maintained whether the prices are found is depending on the Max. Days Read Back. Because the number of days that a read back will happen is determined with that indication. This might also lead to the usage of different price dates. So e.g., if we have another price maintained for the November Future with price date 5th September, then the curve would consider this price for the November Future and the price of the 4th September for the October Future.
• Read Directly means, that only available prices for the date should be considered. So, with all the prices maintained for 4th September a curve could only be constructed for 4th
• Read Back Directly works similar to Read Back, but makes sure that all the used prices are from the same Price Date

The last setting you can do for your commodity curve is to define whether a Spot Price should be considered or not. If you choose that a Spot Price should be considered it will be used as a starting point for building up your curve. Meaning if we construct a curve for 4th September with prices as maintained above the Spot Price will be used for the 4th September itself and Interpolation would take place between 4th September and 27th October (as we did not maintain any price for the September Future).

All this considered and maintaining a curve like the following:

Now if we look at the constructed curve (Tab Curves, navigating into the details for 4th September) we can first see which prices are available along the Spot Price (if setup to be used):

From there we can now take a look at the Graphical Display:

And even at the individual inter- and extrapolated prices (click the Chart <-> Table Button):

Hope you were able to gather an understanding of how Commodity Curves work. Let me know in case you are missing some information or have further questions.