## PnL Explain

This is a breakdown of the PnL of the referenced tradable between two given dates into various components, expressed as a sequence of key-value pairs as shown in the table PnLExplain Table

All quantities are expressed in terms of the seven variables

*S, H, I, C, F, Fᵣ, P*Web blog example here

The top pair corresponds to the PnL expressed in currency units as of the latest of the two dates, also referred as horizon date and represented by

*T*Below are the descriptions of the rows in that table, keeping the original order:

*PnL*Subtype of Job Request

The Profit and Loss (

**) is defined as the sum of realized and unrealized profit incurred between the given spot date and the given horizon date**

*PnL***specified in Horizon Date**

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

By default, the spot date equals the globally set trade date ( i.e. valuation date) that usually equals today's date.

But if the As Of entry to the function Price exists, the latter date is then regarded as the spot date.

It is represented by the time

**in the documentation context of Advanced Pricing**

*0*Precisely,

**represents an amount regarded as being received at the horizon date**

*PnL***and defined as:**

*T***, where**

*PnL = H + I - S/P***is the tradable's price at**

*H***as described in Horizon Price**

*T***is the actual income realized between the given spot date (denoted as**

*I***) and**

*0***as described in Income**

*T***is the tradable's price at**

*S***as described in Spot Price**

*0***is the discount factor for maturity**

*P***implied by the curve associated with the issuer supplied in Fund Crv Issuer as described in Funding DF**

*T*One may also define an equivalent PnL amount that is assumed to be payable at

**and be equal to the product**

*0*

*PnL*P*Note the quantity subtracted from

**is not**

*H***, but rather**

*S*

*S/P*This is the correct treatment for a P&L defined in an "economic" rather than "nominal" sense and satisfies the economic criterium that the P&L owes to be exactly 0 when the market volatility vanishes.

The alternative definition involving

**rather than**

*S***leads to a "nominal" P&L that fails to satisfy this criterium, but still reported under PnL Nominal**

*S/P*

*PnL Nominal*Subtype of Job Request

This is similar to the PnL, with the only difference being that the

**in the definition**

*S/P***is replaced by**

*PnL = H + I - S/P*

*S*So the definition of

**is:**

*PnL Nominal*

*PnL Nominal = H + I - S*Note, this definition is not "economically" correct, in the sense it leads to a non-zero result when the market volatility vanishes.

It is nevertheless important as it is generally used to determine margin requirements in daily P&L intervals.

Also note, the income part

**is not treated in the same sense like**

*I*

*S*Concretely, the added cash flow amounts are

**evaluated at the time they are paid.**

*not*They are first compounded forward to the horizon time and then are summed over to form the income

**, thus evaluated as of the horizon time.**

*I*In the context of daily P&L where the

**is mostly used, this is of no concern since the involved cash flows occur exactly at the horizon time.**

*PnL Nominal*

*PnL Gross*Subtype of Job Request

This simply equals the PnL after all exogenous cash flows, such as transaction fees, have been added to it.

Precisely,

**represents an amount regarded as being received at the horizon date**

*PnL Gross***and defined as:**

*T***, where**

*PnL Gross = PnL + E***is the (endogenous, i.e. without inclusion of fees) PnL as described in PnL**

*PnL***is the exogenous income due to transaction-linked cash flows, such as fees, realized between the given spot date (denoted as**

*E***) and**

*0***as described in Cash Flows from Fees**

*T*

*PnL due to Resets*Subtype of Job Request

This is the part of the

**described in PnL due exclusively to the impact of the actual resets between the given spot date (denoted as**

*PnL***) and the given horizon date**

*0***being different than what had been expected at**

*T*

*0*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

Specifically, it equals the hypothetical PnL that would have been produced under the assumption that all floating rate fixings before

**equaled the historical fixings in the supplied horizon market, while the fixings after**

*T***equaled the forward rates implied by today's curves, rather than the curves in the supplied horizon market.**

*T*It is calculated as the sum:

(Carry Surprise) + (Fwd Surp due to Resets)

where the two terms are described at Carry Surprise and Fwd Surp due to Resets

Plugging

**for the first term and**

*I - C***for the second, we get:**

*Fᵣ - F*I - C + Fᵣ - F

The remaining part of

**is given by PnL due to Curves**

*PnL*

*PnL due to Curves*Subtype of Job Request

