From 173229fc3a28a649144cf4a9f0e084fa041b3089 Mon Sep 17 00:00:00 2001 From: Alexandre Catarino Date: Mon, 12 Feb 2024 23:50:24 +0000 Subject: [PATCH] Adds GetUnsettledCash to Settlement Model See https://github.com/QuantConnect/Lean/pull/7727 --- .../01 Key Concepts/04 Model Structure.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/03 Writing Algorithms/24 Reality Modeling/07 Settlement/01 Key Concepts/04 Model Structure.html b/03 Writing Algorithms/24 Reality Modeling/07 Settlement/01 Key Concepts/04 Model Structure.html index ac3053c7e0..6e3ef1c06b 100644 --- a/03 Writing Algorithms/24 Reality Modeling/07 Settlement/01 Key Concepts/04 Model Structure.html +++ b/03 Writing Algorithms/24 Reality Modeling/07 Settlement/01 Key Concepts/04 Model Structure.html @@ -34,6 +34,11 @@ public void Scan(ScanSettlementModelParameters settlementParameters) { } + + public CashAmount GetUnsettledCash() + { + return default; + } }
# In the Initialize method, set the custom settlement model
 security.SetSettlementModel(MySettlementModel())
@@ -46,10 +51,13 @@
         applyFundsParameters.Portfolio.CashBook[currency].AddAmount(amount)
 
     def Scan(self, settlementParameters: ScanSettlementModelParameters) -> None:
-        pass
+ pass + + def GetUnsettledCash(self) -> CashAmount: + return None -

For a full example algorithm, see this backtestthis backtest.

+

For a full example algorithm, see this backtestthis backtest.

ApplyFundsSettlementModelParameters objects have the following properties: