I am trying to get zero transaction fees for every security.
The Reality Modelling Documentation says that fees must be set on a security by security basis, but surely there's a way to just say every trade has no fees (or $1, $10, whatever)?
QUANTCONNECT COMMUNITY
I am trying to get zero transaction fees for every security.
The Reality Modelling Documentation says that fees must be set on a security by security basis, but surely there's a way to just say every trade has no fees (or $1, $10, whatever)?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Varad Kabade
Hi Big mak,
We can add a constant/zero transaction fee to all securities in the universe using SetSecurityInitializer which is called in Initialize read more.
Alternatively, we can set the fee model for Securities in OnSecuritiesChanged() event handler. Refer to the following code snippet for reference.
Best,
Varad Kabade
Big mak
Varad,
The first implementation didn't work as expected, but the second one did. The second implementation (using changes) set the fees for all stocks after my fine filter. I found looping through solely my desired stocks and setting the fees that way yields a slight ~5% performance improvement, since I do a lot of operations after fine filtering.
Big mak
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!