This is the part of the

**described in PnL due exclusively to the impact of the actual curves observed at the given horizon date**

*PnL***being different than what had been expected at the given spot date (denoted as**

*T***).**

*0*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

Specifically, it equals the hypothetical PnL that would have been produced under the assumption that all floating rate fixings before

**equaled the forward rates implied by today's curves, while the fixings after**

*T***equaled the forward rates implied by the curves in the supplied horizon market.**

*T*It is calculated as the difference:

(PnL) - (PnL due to Resets)

where the two terms are described at PnL and PnL due to Resets

Plugging

**for the first term and**

*H + I - S/P***for the second, we get:**

*I - C + Fᵣ - F*H - S/P + C - Fᵣ + F

The remaining part of

**is given by PnL due to Resets**

*PnL*

*Carry Surprise*Subtype of Job Request

This is the part of the

**described in PnL due exclusively to the impact of the realized carry (i.e. income) until the given horizon date**

*PnL***being different than what had been expected at the given spot date (denoted as**

*T***).**

*0*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

It is calculated as the difference:

(Income) - (Carry)

where the two terms are described at Income and Carry

Plugging

**for the first term and**

*I***for the second, we get:**

*C*I - C

The remaining part of

**is given by Forward Surprise**

*PnL*

*Forward Surprise*Subtype of Job Request

This is the part of the

**described in PnL due exclusively to the impact of the realized forward value at the given horizon date**

*PnL***being different than what had been expected at the given spot date (denoted as**

*T***).**

*0*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

It is calculated as the difference:

(Horizon Price) - (Forward Price)

where the two terms are described at Horizon Price and Forward Price

Plugging

**for the first term and**

*H***for the second, we get:**

*F*H - F

The remaining part of

**is given by Carry Surprise**

*PnL*

*Fwd Surp due to Resets*Subtype of Job Request

This is the part of the Forward Surprise described in Forward Surprise due exclusively to the impact of the actual resets between the given spot date (denoted as

**) and the given horizon date**

*0***being different than what had been expected at**

*T*

*0*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

It is calculated as the difference:

(Forward (Resets)) - (Forward Price)

where the two terms are described at Forward (Resets) and Forward Price

Plugging

**for the first term and**

*Fᵣ***for the second, we get:**

*F*Fᵣ - F

The remaining part of Forward Surprise is given by Fwd Surp due to Curves

*Fwd Surp due to Curves*Subtype of Job Request

This is the part of the Forward Surprise described in Forward Surprise due exclusively to the impact of the actual curves observed at the given horizon date

**being different than what had been expected at the given spot date (denoted as**

*T***).**

*0*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

It is calculated as the difference:

(Horizon Price) - (Forward (Resets))

where the two terms are described at Horizon Price and Forward (Resets)

Plugging

**for the first term and**

*H***for the second, we get:**

*Fᵣ*H - Fᵣ

The remaining part of Forward Surprise is given by Fwd Surp due to Resets

*Consistency Check*Subtype of Job Request

This is a boolean that is

**if and only if the Fwd Surp due to Curves equals the PnL due to Curves**

*TRUE*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

In fact, these two values must be equal and the boolean here must be

*TRUE*The reason is the following:

As shown in the table PnLExplain Table, the following hold:

Fwd Surp due to Curves = H - Fᵣ

PnL due to Curves = H - S/P + C - Fᵣ + F

Therefore, these two values being equal is equivalent to:

S/P = C + F

which must hold as long as the spot price, carry and forward have been calculated correctly because:

S is the present value of all cash flows

C*P is the present value of those cash flows occurring at or before horizon

F*P is the present value of those cash flows occurring strictly after horizon

*Horizon Price*Subtype of Job Request

Τhe price

**of the referenced tradable at the given horizon date**

*H*

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

Precisely, this is the NPV (Net Present Value) of the referenced tradable at

**calculated using the market information available at**

*T*

*T*

*Spot Price (Hor)*Subtype of Job Request

The Spot Price after it has been compounded forward to the given horizon date

**by being divided with the Funding DF**

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

It equals

*S / P*where

**is the spot price and**

*S***is the discount factor from the given spot date (denoted as**

*P***) to**

*0***mentioned above.**

*T*

*Spot Price*Subtype of Job Request

Τhe spot price

