Finopswerk
scenario nonanticipative liquidity injections
Computes the complete optimal bounded capital-injection policy for one declared 2-stage information tree with four leaf scenarios A0, A1, B0, B1. Root injection x occurs before the observed stage-1 signal A/B and its cashflow d1; child injection yA/yB occurs after the signal but before the second cashflow d2. Cash must stay >= 0 on all leaves, with 0 <= x, yA, yB <= supplied caps. It minimizes the expected weighted injection cost c0*x + pA*cA*yA + pB*cB*yB.
POST https://finops.halowerk.com/v1/scenario-nonanticipative-liquidity-injectionsInputs
| Field | Type | Required | Description |
|---|---|---|---|
| initial_cash_n | integer | Yes | |
| stage1_cashflow_n | array | Yes | |
| stage2_cashflow_n | array | Yes | |
| injection_caps_n | array | Yes | |
| unit_cost_n | array | Yes | |
| money_denominator | integer | Yes | |
| cost_denominator | integer | Yes | |
| leaf_probability_n | array | Yes | |
| probability_denominator | integer | Yes | |
| report | See schema | Yes |
Show full input schema
{
"type": "object",
"properties": {
"initial_cash_n": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"stage1_cashflow_n": {
"type": "array",
"items": {
"type": "integer",
"minimum": -1000,
"maximum": 1000
},
"minItems": 2,
"maxItems": 2
},
"stage2_cashflow_n": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": -1000,
"maximum": 1000
},
"minItems": 2,
"maxItems": 2
},
"minItems": 2,
"maxItems": 2
},
"injection_caps_n": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"minItems": 3,
"maxItems": 3
},
"unit_cost_n": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"minItems": 3,
"maxItems": 3
},
"money_denominator": {
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"cost_denominator": {
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"leaf_probability_n": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"minItems": 4,
"maxItems": 4
},
"probability_denominator": {
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"report": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"policy_and_value": {
"type": "object",
"minProperties": 6,
"maxProperties": 6,
"propertyNames": {
"enum": [
"root",
"after_signal_A",
"after_signal_B",
"expected_cost",
"optimal_root_min",
"optimal_root_max"
]
},
"additionalProperties": {
"type": "object",
"properties": {
"n": {},
"d": {}
},
"required": [
"n",
"d"
],
"additionalProperties": false,
"oneOf": [
{
"properties": {
"n": {
"type": "string",
"pattern": "^(0|-[1-9][0-9]*|[1-9][0-9]*)$",
"maxLength": 64
},
"d": {
"type": "string",
"pattern": "^[1-9][0-9]*$",
"maxLength": 64
}
}
},
{
"properties": {
"n": {
"type": "null"
},
"d": {
"type": "null"
}
}
}
]
}
},
"optimal_vertices": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"n": {},
"d": {}
},
"required": [
"n",
"d"
],
"additionalProperties": false,
"oneOf": [
{
"properties": {
"n": {
"type": "string",
"pattern": "^(0|-[1-9][0-9]*|[1-9][0-9]*)$",
"maxLength": 64
},
"d": {
"type": "string",
"pattern": "^[1-9][0-9]*$",
"maxLength": 64
}
}
},
{
"properties": {
"n": {
"type": "null"
},
"d": {
"type": "null"
}
}
}
]
},
"minItems": 3,
"maxItems": 3
},
"minItems": 1,
"maxItems": 2
}
},
"required": [
"policy_and_value",
"optimal_vertices"
],
"additionalProperties": false
}
]
}
},
"required": [
"initial_cash_n",
"stage1_cashflow_n",
"stage2_cashflow_n",
"injection_caps_n",
"unit_cost_n",
"money_denominator",
"cost_denominator",
"leaf_probability_n",
"probability_denominator",
"report"
],
"additionalProperties": false
}Published input example
{
"initial_cash_n": 0,
"stage1_cashflow_n": [
-2,
1
],
"stage2_cashflow_n": [
[
-3,
2
],
[
-5,
1
]
],
"injection_caps_n": [
6,
6,
6
],
"unit_cost_n": [
1,
4,
4
],
"money_denominator": 1,
"cost_denominator": 1,
"leaf_probability_n": [
1,
1,
1,
1
],
"probability_denominator": 4,
"report": {
"policy_and_value": {
"root": {
"n": "5",
"d": "1"
},
"after_signal_A": {
"n": "0",
"d": "1"
},
"after_signal_B": {
"n": "0",
"d": "1"
},
"expected_cost": {
"n": "5",
"d": "1"
},
"optimal_root_min": {
"n": "5",
"d": "1"
},
"optimal_root_max": {
"n": "5",
"d": "1"
}
},
"optimal_vertices": [
[
{
"n": "5",
"d": "1"
},
{
"n": "0",
"d": "1"
},
{
"n": "0",
"d": "1"
}
]
]
}
}Result & documentation
Machine-readable documentation of this hub
Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.
More endpoints in this hub
- Finopswerk0.003 USDC
accumulating sick leave liability
POSThttps://finops.halowerk.com/v1/accumulating-sick-leave-liabilityMeasures one closing salary-only liability for non-vesting accumulating sick leave. For N identical employees with unused old carry C and next-year entitlement E (used first), the caller supplies three scenarios of future absence days a_j w
- Finopswerk0.003 USDC
acquisition goodwill nci bridge
POSThttps://finops.halowerk.com/v1/acquisition-goodwill-nci-bridgeReconstructs one acquisition-date business-combination goodwill/NCI bridge from caller-measured identified assets, assumed liabilities, cash and non-cash consideration and previously held interest. NCI mode 0 = proportionate identifiable ne
- Finopswerk0.003 USDC
adjusted coupon cashflow ledger
POSThttps://finops.halowerk.com/v1/adjusted-coupon-cashflow-ledgerFrom a civil start date, tenor, EOM, principal, rate and explicit calendars, derives unadjusted accrual anchors, Following/ModifiedFollowing/Preceding payment dates, ACT365F exact interest and the last principal redemption. Payment adjustme