Hello, I am experimenting with the wheel strategy and with some stocks I have the problem that the equity does not arrive in the portfolio during the automatic assignment. 

This then leads to the situation that no calls but further puts are sold and at some point the whole backtast delivers strange results. 

On January 13, a put was sold 220121P00019000 which was assigned on 22.

AAL 220121P00019000 - 53 Filled Automatic Assignment

AAL, however, was then not in the portfolio on January 24, so puts continued to be sold.

Currently I am at a loss, sometimes the assignment goes sometimes not. 

Kai
Here are some Log Outputs

2022-01-13 10:47:00 TradePutOption AAL: 0 @ 0 [] 101449.0
2022-01-13 10:47:00 OnOrderEvent AAL: 0 @ 0 Time: 01/13/2022 15:47:00 OrderID: 4 EventID: 2 Symbol: AAL   220114P00018000 Status: Filled Quantity: 55 FillQuantity: 55 FillPrice: 0.04 USD LimitPrice: 0.04 OrderFee: 13.75 USD IsAssignment: False
2022-01-13 10:47:00 OnOrderEvent AAL: 0 @ 0 Time: 01/13/2022 15:47:00 OrderID: 5 EventID: 1 Symbol: AAL   220121P00019000 Status: Submitted Quantity: -53 IsAssignment: False
2022-01-13 10:47:00 OnOrderEvent AAL: 0 @ 0 Time: 01/13/2022 15:47:00 OrderID: 5 EventID: 2 Symbol: AAL   220121P00019000 Status: Filled Quantity: -53 FillQuantity: -53 FillPrice: 0.43 USD OrderFee: 13.25 USD IsAssignment: False
2022-01-13 10:47:00 OnOrderEvent AAL: 0 @ 0 Time: 01/13/2022 15:47:00 OrderID: 6 EventID: 1 Symbol: AAL   220121P00019000 Status: Submitted Quantity: 53 LimitPrice: 0.09 IsAssignment: False

2022-01-22 00:00:00 OnAssignmentOrderEvent AAL: 0 @ 0 Time: 01/22/2022 05:00:00 OrderID: 7 EventID: 1 Symbol: AAL   220121P00019000 Status: Filled Quantity: 53 FillQuantity: 53 FillPrice: 0  Message: Automatic Assignment IsAssignment: True
2022-01-22 00:00:00 TradePutOption AAL: 0 @ 0 [] 103714.75
2022-01-22 00:00:00 OnOrderEvent AAL: 0 @ 0 Time: 01/22/2022 05:00:00 OrderID: 7 EventID: 1 Symbol: AAL   220121P00019000 Status: Filled Quantity: 53 FillQuantity: 53 FillPrice: 0  Message: Automatic Assignment IsAssignment: True
2022-01-22 00:00:00 OnOrderEvent AAL: 0 @ 0 Time: 01/22/2022 05:00:00 OrderID: 6 EventID: 2 Symbol: AAL   220121P00019000 Status: CancelPending Quantity: 53 LimitPrice: 0.09 IsAssignment: False
2022-01-22 00:00:00 OnOrderEvent AAL: 0 @ 0 Time: 01/22/2022 05:00:00 OrderID: 6 EventID: 3 Symbol: AAL   220121P00019000 Status: Canceled Quantity: 53 LimitPrice: 0.09 IsAssignment: False


2022-01-24 09:31:00 OnOrderEvent AAL: 0 @ 0 Time: 01/24/2022 14:31:00 OrderID: 8 EventID: 1 Symbol: AAL   220128P00015500 Status: Submitted Quantity: -66 IsAssignment: False
2022-01-24 09:31:00 OnOrderEvent AAL: 0 @ 0 Time: 01/24/2022 14:31:00 OrderID: 8 EventID: 2 Symbol: AAL   220128P00015500 Status: Filled Quantity: -66 FillQuantity: -66 FillPrice: 0.37 USD OrderFee: 16.5 USD IsAssignment: False
2022-01-24 09:31:00 OnOrderEvent AAL: 0 @ 0 Time: 01/24/2022 14:31:00 OrderID: 9 EventID: 1 Symbol: AAL   220128P00015500 Status: Submitted Quantity: 66 LimitPrice: 0.07 IsAssignment: False