**, which equals the NPV (Net Present Value) of the referenced tradable at the given spot date (denoted as**

*S***).**

*0*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

By default, the spot date equals the globally set trade date ( i.e. valuation date) that usually equals today's date.

But if the As Of entry to the function Price exists, the latter date is then regarded as the spot date.

It is represented by the time

**in the documentation context of Advanced Pricing**

*0*The NPV is calculated using the market information available at

*0*If the threshold date

**for assumed known fixings is specified in Fxd Resets Before, all floating rate fixings before**

*Tᵣ***are not implied by the provided curves but rather read from a supplied object of type Historical Values**

*Tᵣ*

*Income*Subtype of Job Request

The income

**received by holding the referenced tradable between the given spot date (denoted as**

*I***) and the given horizon date**

*0***specified in Horizon Date**

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

By default, the spot date equals the globally set trade date ( i.e. valuation date) that usually equals today's date.

But if the As Of entry to the function Price exists, the latter date is then regarded as the spot date.

It is represented by the time

**in the documentation context of Advanced Pricing**

*0*Precisely,

**represents an amount regarded as received at**

*I***and defined as the sum of the present values as of**

*T***of the tradable's cash flows**

*T***occurring between**

*CFᵢ***(excluded) and**

*0***(included).**

*T*Formally:

*I = Σ(CFᵢ(Pᵢ/P))*where:

**are all realized cash flows occurring at times**

*CFᵢ***such as**

*Tᵢ***, as implied by the market information available at**

*0 < Tᵢ <= T*

*T***are the respective funding discount factors, i.e. the discount factors seen at**

*Pᵢ***with maturities**

*0***, as implied by the curve associated with the issuer supplied in Fund Crv Issuer**

*Tᵢ***is the funding discount factor seen at**

*P***with maturity**

*0***, as implied by the curve associated with the issuer supplied in Fund Crv Issuer**

*T*This definition is very similar to that of Carry

The only difference is that the cash flows

**in the case here are NOT implied by the information available at**

*CFᵢ***, but represent the ACTUAL (i.e. realized) cash flows in the referred time interval.**

*0*It turns out, the calculation of

**requires the prior knowledge of all fixings that affect the cash flows occurring at or before**

*I*

*T*These must be provided to the function Price as an input object of type Historical Values entered in association with the key Horizon Market

*Cash Flows from Fees*Subtype of Job Request

The income

**received exclusively due to exogenously defined transaction fees that stem from trading the referenced tradable between the given spot date (denoted as**

*I***) and the given horizon date**

*0***specified in Horizon Date**

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

By default, the spot date equals the globally set trade date ( i.e. valuation date) that usually equals today's date.

But if the As Of entry to the function Price exists, the latter date is then regarded as the spot date.

It is represented by the time

**in the documentation context of Advanced Pricing**

*0*Precisely,

**represents an amount regarded as received at**

*I***and defined as the sum of the present values as of**

*T***of the transaction cash flows**

*T***occurring between**

*CFᵢ***(excluded) and**

*0***(included).**

*T*Formally:

*I = Σ(CFᵢ(Pᵢ/P))*where:

**are all realized transaction fees occurring at times**

*CFᵢ***such as**

*Tᵢ*

*0 < Tᵢ <= T***are the respective funding discount factors, i.e. the discount factors seen at**

*Pᵢ***with maturities**

*0***, as implied by the curve associated with the issuer supplied in Fund Crv Issuer**

*Tᵢ***is the funding discount factor seen at**

*P***with maturity**

*0***, as implied by the curve associated with the issuer supplied in Fund Crv Issuer**

*T*This definition is very similar to that of Income

The only difference is that the cash flows

**in the case here are NOT implied by the tradable's contractual specifications, but must be exogenously supplied through an object of type Ledger Entry that is carried by the tradble in association with its key Ledger Entry**

*CFᵢ*

*Forward Price*Subtype of Job Request

The forward price

**of the referenced tradable observed at the given spot date (denoted as**

*F***) wrt a maturity equal to the given horizon date**

*0***specified in Horizon Date**

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

By default, the spot date equals the globally set trade date ( i.e. valuation date) that usually equals today's date.

But if the As Of entry to the function Price exists, the latter date is then regarded as the spot date.

It is represented by the time

**in the documentation context of Advanced Pricing**

