Back

Custom fee difficulty

Hi all, thanks in advance for your help.

I'm trying to set a custom fee, but having difficulties applying it

I've got two stocks in a list 'symbols', and I've tried sticking the lines below in the def initialize function of my main class but without luck.  Ideally I want to set a single global transaction fee for all transactions. Help much appreciated! 

self.symbols[0].FeeModel = ConstantFeeTransactionModel(1.0)
self.symbols[1].FeeModel = ConstantFeeTransactionModel(1.0)
Update Backtest








check the line 48 in this sample algo

https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/CustomModelsAlgorithm.py

you could always return a fix number in line 101

but maybe this post ansers your question better.....

https://www.quantconnect.com/forum/discussion/3040/fees-on-limit-orders-on-gdax

0

Update Backtest





0

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.


Loading...

This discussion is closed