Logo

SQL Server ED_FUT_CONV_ADJ_HL Function

Updated 2023-10-13 13:08:07.913000

Description

Use the scalar function ED_FUR_CONV_ADJ_HL to convert a Eurodollars futures price into a forward rate using the Ho Lee convexity adjustment formula.

Syntax

SELECT [westclintech].[wct].[ED_FUT_CONV_ADJ_HL](
  <@Price, float,>
 ,<@Vol, float,>
 ,<@T1, float,>
 ,<@T2, float,>)

Arguments

@Price

the price of the Eurodollars futures contract. @Price is an expression of type float or of a type that can be implicitly converted to float.

@Vol

the volatility associated with Eurodollars futures contract. @Vol is an expression of type float or of a type that can be implicitly converted to float.

@T1

the amount of time, in years, until the delivery of the futures contract. @T1 is an expression of type float or of a type that can be implicitly converted to float.

@T2

the amount of time, in years, until the Maturity of the underlying Eurodollar deposit. @T2 is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

@Vol must be >= 0.

If @T2 is NULL , then @T2 = @T1 + 0.25.

Examples

In this example we calculate the convexity adjusted forward rates associated with the Eurodollar futures strip as of 2013-03-25.

SELECT dc,
       wct.ED_FUT2DATE(dc, '2013-03-25') AS Delivery,
       (100 - p) / 100 as [Forward Rate],
       wct.ED_FUT_CONV_ADJ_HL(   p,                                    --@Price
                                 v,                                    --@Vol
                                 wct.ED_FUTYF(dc, '2013-03-25', NULL), --@T1
                                 NULL                                  --@T2
                             ) as [Adjusted Forward Rate]
FROM
(
    SELECT 'M3',
           99.675,
           .0008
    UNION ALL
    SELECT 'U3',
           99.640,
           .0010
    UNION ALL
    SELECT 'Z3',
           99.610,
           .0013
    UNION ALL
    SELECT 'H4',
           99.580,
           .0017
    UNION ALL
    SELECT 'M4',
           99.550,
           .0021
    UNION ALL
    SELECT 'U4',
           99.435,
           .0023
    UNION ALL
    SELECT 'Z4',
           99.65,
           .0027
) n(dc, p, v);

This produces the following result.

dcDeliveryForward RateAdjusted Forward Rate
M32013-06-190.003250.003294
U32013-09-180.00360.003648
Z32013-12-180.00390.003952
H42014-03-190.00420.004254
M42014-06-180.00450.004556
U42014-09-170.005650.005717
Z42014-12-170.00350.003534