*0*Precisely,

**represents an amount payable at**

*F***and defined as the amount one agrees at**

*T***to pay at the maturity date**

*0***in order to acquire the tradable at**

*T*

*T*It turns out, it equals the sum of the present values as of

**of the tradable's cash flows**

*T***occurring after**

*CFᵢ*

*T*Formally:

*F = (1/P)Σ(CFᵢPᵢ)*where:

**are all forecasted cash flows occurring at times**

*CFᵢ***such as**

*Tᵢ***, as implied by the market information available at**

*Tᵢ > T*

*0***are the respective discount factors, i.e. the discount factors seen at**

*Pᵢ***with maturities**

*0*

*Tᵢ***is the funding discount factor seen at**

*P***with maturity**

*0***, as implied by the curve associated with the issuer supplied in Fund Crv Issuer**

*T*In words, all cash flows

**are discounted down to**

*CFᵢ***and then their sum**

*0***is compounded forward to**

*Σ(CFᵢPᵢ)***using the discount factor**

*T*

*P*One may also define an equivalent forward amount that is assumed to be payable at

**and be equal to the product**

*0*

*F*P = Σ(CFᵢPᵢ)*Apart from an exception mentioned below, all floating rates are assumed equal to their forecast forward values observed at

*0*The cash flows occurring on the horizon date are included only if Trade Date CFs is set to

*TRUE*If the threshold date

**for assumed known fixings is specified in Fxd Resets Before, all floating rate fixings before**

*Tᵣ***are not implied by the provided curves but rather read from a supplied object of type Historical Values**

*Tᵣ*

*Carry*Subtype of Job Request

The carry

**of the referenced tradable observed at the given spot date (denoted as**

*C***) wrt a maturity equal to the given horizon date**

*0***specified in Horizon Date**

*T*Web blog example here

It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

By default, the spot date equals the globally set trade date ( i.e. valuation date) that usually equals today's date.

But if the As Of entry to the function Price exists, the latter date is then regarded as the spot date.

It is represented by the time

**in the documentation context of Advanced Pricing**

*0*Precisely,

**represents an amount regarded as received at**

*C***and defined as the sum of the present values as of**

*T***of the tradable's cash flows**

*T***occurring between**

*CFᵢ***(excluded) and**

*0***(included).**

*T*Formally:

*C = (1/P)Σ(CFᵢPᵢ)*where:

**are all forecasted cash flows occurring at times**

*CFᵢ***such as**

*Tᵢ***, as implied by the market information available at**

*0 < Tᵢ <= T*

*0***are the respective discount factors, i.e. the discount factors seen at**

*Pᵢ***with maturities**

*0*

*Tᵢ***is the funding discount factor seen at**

*P***with maturity**

*0***, as implied by the curve associated with the issuer supplied in Fund Crv Issuer**

*T*In words, all cash flows

**are discounted down to**

*CFᵢ***and then their sum**

*0***is compounded forward to**

*Σ(CFᵢPᵢ)***using the discount factor**

*T*

*P*One may also define an equivalent carry amount that is assumed to be payable at

**and be equal to the product**

*0*

*C*P = Σ(CFᵢPᵢ)*Apart from an exception mentioned below, all floating rates are assumed equal to their forecast forward values observed at

*0*The cash flows occurring on the horizon date are included only if Trade Date CFs is set to

*TRUE*If the threshold date

**for assumed known fixings is specified in Fxd Resets Before, all floating rate fixings before**

*Tᵣ***are not implied by the provided curves but rather read from a supplied object of type Historical Values**

*Tᵣ*

*Forward (Resets)*Subtype of Job Request

The conditional-on-known-resets forward price

**, which is similar to the forward price**

*Fᵣ***described in Forward Price with the twist that all floating rate fixings before the given horizon date**

*F***are not implied by the provided curves but rather read from a supplied object of type Historical Values**

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

*Funding DF*Subtype of Job Request

This is the discount factor

**observed at the the given spot date (denoted as**

*P***) wrt the given horizon date**

*0***implied by the funding curve associated with the issuer supplied in Fund Crv Issuer**

*T*It is also part of the PnL Explain table PnLExplain Table that is produced in association with the key PnL Explain when a tradable is priced with the Advanced Pricing model input.

It is used to discount values at horizon down to today or compound forward values today to horizon.