{"ref":{"kind":"component","id":"acquisition_cash_sweep","key":"sha256:387931187d4951fcbb94c091b09b84ca2543e9ae55244407a768ce41f71696b3"},"label":"Acquisition Cash Sweep","description":"Trap and release lender-controlled cash against explicit credit tests.","inputs":[{"label":"Debt Yield","name":"debt_yield","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"%"}},{"label":"Debt Yield Trigger","name":"debt_yield_trigger","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"DSCR","name":"dscr","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"x"}},{"label":"DSCR Trigger","name":"dscr_trigger","valueType":{"axes":[],"dtype":"f64","unit":"x"}},{"label":"Enabled","name":"enabled","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Operating Cash Flow","name":"operating_cash_flow","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Refinance Payoff","name":"refinance_payoff","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Release Months","name":"release_months","valueType":{"axes":[],"dtype":"f64","unit":"months"}},{"label":"Sale Month","name":"sale_month","valueType":{"axes":[],"dtype":"f64","unit":"mo"}},{"label":"Senior Service","name":"senior_service","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Start Month","name":"start_month","valueType":{"axes":[],"dtype":"f64","unit":"mo"}},{"label":"Terminal Payoff","name":"terminal_payoff","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}}],"outputs":[{"label":"Active","name":"active","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"flag"}},{"label":"Allocation Error","name":"allocation_error","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Beginning","name":"beginning","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Cash Flow","name":"cash_flow","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Ending","name":"ending","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Pre Sweep Cash Flow","name":"pre_sweep_cash_flow","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Release","name":"release","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}},{"label":"Sweep","name":"sweep","valueType":{"axes":[{"extent":121,"name":"month","variable":false}],"dtype":"f64","unit":"$"}}],"dependencies":[{"id":"cash_sweep_period","key":"sha256:50205797357610682b9bf5417f96b2fe21c6af0d3d970cdea0f15fcc88d10a54","kind":"component"}],"libraries":["acquisition_debt"],"notes":{},"calculation":{"nodes":[{"id":"input-debt_yield","label":"Debt Yield","kind":"input"},{"id":"input-debt_yield_trigger","label":"Debt Yield Trigger","kind":"input"},{"id":"input-dscr","label":"DSCR","kind":"input"},{"id":"input-dscr_trigger","label":"DSCR Trigger","kind":"input"},{"id":"input-enabled","label":"Enabled","kind":"input"},{"id":"input-operating_cash_flow","label":"Operating Cash Flow","kind":"input"},{"id":"input-refinance_payoff","label":"Refinance Payoff","kind":"input"},{"id":"input-release_months","label":"Release Months","kind":"input"},{"id":"input-sale_month","label":"Sale Month","kind":"input"},{"id":"input-senior_service","label":"Senior Service","kind":"input"},{"id":"input-start_month","label":"Start Month","kind":"input"},{"id":"input-terminal_payoff","label":"Terminal Payoff","kind":"input"},{"id":"step-pre_sweep","label":"Pre sweep","kind":"step","rule":"((Operating Cash Flow − Senior Service) × ((Positions in series(Operating Cash Flow) ≥ 0) × (Positions in series(Operating Cash Flow) < (Sale Month + 1))))","sources":[{"node":"input-operating_cash_flow"},{"node":"input-senior_service"},{"node":"input-sale_month"}],"calls":[{"function":"debt_add_duration","label":"Debt add duration","bindings":[{"name":"duration","label":"Duration","value":"1"},{"name":"month","label":"Month","value":"Sale Month"}],"rule":"(Sale Month + 1)"}]},{"id":"step-indices","label":"Indices","kind":"step","rule":"Positions in series(Pre sweep)","sources":[{"node":"step-pre_sweep"}]},{"id":"output-pre_sweep_cash_flow","kind":"output","label":"Pre Sweep Cash Flow","rule":"Pre sweep","sources":[{"node":"step-pre_sweep"}]},{"id":"step-periods","label":"Periods","kind":"step","rule":"Run Acquisition Cash Sweep Period for each month. Carry the closing state into the next period.","sources":[{"node":"input-debt_yield_trigger"},{"node":"input-debt_yield"},{"node":"input-dscr_trigger"},{"node":"input-dscr"},{"node":"step-indices"},{"node":"input-start_month"},{"node":"step-pre_sweep"},{"node":"input-enabled"},{"node":"input-refinance_payoff"},{"node":"input-terminal_payoff"},{"node":"input-release_months"}],"calls":[{"function":"debt_duration_to_number","label":"Debt duration to number","bindings":[{"name":"duration","label":"Duration","value":"Release Months"}],"rule":"Release Months"},{"component":"cash_sweep_period","label":"Acquisition Cash Sweep Period","purpose":"Trap or release cash for one lender-controlled sweep period.","bindings":[{"name":"breaches","label":"Breaches","value":"(Higher of if (Debt Yield Trigger > 0), then (Debt Yield < Debt Yield Trigger), otherwise 0 and if (DSCR Trigger > 0), then (DSCR < DSCR Trigger), otherwise 0 × (Indices ≥ Start Month))"},{"name":"cash_flow","label":"Cash Flow","value":"Pre sweep"},{"name":"enabled","label":"Enabled","value":"Enabled"},{"name":"passes","label":"Passes","value":"(if (Debt Yield Trigger ≤ 0), then 1, otherwise (Debt Yield ≥ Debt Yield Trigger) × if (DSCR Trigger ≤ 0), then 1, otherwise (DSCR ≥ DSCR Trigger))"},{"name":"payoff","label":"Payoff","value":"(Absolute value((Refinance Payoff + Terminal Payoff)) > 1e-09)"},{"name":"release_months","label":"Release Months","value":"Release Months"}],"carry":[{"input":"was_active","output":"active","label":"Was Active","initial":"0"},{"input":"prior_cure_months","output":"cure_months","label":"Prior Cure Months","initial":"0"},{"input":"opening","output":"ending","label":"Opening","initial":"0"}]}]},{"id":"output-active","kind":"output","label":"Active","rule":"Periods · Active","sources":[{"node":"step-periods","field":"active","fieldLabel":"Active","url":"/catalog/components/cash_sweep_period/#output-active"}]},{"id":"output-beginning","kind":"output","label":"Beginning","rule":"Periods · Beginning","sources":[{"node":"step-periods","field":"beginning","fieldLabel":"Beginning","url":"/catalog/components/cash_sweep_period/#output-beginning"}]},{"id":"output-cash_flow","kind":"output","label":"Cash Flow","rule":"Periods · Cash Flow","sources":[{"node":"step-periods","field":"cash_flow","fieldLabel":"Cash Flow","url":"/catalog/components/cash_sweep_period/#output-cash_flow"}]},{"id":"output-ending","kind":"output","label":"Ending","rule":"Periods · Ending","sources":[{"node":"step-periods","field":"ending","fieldLabel":"Ending","url":"/catalog/components/cash_sweep_period/#output-ending"}]},{"id":"output-release","kind":"output","label":"Release","rule":"Periods · Release","sources":[{"node":"step-periods","field":"release","fieldLabel":"Release","url":"/catalog/components/cash_sweep_period/#output-release"}]},{"id":"output-sweep","kind":"output","label":"Sweep","rule":"Periods · Sweep","sources":[{"node":"step-periods","field":"sweep","fieldLabel":"Sweep","url":"/catalog/components/cash_sweep_period/#output-sweep"}]},{"id":"output-allocation_error","kind":"output","label":"Allocation Error","rule":"(((Periods · Beginning − Periods · Release) + Periods · Sweep) − Periods · Ending)","sources":[{"node":"step-periods","field":"beginning","fieldLabel":"Beginning","url":"/catalog/components/cash_sweep_period/#output-beginning"},{"node":"step-periods","field":"release","fieldLabel":"Release","url":"/catalog/components/cash_sweep_period/#output-release"},{"node":"step-periods","field":"sweep","fieldLabel":"Sweep","url":"/catalog/components/cash_sweep_period/#output-sweep"},{"node":"step-periods","field":"ending","fieldLabel":"Ending","url":"/catalog/components/cash_sweep_period/#output-ending"}]}],"topics":[{"label":"Acquisition Cash Sweep Period","results":["output-active","output-beginning","output-cash_flow","output-ending","output-release","output-sweep"]},{"label":"Acquisition Cash Sweep","results":["output-allocation_error","output-pre_sweep_cash_flow"]}]},"usedBy":[{"kind":"recipe","id":"hotel","key":"sha256:bf0956eceaed37e652044e718371c50f6d742ef9dc4b93edf968a748eda841c3"},{"kind":"recipe","id":"multifamily","key":"sha256:397eeb7b5a8b1a4584c66bc4c75f1a85494dbe812871f2e39c9192beb8a51f18"}]}
