ExitPolicy
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExitPolicy(
cfg):ExitPolicy
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cfg |
ExitPolicyConfig |
Returns
Section titled “Returns”ExitPolicy
Properties
Section titled “Properties”
readonlycfg:ExitPolicyConfig
Methods
Section titled “Methods”record()
Section titled “record()”record(
usdmOut,at?):void
A NIGHT → USDM fill settled: count it against today's budget.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
usdmOut |
bigint |
at? |
number |
Returns
Section titled “Returns”void
evaluate()
Section titled “evaluate()”evaluate(
inv,mid,at?):PolicyState
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
inv |
{ night: bigint; usdm: bigint; } |
inv.night |
bigint |
inv.usdm |
bigint |
mid |
Mid |
at? |
number |
Returns
Section titled “Returns”discountBps()
Section titled “discountBps()”discountBps(
night,usdmOut,st):number|null
Discount for selling night now, or null (closed, beyond the ladder's depth, or
the payout would exceed today's budget). usdmOut is the payout at mid.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
night |
bigint |
usdmOut |
bigint |
st |
PolicyState |
Returns
Section titled “Returns”number | null
publication()
Section titled “publication()”publication(
st):Record<string,unknown>
What policy.publish sends: the terms, the live bands, the hedge recommendation.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
st |
PolicyState |
Returns
Section titled “Returns”Record<string, unknown>