Overall Statistics |
Total Trades 4480 Average Win 0% Average Loss 0% Compounding Annual Return -99.999% Drawdown 6.500% Expectancy 0 Net Profit -6.469% Sharpe Ratio -1.377 Probabilistic Sharpe Ratio 0% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta 0 Annual Standard Deviation 0.726 Annual Variance 0.527 Information Ratio -1.377 Tracking Error 0.726 Treynor Ratio 0 Total Fees $4480.00 |
import numpy as np class MyCoarseUniverseAlgorithm(QCAlgorithm): def Initialize(self): self.AddUniverse(self.MyCoarseFilterFunction) self.UniverseSettings.Resolution = Resolution.Daily self.SetStartDate(2020, 12, 29) self.SetCash(100000) def MyCoarseFilterFunction(self, coarse): return [c.Symbol for c in coarse] def OnData(self, data): for symbol in self.ActiveSecurities.Keys: if not self.Portfolio[symbol].Invested: self.MarketOrder(symbol, 1) def OnSecuritiesChanged(self, changed): for security in changed.RemovedSecurities: self.Liquidate(security.Symbol)