Thanks again, those two lines did not exist in the version 18.104.22.168, which I was using. An update to 22.214.171.124 resolved the problem.
Posts made by Hippasus
RE: Taking into account of periodic payments
Thanks a lot for the detailed answer. I'm already using a customized version of the
CommissionInfoclass, specifically my own version of
_get_credit_interest(self, size, price, days, dt0, dt1)due to a credit interest which is variable over time. However it seems to me as the credit interest is directly deducted from the cash, as you mentioned, but does never show up in the PnL. Especially the commission is constantly 0, no matter how big the interest rate is.
For now I have resorted to calculations inside the
getoperationcostmethod, but it is messy and requires changes in parts of the code I would rather not mess with (such as the 'bbroker' class).
Taking into account of periodic payments
Is there any way which allows for periodic payments to be taken into account (such as dividends or coupons)?
If not, where would be the best part of the code to implement such an update? Commissions?
The payments should be considered when calculating the PnL of a specific trade.