nx_fin_assets.nx
buildroot/runtime/nx_fin_assets.nx
about
nx_fin_assets.nx -- multi-asset FORWARD pricing, closing the loop on the operator's original ask ("trade
anything: commodities, stocks, forex..."). FUTURES/commodities forward via cost-of-carry F = S*e^((r+carry)T)
(carry = storage - convenience yield); FX forward via covered interest parity F = S*e^((r_dom-r_for)T); plus
basis and contango/backwardation. Composes the verified exp_fp from nx_fin_bs (integer fixed-point, scale 1e6).
So equities (backtest), options (Black-Scholes), futures/commodities and forex are now all modeled sovereignly
and integer-exact. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_fin_bs.nx
imported by: nx_fin_assets_gate.nx
structs
| none |
consts
| none |
functions
| 11 | func af_futures_fwd(spot: i64, r: i64, carry: i64, T: i64) -> i64 |
| 17 | func af_fx_fwd(spot: i64, r_dom: i64, r_for: i64, T: i64) -> i64 |
| 23 | func af_basis(fwd: i64, spot: i64) -> i64 { return fwd - spot } called by 1: main |
| 26 | func af_contango(fwd: i64, spot: i64) -> i64 { if fwd > spot { return 1 } return 0 } called by 1: main |