-
Hi, I intend to work with crypto staking were one provides some coins and in return is rewarded some interest on the provided coins. In the case of https://www.binance.com/en/earn/simple-earn they pay out interest daily to your spot account. For the backtest this would just be a regular trade, but an interest is payed out daily to my cash balance as long as i hold some amount of this asset (position). What are your thoughts on implementing this kind of interest payout. Can this be implemented by the user at this point or would that require changes? If so - where would I start? Any comment would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @SW4T400, There is a SlippageModel but I don't think that will apply here. This would require changes on your end. What you could do is add the earned interest to the cash field in the Portfolio: The ExecContext has a "private" reference to the Portfolio (_portfolio). |
Beta Was this translation helpful? Give feedback.
Hi @SW4T400,
There is a SlippageModel but I don't think that will apply here.
This would require changes on your end. What you could do is add the earned interest to the cash field in the Portfolio:
https://www.pybroker.com/en/latest/reference/pybroker.portfolio.html#pybroker.portfolio.Portfolio.cash
The ExecContext has a "private" reference to the Portfolio (_portfolio).