Hi, 

first of all I'm new to quantconnect, thus I apologize for my possible dumb questions. I switched from quantopian a few days ago primarily because they don't offer live trading. Currently I'm trying to implement my ideas but I'm kind of confused about the fee/slippage modelling with LEAN.

Long story short, I've created a strategy which has a pretty heavy turnover, thus I'm using Alpaca as brogerage model (otherwise the fees would eat up most of the profits). Nevertheless the backtest results seem way too good to be true. I'm currently modelling the fee/slippage like so:

class CustomSlippageModel: def __init__(self, algorithm): self.algorithm = algorithm def GetSlippageApproximation(self, asset, order): slippage = asset.Price * d.Decimal(0.0001 * np.log10(2*float(order.AbsoluteQuantity))) return slippage class MyAlgo(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 1, 1) self.SetEndDate(2020, 4, 1) self.SetCash(10000) self.UniverseSettings.Resolution = Resolution.Minute self.AddUniverse(self.Universe.Index.QC500) self.AddEquity("SPY", Resolution.Minute) self.SetBrokerageModel(BrokerageName.Alpaca , AccountType.Margin) for sec in self.Securities.keys(): self.Securities[sec].SetSlippageModel(CustomSlippageModel(self)) self.Schedule.On(self.DateRules.EveryDay(), self.TimeRules.Every(timedelta(minutes=10)), self.rebalance)

My questions now are:
Will the backtest produce realistic results?
Can I improve the code somehow to be more realistic?
Is the slippage model even assigned correcly?

Thanks in advance for any help :)