How to simulate market maker credit?

Posted By: MegaTanker

How to simulate market maker credit? - 06/06/22 21:27

Let's say the exchange grants you 0.0005% of the trade volume as credit for every maker order that get's taken. Can Zorro simulate this? It's technically a negative commission but Zorro interprets negative values for the Commission variable as a percentage based commission, not a credit.
Posted By: AndrewAMD

Re: How to simulate market maker credit? - 06/06/22 21:32

Just use enterTrade.
Posted By: Petra

Re: How to simulate market maker credit? - 06/07/22 07:26

0.0005% is probably irrelevant for backtests. If you want still simulate it, add it to the Balance variable after entering the trade.
Posted By: MegaTanker

Re: How to simulate market maker credit? - 06/07/22 18:57

I realized you can set a negative Spread which will be added to the Balance instead of subtracted. Probably a little more intuitive than manually setting the Balance but similar.
Posted By: AndrewAMD

Re: How to simulate market maker credit? - 06/08/22 13:49

I actually wrote about this on my blog:
https://www.vitaltrades.com/2020/07/14/adding-exact-fee-and-credit-calculations-to-zorro/

So basically, you can set Commission to 0 for your trading asset, and then use a dummy asset to add complex commissions calculations in the form of standalone trades with profits/losses.
© 2024 lite-C Forums