Table of Contents

Class FxResetCashFlowsFunctions

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

QuantLib's free function setFxResetPricer, with a swap form.

[Experimental("NQL0001")]
public static class FxResetCashFlowsFunctions
Inheritance
FxResetCashFlowsFunctions
Inherited Members

Remarks

QuantLib sets the pricer on the cash flows a leg holds; nanoql's cash flows are immutable, so these return a new leg, or a copy of the swap holding it, as CouponPricerFunctions does for coupon pricers. Cash flows that aren't FX-reset coupons or exchanges are kept as they are.

Methods

SetFxResetPricer(ImmutableArray<CashFlow>, FxResetPricer?)

A copy of the leg with the FX-reset pricer set on each of its FX-reset cash flows.

public static ImmutableArray<CashFlow> SetFxResetPricer(ImmutableArray<CashFlow> leg, FxResetPricer? pricer)

Parameters

leg ImmutableArray<CashFlow>

The leg.

pricer FxResetPricer

The pricer, or null for none.

Returns

ImmutableArray<CashFlow>

The new leg; the given one is unchanged.

Exceptions

ArgumentException

The leg is default(ImmutableArray) or holds a null cash flow.

SetFxResetPricer<T>(T, int, FxResetPricer?)

A copy of a built swap, of its own type, with the FX-reset pricer set on the FX-reset cash flows of one of its legs: QuantLib's setFxResetPricer(swap->leg(j), pricer), which changes the cash flows the swap holds.

public static T SetFxResetPricer<T>(T swap, int leg, FxResetPricer? pricer) where T : Swap

Parameters

swap T

The swap.

leg int

The leg's index.

pricer FxResetPricer

The pricer, or null for none.

Returns

T

The copy, with the swap's other legs and terms; the given swap is unchanged.

Type Parameters

T

The swap's type.

Exceptions

ArgumentNullException

The swap is null.

ArgumentOutOfRangeException

The leg's index is negative.

ArgumentException

The swap has no leg at the index.