Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
This report presents the forensic synthetic code analysis of QuantConnect/Lean, a C# project with 20,523 GitHub stars. SynthScan v2.0 examined 826,095 lines of code across 4947 source files, recording 6189 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 9.2 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 6189 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Research/QuantBook.cs | 341 | }; | COMMENT |
| LOW | Research/QuantBook.cs | 361 | COMMENT | |
| LOW | Research/QuantBook.cs | 461 | // the symbol is a contract | COMMENT |
| LOW | Research/QuantBook.cs | 521 | } | COMMENT |
| LOW | Research/QuantBook.cs | 541 | /// Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned | COMMENT |
| LOW | Research/QuantBook.cs | 561 | /// <param name="periods">The number of bars to request</param> | COMMENT |
| LOW | Research/QuantBook.cs | 621 | COMMENT | |
| LOW | Research/QuantBook.cs | 641 | /// The symbol must exist in the Securities collection. | COMMENT |
| LOW | Research/QuantBook.cs | 661 | /// <param name="indicator">Indicator</param> | COMMENT |
| LOW | Research/QuantBook.cs | 681 | /// <param name="start">The start time in the algorithm's time zone</param> | COMMENT |
| LOW | Research/QuantBook.cs | 741 | /// </summary> | COMMENT |
| LOW | Research/start.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …erDataProvider/DownloaderDataProviderArgumentParser.cs | 41 | /// <summary> | COMMENT |
| LOW | DownloaderDataProvider/Program.cs | 41 | /// </summary> | COMMENT |
| LOW | DownloaderDataProvider/Program.cs | 201 | } | COMMENT |
| LOW | DownloaderDataProvider/Models/DataDownloadConfig.cs | 41 | COMMENT | |
| LOW | DownloaderDataProvider/Models/BaseDataDownloadConfig.cs | 41 | /// <summary> | COMMENT |
| LOW | Configuration/Config.cs | 201 | /// Get the int value of a config string. | COMMENT |
| LOW | Configuration/Config.cs | 301 | /// <summary> | COMMENT |
| LOW | …Framework/Execution/StandardDeviationExecutionModel.cs | 41 | /// Gets or sets the maximum order value in units of the account currency. | COMMENT |
| LOW | …Framework/Execution/StandardDeviationExecutionModel.cs | 181 | { | COMMENT |
| LOW | …Framework/Execution/StandardDeviationExecutionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …/Execution/VolumeWeightedAveragePriceExecutionModel.cs | 41 | /// </summary> | COMMENT |
| LOW | Algorithm.Framework/Execution/SpreadExecutionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …/Execution/VolumeWeightedAveragePriceExecutionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …work/Portfolio/MaximumSharpeRatioPortfolioOptimizer.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …k/Portfolio/MeanReversionPortfolioConstructionModel.cs | 81 | /// </summary> | COMMENT |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.cs | 41 | private readonly IPortfolioOptimizer _optimizer; | COMMENT |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.cs | 101 | Resolution resolution = Resolution.Daily, | COMMENT |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.cs | 141 | else | COMMENT |
| LOW | …work/Portfolio/MaximumSharpeRatioPortfolioOptimizer.cs | 21 | COMMENT | |
| LOW | …k/Portfolio/MeanReversionPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …hm.Framework/Portfolio/RiskParityPortfolioOptimizer.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …amework/Portfolio/MinimumVariancePortfolioOptimizer.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …work/Portfolio/RiskParityPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …Framework/Portfolio/PortfolioOptimizerPythonWrapper.cs | 21 | { | COMMENT |
| LOW | …/Portfolio/EqualWeightingPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …Portfolio/SectorWeightingPortfolioConstructionModel.cs | 41 | /// <summary> | COMMENT |
| LOW | …Portfolio/SectorWeightingPortfolioConstructionModel.cs | 61 | COMMENT | |
| LOW | …ortfolio/InsightWeightingPortfolioConstructionModel.cs | 21 | using QuantConnect.Scheduling; | COMMENT |
| LOW | …ortfolio/InsightWeightingPortfolioConstructionModel.cs | 41 | /// in UTC</param> | COMMENT |
| LOW | …ortfolio/InsightWeightingPortfolioConstructionModel.cs | 101 | COMMENT | |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.cs | 101 | /// <summary> | COMMENT |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.cs | 161 | /// <summary> | COMMENT |
| LOW | …rk/Portfolio/AlphaStreamsPortfolioConstructionModel.cs | 21 | { | COMMENT |
| LOW | …folio/AccumulativeInsightPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …tfolio/ConfidenceWeightedPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …hm.Framework/Portfolio/RiskParityPortfolioOptimizer.cs | 41 | } | COMMENT |
| LOW | …hm.Framework/Portfolio/RiskParityPortfolioOptimizer.cs | 61 | var solution = RiskParityNewtonMethodOptimization(size, covariance, expectedReturns); | COMMENT |
| LOW | …rtfolio/UnconstrainedMeanVariancePortfolioOptimizer.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …amework/Portfolio/MinimumVariancePortfolioOptimizer.cs | 21 | COMMENT | |
| LOW | …work/Portfolio/RiskParityPortfolioConstructionModel.cs | 101 | /// </summary> | COMMENT |
| LOW | …work/Portfolio/RiskParityPortfolioConstructionModel.cs | 141 | : this(rebalancingFunc != null ? (Func<DateTime, DateTime?>)(timeUtc => rebalancingFunc(timeUtc)) : null, | COMMENT |
| LOW | …Portfolio/SectorWeightingPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …/Portfolio/EqualWeightingPortfolioConstructionModel.cs | 21 | using QuantConnect.Scheduling; | COMMENT |
| LOW | …/Portfolio/EqualWeightingPortfolioConstructionModel.cs | 61 | /// <summary> | COMMENT |
| LOW | …ortfolio/InsightWeightingPortfolioConstructionModel.py | 1 | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | COMMENT |
| LOW | …folio/AccumulativeInsightPortfolioConstructionModel.cs | 21 | using QuantConnect.Scheduling; | COMMENT |
| LOW | …folio/AccumulativeInsightPortfolioConstructionModel.cs | 41 | COMMENT | |
| 4712 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …Framework/Execution/StandardDeviationExecutionModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …/Execution/VolumeWeightedAveragePriceExecutionModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …k/Portfolio/MeanReversionPortfolioConstructionModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …work/Portfolio/RiskParityPortfolioConstructionModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …Portfolio/SectorWeightingPortfolioConstructionModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …lackLittermanOptimizationPortfolioConstructionModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …orithm.Framework/Alphas/HistoricalReturnsAlphaModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | Algorithm.Framework/Alphas/EmaCrossAlphaModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | Algorithm.Framework/Alphas/ConstantAlphaModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …ework/Risk/MaximumSectorExposureRiskManagementModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | ….Python/Alphas/GasAndCrudeOilEnergyCorrelationAlpha.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …ork/Alphas/PearsonCorrelationPairsTradingAlphaModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …gorithm.Framework/Alphas/BasePairsTradingAlphaModel.py | 0 | event fired each time the we add/remove securities from the data feed. args: algorithm: the algorithm instance that expe | STRING |
| HIGH | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | …work/Portfolio/RiskParityPortfolioConstructionModel.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | …lackLittermanOptimizationPortfolioConstructionModel.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | …orithm.Framework/Alphas/HistoricalReturnsAlphaModel.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | Algorithm.Framework/Alphas/EmaCrossAlphaModel.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | Algorithm.Framework/Alphas/RsiAlphaModel.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | Algorithm.Python/Alphas/GreenblattMagicFormulaAlpha.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | Algorithm.Python/Alphas/VIXDualThrustAlpha.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | ….Python/Alphas/GasAndCrudeOilEnergyCorrelationAlpha.py | 0 | contains data specific to a symbol required by this model | STRING |
| HIGH | …/Portfolio/EqualWeightingPortfolioConstructionModel.py | 0 | initialize a new instance of insightweightingportfolioconstructionmodel args: rebalance: rebalancing parameter. if it is | STRING |
| HIGH | …folio/AccumulativeInsightPortfolioConstructionModel.py | 0 | initialize a new instance of insightweightingportfolioconstructionmodel args: rebalance: rebalancing parameter. if it is | STRING |
| HIGH | …tfolio/ConfidenceWeightedPortfolioConstructionModel.py | 0 | initialize a new instance of insightweightingportfolioconstructionmodel args: rebalance: rebalancing parameter. if it is | STRING |
| HIGH | …Portfolio/SectorWeightingPortfolioConstructionModel.py | 0 | initialize a new instance of insightweightingportfolioconstructionmodel args: rebalance: rebalancing parameter. if it is | STRING |
| HIGH | …ortfolio/InsightWeightingPortfolioConstructionModel.py | 0 | initialize a new instance of insightweightingportfolioconstructionmodel args: rebalance: rebalancing parameter. if it is | STRING |
| HIGH | …/Portfolio/EqualWeightingPortfolioConstructionModel.py | 0 | will determine the target percent for each insight args: active_insights: the active insights to generate a target for | STRING |
| HIGH | …folio/AccumulativeInsightPortfolioConstructionModel.py | 0 | will determine the target percent for each insight args: active_insights: the active insights to generate a target for | STRING |
| HIGH | …Portfolio/SectorWeightingPortfolioConstructionModel.py | 0 | will determine the target percent for each insight args: active_insights: the active insights to generate a target for | STRING |
| HIGH | …ortfolio/InsightWeightingPortfolioConstructionModel.py | 0 | will determine the target percent for each insight args: active_insights: the active insights to generate a target for | STRING |
| HIGH | …tfolio/ConfidenceWeightedPortfolioConstructionModel.py | 0 | method that will determine if the portfolio construction model should create a target for this insight args: insight: th | STRING |
| HIGH | …Portfolio/SectorWeightingPortfolioConstructionModel.py | 0 | method that will determine if the portfolio construction model should create a target for this insight args: insight: th | STRING |
| HIGH | …ortfolio/InsightWeightingPortfolioConstructionModel.py | 0 | method that will determine if the portfolio construction model should create a target for this insight args: insight: th | STRING |
| HIGH | …orithm.Framework/Alphas/HistoricalReturnsAlphaModel.py | 0 | updates this alpha model with the latest data from the algorithm. this is called each time the algorithm receives data f | STRING |
| HIGH | …gorithm.Framework/Alphas/BasePairsTradingAlphaModel.py | 0 | updates this alpha model with the latest data from the algorithm. this is called each time the algorithm receives data f | STRING |
| HIGH | Algorithm.Framework/Alphas/EmaCrossAlphaModel.py | 0 | updates this alpha model with the latest data from the algorithm. this is called each time the algorithm receives data f | STRING |
| HIGH | Algorithm.Framework/Alphas/RsiAlphaModel.py | 0 | updates this alpha model with the latest data from the algorithm. this is called each time the algorithm receives data f | STRING |
| HIGH | …phas/ContingentClaimsAnalysisDefaultPredictionAlpha.py | 0 | updates this alpha model with the latest data from the algorithm. this is called each time the algorithm receives data f | STRING |
| HIGH | …amework/Selection/FundamentalUniverseSelectionModel.py | 0 | creates a new fundamental universe using this class's selection functions args: algorithm: the algorithm instance to cre | STRING |
| HIGH | …hm.Framework/Selection/OptionUniverseSelectionModel.py | 0 | creates a new fundamental universe using this class's selection functions args: algorithm: the algorithm instance to cre | STRING |
| HIGH | …hm.Framework/Selection/FutureUniverseSelectionModel.py | 0 | creates a new fundamental universe using this class's selection functions args: algorithm: the algorithm instance to cre | STRING |
| HIGH | …hm.Framework/Selection/OptionUniverseSelectionModel.py | 0 | gets the next time the framework should invoke the `createuniverses` method to refresh the set of universes. | STRING |
| HIGH | …hm.Framework/Selection/FutureUniverseSelectionModel.py | 0 | gets the next time the framework should invoke the `createuniverses` method to refresh the set of universes. | STRING |
| HIGH | Algorithm/Selection/UniverseSelectionModel.py | 0 | gets the next time the framework should invoke the `createuniverses` method to refresh the set of universes. | STRING |
| HIGH | …ithm.Framework/Risk/MaximumDrawdownPercentPortfolio.py | 0 | manages the algorithm's risk at each time step args: algorithm: the algorithm instance targets: the current portfolio ta | STRING |
| HIGH | …ithm.Framework/Risk/TrailingStopRiskManagementModel.py | 0 | manages the algorithm's risk at each time step args: algorithm: the algorithm instance targets: the current portfolio ta | STRING |
| HIGH | …work/Risk/MaximumUnrealizedProfitPercentPerSecurity.py | 0 | manages the algorithm's risk at each time step args: algorithm: the algorithm instance targets: the current portfolio ta | STRING |
| HIGH | …hm.Framework/Risk/MaximumDrawdownPercentPerSecurity.py | 0 | manages the algorithm's risk at each time step args: algorithm: the algorithm instance targets: the current portfolio ta | STRING |
| HIGH | Algorithm/Risk/CompositeRiskManagementModel.py | 0 | manages the algorithm's risk at each time step args: algorithm: the algorithm instance targets: the current portfolio ta | STRING |
| HIGH | …hm.Python/NumeraiSignalExportDemonstrationAlgorithm.py | 0 | initialize the date and add all equity symbols present in list _symbols | STRING |
| HIGH | …lective2PortfolioSignalExportDemonstrationAlgorithm.py | 0 | initialize the date and add all equity symbols present in list _symbols | STRING |
| HIGH | …ython/Collective2SignalExportDemonstrationAlgorithm.py | 0 | initialize the date and add all equity symbols present in list _symbols | STRING |
| HIGH | …thm.Python/CustomSignalExportDemonstrationAlgorithm.py | 0 | initialize the date and add all equity symbols present in list _symbols | STRING |
| HIGH | Algorithm.Python/ConstituentsQC500GeneratorAlgorithm.py | 0 | initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. all algorithms | STRING |
| HIGH | Algorithm.Python/UpdateOrderRegressionAlgorithm.py | 0 | initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. all algorithms | STRING |
| HIGH | …on/AddOptionContractFromUniverseRegressionAlgorithm.py | 0 | initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. all algorithms | STRING |
| HIGH | Algorithm.Python/BasicTemplateCfdAlgorithm.py | 0 | initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. all algorithms | STRING |
| HIGH | …on/CoarseFineOptionUniverseChainRegressionAlgorithm.py | 0 | initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. all algorithms | STRING |
| 162 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …k/Portfolio/MeanReversionPortfolioConstructionModel.py | 73 | # If we have no insights or non-ready just return an empty target list | COMMENT |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 85 | # If we have no insights just return an empty target list | COMMENT |
| LOW | …work/Portfolio/RiskParityPortfolioConstructionModel.py | 74 | # If we have no insights just return an empty target list | COMMENT |
| MEDIUM | Algorithm.CSharp/MarginCallEventsAlgorithm.cs | 45 | // cranking up the leverage increases the odds of a margin call when the security falls in value | COMMENT |
| MEDIUM | …orithm.CSharp/FractionalQuantityRegressionAlgorithm.cs | 47 | // Since this test algorithm uses leverage we need to set a buying power model with margin. | COMMENT |
| MEDIUM | …Sharp/SetHoldingsMultipleTargetsRegressionAlgorithm.cs | 41 | // use leverage 1 so we test the margin impact ordering | COMMENT |
| MEDIUM⚡ | …ithm.CSharp/NoMarginCallExpectedRegressionAlgorithm.cs | 54 | // market leverage 10 minutes before market closes. | COMMENT |
| MEDIUM⚡ | …ithm.CSharp/NoMarginCallExpectedRegressionAlgorithm.cs | 57 | // before market close we reduce our position to closed market leverage | COMMENT |
| MEDIUM⚡ | …ithm.CSharp/NoMarginCallExpectedRegressionAlgorithm.cs | 66 | // at market open we increase our position to open market leverage | COMMENT |
| MEDIUM | …/CryptoFutureLeverageBasedMarginRegressionAlgorithm.cs | 26 | /// changing leverage on a crypto future | COMMENT |
| MEDIUM | …/CryptoFutureLeverageBasedMarginRegressionAlgorithm.cs | 57 | SetHoldings(_cryptoFuture.Symbol, 10); // Buy all we can with our margin (leverage is 10) | CODE |
| MEDIUM | …/CryptoFutureLeverageBasedMarginRegressionAlgorithm.cs | 87 | SetHoldings(_cryptoFuture.Symbol, 20); // Buy all we can with our margin (new leverage is 20) | CODE |
| MEDIUM | Algorithm.CSharp/CustomSecurityInitializerAlgorithm.cs | 72 | /// so we can also take advantage of the default model/leverage setting | COMMENT |
| MEDIUM | …hm.CSharp/MarginCallClosedMarketRegressionAlgorithm.cs | 76 | // we should reduce our position by the same relation between the open and closed market leverage | COMMENT |
| MEDIUM | Algorithm.CSharp/OpeningBreakoutAlgorithm.cs | 121 | // leverage tradier $1 traders | COMMENT |
| MEDIUM | Algorithm.CSharp/OpeningBreakoutAlgorithm.cs | 130 | // Set our max leverage | COMMENT |
| MEDIUM | Algorithm.CSharp/OpeningBreakoutAlgorithm.cs | 304 | // min out at 1x leverage | COMMENT |
| MEDIUM | …/ETFConstituentUniverseFrameworkRegressionAlgorithm.cs | 198 | /// to the leverage of the ETF (1x, 2x, 3x, etc.) | COMMENT |
| MEDIUM | …p/Alphas/TripleLeveragedETFPairVolatilityDecayAlpha.cs | 29 | /// Leveraged ETFs (LETF) promise a fixed leverage ratio with respect to an underlying asset or an index. | COMMENT |
| MEDIUM | …rithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs | 592 | /// <param name="leverage">leverage for this security</param> | COMMENT |
| MEDIUM | …rithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs | 607 | /// <param name="leverage">leverage for this security</param> | COMMENT |
| MEDIUM | …rithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs | 624 | /// <param name="leverage">The requested leverage for this equity. Default is set by <see cref="SecurityInitiali | COMMENT |
| MEDIUM | …rithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs | 637 | /// <param name="leverage">The requested leverage for this equity. Default is set by <see cref="SecurityInitiali | COMMENT |
| MEDIUM | Indicators/ConnorsRelativeStrengthIndex.cs | 25 | /// This index is designed to provide a more robust measure of market strength | COMMENT |
| LOW | Tests/Python/PythonPackagesTests.cs | 993 | # specifying a single input parameter. In this example, we just pass the random | COMMENT |
| MEDIUM | Tests/Algorithm/AlgorithmSetHoldingsTests.cs | 141 | //Console.WriteLine("Leverage: " + leverage); | COMMENT |
| MEDIUM | …rities/PatternDayTradingMarginBuyingPowerModelTests.cs | 51 | // No parameters initialization, used default PDT 4x leverage open market and 2x leverage otherwise | COMMENT |
| MEDIUM | Tests/Common/Securities/SecurityMarginModelTests.cs | 65 | // Initial and maintenance margin = (1000 * 20) / leverage = X | COMMENT |
| MEDIUM | Tests/Common/Securities/SecurityMarginModelTests.cs | 88 | // Initial and maintenance margin = (1000 * 20) / leverage = X | COMMENT |
| MEDIUM | …sts/Common/Securities/SecurityPortfolioManagerTests.cs | 356 | // now the stock doubles, leverage is 1 we shouldn't have more margin remaining | COMMENT |
| MEDIUM | …sts/Common/Securities/SecurityPortfolioManagerTests.cs | 372 | // now the stock plummets, leverage is 1 we shouldn't have margin remaining | COMMENT |
| MEDIUM | …sts/Common/Securities/SecurityPortfolioManagerTests.cs | 382 | // this would not cause a margin call due to leverage = 1 | COMMENT |
| MEDIUM | …Common/Securities/FutureMarginBuyingPowerModelTests.cs | 289 | // we have a massive loss because of futures leverage | COMMENT |
| MEDIUM | …Common/Securities/FutureMarginBuyingPowerModelTests.cs | 320 | // we have a massive win because of futures leverage | COMMENT |
| MEDIUM | …Common/Securities/OptionMarginBuyingPowerModelTests.cs | 45 | // we test that options dont have leverage (100%) and it cannot be changed | COMMENT |
| MEDIUM⚡ | Tests/Common/Securities/MarginCallModelTests.cs | 202 | // leverage is 1 we shouldn't have more margin remaining | COMMENT |
| MEDIUM⚡ | Tests/Common/Securities/MarginCallModelTests.cs | 212 | // now the stock plummets, leverage is 1 we shouldn't have more margin remaining | COMMENT |
| MEDIUM⚡ | Tests/Common/Securities/MarginCallModelTests.cs | 222 | // this would not cause a margin call due to leverage = 1 | COMMENT |
| MEDIUM⚡ | Tests/Common/Securities/MarginCallModelTests.cs | 228 | // now change the leverage to test margin call warning and margin call logic | COMMENT |
| MEDIUM⚡ | Tests/Common/Securities/MarginCallModelTests.cs | 230 | // simulate a loan - when we fill using leverage it will set a negative cash amount | COMMENT |
| MEDIUM | …ecurities/CryptoFuture/CryptoFutureMarginModelTests.cs | 57 | // ((quantity * contract mutiplier * price) / leverage) * conversion rate (BTC -> USD) | COMMENT |
| MEDIUM | …ecurities/CryptoFuture/CryptoFutureMarginModelTests.cs | 62 | // ((quantity * contract mutiplier * price) / leverage) * conversion rate (USDT ~= USD) | COMMENT |
| MEDIUM | Tests/Engine/Setup/BrokerageSetupHandlerTests.cs | 232 | // Assert Leverage setting persisted for non options or futures (Blocked from setting leverage in Securi | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.Trading.cs | 1631 | /// if you have 2x leverage and request 100% holdings, it will utilize half of the | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.Python.cs | 107 | /// <param name="leverage">Custom leverage per security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.Python.cs | 127 | /// <param name="leverage">Custom leverage per security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.Python.cs | 151 | /// <param name="leverage">Custom leverage per security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.Python.cs | 190 | /// <param name="leverage">Custom leverage per security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.Python.cs | 216 | /// <param name="leverage">Custom leverage per security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.Python.cs | 261 | /// <param name="leverage">Custom leverage per security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 1401 | // save the existing leverage specified in AddSecurity, | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 1408 | // restore the saved leverage | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 1919 | /// <param name="leverage">Custom leverage per security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 1923 | /// <remarks> AddSecurity(SecurityType securityType, Symbol symbol, Resolution resolution, bool fillForward, dec | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 1939 | /// <param name="leverage">leverage for this security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 1985 | /// <param name="leverage">leverage for this security</param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 2115 | /// <param name="leverage">The requested leverage for this equity. Default is set by <see cref="SecurityInitiali | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 2133 | /// <param name="leverage">The requested leverage for this equity. Default is set by <see cref="SecurityInitiali | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 2153 | /// <param name="leverage">The requested leverage for the </param> | COMMENT |
| MEDIUM | Algorithm/QCAlgorithm.cs | 2172 | /// <param name="leverage">The requested leverage for the </param> | COMMENT |
| 167 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Research/start.py | 30 | CODE | |
| LOW | …Framework/Execution/StandardDeviationExecutionModel.py | 14 | CODE | |
| LOW | Algorithm.Framework/Execution/SpreadExecutionModel.py | 14 | CODE | |
| LOW | …/Execution/VolumeWeightedAveragePriceExecutionModel.py | 14 | CODE | |
| LOW | …work/Portfolio/MaximumSharpeRatioPortfolioOptimizer.py | 14 | CODE | |
| LOW | …k/Portfolio/MeanReversionPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …hm.Framework/Portfolio/RiskParityPortfolioOptimizer.py | 14 | CODE | |
| LOW | …hm.Framework/Portfolio/RiskParityPortfolioOptimizer.py | 15 | CODE | |
| LOW | …amework/Portfolio/MinimumVariancePortfolioOptimizer.py | 14 | CODE | |
| LOW | …work/Portfolio/RiskParityPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …/Portfolio/EqualWeightingPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …folio/AccumulativeInsightPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …tfolio/ConfidenceWeightedPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …Portfolio/SectorWeightingPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …ortfolio/InsightWeightingPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 14 | CODE | |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 17 | CODE | |
| LOW | …orithm.Framework/Alphas/HistoricalReturnsAlphaModel.py | 14 | CODE | |
| LOW | …ork/Alphas/PearsonCorrelationPairsTradingAlphaModel.py | 14 | CODE | |
| LOW | Algorithm.Framework/Alphas/MacdAlphaModel.py | 14 | CODE | |
| LOW | …gorithm.Framework/Alphas/BasePairsTradingAlphaModel.py | 14 | CODE | |
| LOW | Algorithm.Framework/Alphas/EmaCrossAlphaModel.py | 14 | CODE | |
| LOW | Algorithm.Framework/Alphas/RsiAlphaModel.py | 14 | CODE | |
| LOW | Algorithm.Framework/Alphas/RsiAlphaModel.py | 15 | CODE | |
| LOW | Algorithm.Framework/Alphas/ConstantAlphaModel.py | 14 | CODE | |
| LOW | …ork/Selection/ETFConstituentsUniverseSelectionModel.py | 14 | CODE | |
| LOW | …thm.Framework/Selection/QC500UniverseSelectionModel.py | 14 | CODE | |
| LOW | …amework/Selection/FundamentalUniverseSelectionModel.py | 14 | CODE | |
| LOW | …hm.Framework/Selection/OptionUniverseSelectionModel.py | 14 | CODE | |
| LOW | ….Framework/Selection/EmaCrossUniverseSelectionModel.py | 14 | CODE | |
| LOW | …hm.Framework/Selection/FutureUniverseSelectionModel.py | 14 | CODE | |
| LOW | …ework/Risk/MaximumSectorExposureRiskManagementModel.py | 14 | CODE | |
| LOW | …ithm.Framework/Risk/MaximumDrawdownPercentPortfolio.py | 14 | CODE | |
| LOW | …ithm.Framework/Risk/TrailingStopRiskManagementModel.py | 14 | CODE | |
| LOW | …work/Risk/MaximumUnrealizedProfitPercentPerSecurity.py | 14 | CODE | |
| LOW | …hm.Framework/Risk/MaximumDrawdownPercentPerSecurity.py | 14 | CODE | |
| LOW | …/Research/RegressionScripts/Test_QuantBookIndicator.py | 14 | CODE | |
| LOW | …ts/Research/RegressionScripts/Test_QuantBookHistory.py | 14 | CODE | |
| LOW | …ts/Research/RegressionScripts/Test_QuantBookHistory.py | 16 | CODE | |
| LOW | Tests/Research/RegressionScripts/custom_data.py | 14 | CODE | |
| LOW | Tests/TestData/generate_reference_data_from_talipp.py | 4 | CODE | |
| LOW | Tests/Python/PandasTests/PandasIndexingTests.py | 14 | CODE | |
| LOW | Tests/Python/PandasTests/PandasIndexingTests.py | 15 | CODE | |
| LOW | Tests/Python/PandasTests/PandasIndexingTests.py | 16 | CODE | |
| LOW | Tests/Python/PandasTests/PandasMapperTests.py | 48 | CODE | |
| LOW | Tests/Python/PandasTests/PandasMapperTests.py | 54 | CODE | |
| LOW | …ts/RegressionAlgorithms/Test_AlgorithmPythonWrapper.py | 14 | CODE | |
| LOW | …egressionAlgorithms/Test_PythonExceptionInterpreter.py | 14 | CODE | |
| LOW | Tests/RegressionAlgorithms/Test_MethodOverload.py | 14 | CODE | |
| LOW | Tests/RegressionAlgorithms/Test_CustomDataAlgorithm.py | 14 | CODE | |
| LOW | Tests/RegressionAlgorithms/Test_CustomDataAlgorithm.py | 16 | CODE | |
| LOW | Algorithm/Execution/ImmediateExecutionModel.py | 14 | CODE | |
| LOW | Algorithm/Execution/NullExecutionModel.py | 14 | CODE | |
| LOW | Algorithm/Portfolio/NullPortfolioConstructionModel.py | 14 | CODE | |
| LOW | Algorithm/Alphas/NullAlphaModel.py | 14 | CODE | |
| LOW | Algorithm/Selection/UniverseSelectionModel.py | 14 | CODE | |
| LOW | Algorithm/Selection/ManualUniverseSelectionModel.py | 14 | CODE | |
| LOW | Algorithm/Risk/NullRiskManagementModel.py | 14 | CODE | |
| LOW | Algorithm/Risk/CompositeRiskManagementModel.py | 14 | CODE | |
| 560 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …/Execution/VolumeWeightedAveragePriceExecutionModel.py | 146 | def get_volume_and_average_price(self, input): | CODE |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 65 | def should_create_target_for_insight(self, insight): | CODE |
| LOW | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 148 | def on_rate_of_change_updated(self, roc, value): | CODE |
| LOW | …work/Portfolio/RiskParityPortfolioConstructionModel.py | 139 | def on_rate_of_change_updated(self, roc, value): | CODE |
| LOW | …tfolio/ConfidenceWeightedPortfolioConstructionModel.py | 38 | def should_create_target_for_insight(self, insight): | CODE |
| LOW | …Portfolio/SectorWeightingPortfolioConstructionModel.py | 37 | def should_create_target_for_insight(self, insight): | CODE |
| LOW | …ortfolio/InsightWeightingPortfolioConstructionModel.py | 38 | def should_create_target_for_insight(self, insight): | CODE |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 80 | def should_create_target_for_insight(self, insight): | CODE |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 172 | def apply_blacklitterman_master_formula(self, Pi, Sigma, P, Q): | CODE |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 288 | def on_rate_of_change_updated(self, roc, value): | CODE |
| LOW | …gorithm.Framework/Alphas/BasePairsTradingAlphaModel.py | 132 | def create_identity_indicator(symbol: Symbol): | CODE |
| LOW | …amework/Selection/FundamentalUniverseSelectionModel.py | 61 | def create_coarse_fundamental_universe(self, algorithm: QCAlgorithm) -> Universe: | CODE |
| LOW | …hm.Framework/Selection/OptionUniverseSelectionModel.py | 34 | def get_next_refresh_time_utc(self): | CODE |
| LOW | …hm.Framework/Selection/FutureUniverseSelectionModel.py | 35 | def get_next_refresh_time_utc(self): | CODE |
| LOW | …ithm.Framework/Risk/MaximumDrawdownPercentPortfolio.py | 63 | def get_total_drawdown_percent(self, current_value): | CODE |
| LOW⚡ | …/Research/RegressionScripts/Test_QuantBookIndicator.py | 37 | def test_bollinger_bands_backwards_compatibility(self, symbol, start, end, resolution): | CODE |
| LOW⚡ | …/Research/RegressionScripts/Test_QuantBookIndicator.py | 41 | def test_average_true_range_backwards_compatibility(self, symbol, start, end, resolution): | CODE |
| LOW⚡ | …/Research/RegressionScripts/Test_QuantBookIndicator.py | 45 | def test_on_balance_volume_backwards_compatibility(self, symbol, start, end, resolution): | CODE |
| LOW | Tests/TestData/generate_reference_data_from_talib.py | 24 | def generate_reference_data_for_single_output_indicator( | CODE |
| LOW | Tests/TestData/generate_reference_data_from_talib.py | 36 | def generate_reference_data_for_multi_output_indicator( | CODE |
| LOW | Tests/TestData/generate_reference_data_from_talipp.py | 20 | def generate_reference_data_for_siso_indicator( | CODE |
| LOW | Tests/TestData/generate_reference_data_from_talipp.py | 30 | def generate_reference_data_for_miso_indicator( | CODE |
| LOW | Tests/TestData/generate_reference_data_from_talipp.py | 49 | def generate_reference_data_for_simo_indicator( | CODE |
| LOW | Tests/TestData/generate_reference_data_from_talipp.py | 69 | def generate_reference_data_for_mimo_indicator( | CODE |
| LOW | Tests/TestData/generate_reference_data_from_talipp.py | 98 | def generate_reference_data_for_zigzag_indicator( | CODE |
| LOW | Tests/TestData/generate_reference_data_from_tulip.py | 17 | def generate_reference_data_for_siso_indicator( | CODE |
| LOW | Tests/Python/BasePythonWrapperTests.cs | 123 | def set_return_valid_out_param_type(self, value): | CODE |
| LOW | Tests/Python/BasePythonWrapperTests.cs | 157 | def set_return_valid_out_params_count(self, value): | CODE |
| LOW | Tests/Python/BasePythonWrapperTests.cs | 188 | def set_use_valid_return_type(self, value): | CODE |
| LOW | Tests/Python/BasePythonWrapperTests.cs | 219 | def set_use_valid_return_type(self, value): | CODE |
| LOW | Tests/Python/BasePythonWrapperTests.cs | 284 | def set_use_valid_return_type(self, value): | CODE |
| LOW | Tests/Python/BasePythonWrapperTests.cs | 350 | def set_use_valid_return_type(self, value): | CODE |
| LOW | Tests/Python/PandasTests/PandasIndexingTests.py | 27 | def test_indexing_dataframe_with_list(self): | CODE |
| LOW | Tests/Python/PandasTests/PandasIndexingTests.py | 49 | def test_contains_user_mapped_ticker(self): | CODE |
| LOW | Tests/Python/PandasTests/PandasIndexingTests.py | 62 | def test_contains_user_defined_columns_with_spaces(self, column_name): | CODE |
| LOW | Tests/Python/PandasTests/PandasIndexingTests.py | 73 | def test_column_equals_only_matching_string(self): | CODE |
| LOW | Tests/Indicators/OptionBaseIndicatorTests.cs | 422 | def get_option_indicator_base_indicator(symbol: Symbol) -> OptionIndicatorBase: | CODE |
| LOW | Tests/Indicators/RollingWindowTests.cs | 550 | def rolling_window_with_tuple(): | CODE |
| LOW⚡ | Tests/Indicators/RollingWindowTests.cs | 570 | def rolling_window_with_float(): | CODE |
| LOW⚡ | Tests/Indicators/RollingWindowTests.cs | 577 | def rolling_window_with_trade_bar(): | CODE |
| LOW⚡ | Tests/Indicators/RollingWindowTests.cs | 584 | def rolling_window_with_quote_bar(): | CODE |
| LOW⚡ | Tests/Indicators/RollingWindowTests.cs | 591 | def rolling_window_with_custom_data_type(): | CODE |
| LOW | Tests/Indicators/CompositeIndicatorTests.cs | 114 | def create_composite_indicator(left, right, operation): | CODE |
| LOW | Tests/Algorithm/AlgorithmAddSecurityTests.cs | 342 | def add_security_initializers(algorithm): | CODE |
| LOW | Tests/Algorithm/AlgorithmAddSecurityTests.cs | 477 | def add_security_initializers(algorithm): | CODE |
| LOW | Tests/Algorithm/AlgorithmAddSecurityTests.cs | 566 | def add_security_initializers(algorithm): | CODE |
| LOW | Tests/Algorithm/AlgorithmIndicatorsTests.cs | 700 | def create_intraday_vwap_indicator(name): | CODE |
| LOW | …thm/Framework/FrameworkModelsPythonInheritanceTests.cs | 136 | def create_coarse_fundamental_universe(self, algorithm): | CODE |
| LOW | Tests/Common/Securities/SecurityCacheTests.cs | 492 | def get_security_cache_margin_interest_rate(): | CODE |
| LOW | Tests/Common/Securities/SecurityCacheTests.cs | 498 | def get_security_cache_custom_data_type(): | CODE |
| LOW | Tests/Engine/DataFeeds/DataQueueHandlerManagerTests.cs | 214 | private class TestDataHandler : IDataQueueHandler | CODE |
| LOW | Tests/Engine/DataFeeds/DataQueueHandlerManagerTests.cs | 241 | private class ExplodingDataHandler : TestDataHandler | CODE |
| LOW | Tests/RegressionAlgorithms/Test_MethodOverload.py | 38 | def call_plot_throw_managed_test(self): | CODE |
| LOW | Tests/RegressionAlgorithms/Test_MethodOverload.py | 41 | def call_plot_throw_pyobject_test(self): | CODE |
| LOW | Algorithm/Selection/UniverseSelectionModel.py | 19 | def get_next_refresh_time_utc(self) -> datetime: | CODE |
| LOW | Common/Orders/Slippage/VolumeShareSlippageModel.py | 27 | def get_slippage_approximation(self, asset: Security, order: Order) -> float: | CODE |
| LOW | ToolBox/ConsolidatorDataProcessor.cs | 27 | public class ConsolidatorDataProcessor : IDataProcessor | CODE |
| LOW | ToolBox/FilteredDataProcessor.cs | 25 | public class FilteredDataProcessor : IDataProcessor | CODE |
| LOW | ToolBox/IDataProcessor.cs | 40 | public static class DataProcessor | CODE |
| LOW | ToolBox/CsvDataProcessor.cs | 29 | public class CsvDataProcessor : IDataProcessor | CODE |
| 140 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | Tests/Algorithm/AlgorithmHistoryTests.cs | 4457 | Assert.That(historyResults, Has.All.Not.Empty.And.All.Count.EqualTo(expectedHistoryCount), | CODE |
| CRITICAL | Tests/Algorithm/AlgorithmAddUniverseTests.cs | 116 | Assert.IsTrue(constituentUniverse.Configuration.Symbol.ID.Symbol.StartsWithInvariant("qc-universe-")); | CODE |
| CRITICAL | …election/ETFConstituentsUniverseSelectionModelTests.cs | 168 | Assert.IsTrue(universe.Configuration.Symbol.ID.Symbol.StartsWithInvariant("qc-universe-")); | CODE |
| CRITICAL | Tests/Common/Util/PythonUtilTests.cs | 138 | at QuantConnect.AlgorithmFactory.Python.Wrappers.AlgorithmPythonWrapper.Initialize() in D:\QuantConnect\MyLean\Lean\A | CODE |
| CRITICAL | Tests/Common/Util/PythonUtilTests.cs | 155 | at QuantConnect.AlgorithmFactory.Python.Wrappers.AlgorithmPythonWrapper.Initialize() in D:\QuantConnect\MyLean\Lean\A | CODE |
| CRITICAL | Tests/Common/Util/PythonUtilTests.cs | 193 | at QuantConnect.AlgorithmFactory.Python.Wrappers.AlgorithmPythonWrapper.OnData(Slice slice) in /home/user/QuantConnec | CODE |
| CRITICAL | Tests/Common/Util/PythonUtilTests.cs | 208 | at QuantConnect.AlgorithmFactory.Python.Wrappers.AlgorithmPythonWrapper.OnData(Slice slice) in D:\QuantConnect\MyLean | CODE |
| CRITICAL | Tests/Common/Util/PythonUtilTests.cs | 225 | at QuantConnect.AlgorithmFactory.Python.Wrappers.AlgorithmPythonWrapper.OnData(Slice slice) in C:\Users\user\QuantCon | CODE |
| CRITICAL | Tests/Common/Data/SubscriptionManagerTests.cs | 157 | var tickers = QuantConnect.Algorithm.CSharp.StressSymbols.StockSymbols.ToList(); | CODE |
| CRITICAL | Tests/Common/Data/SubscriptionManagerTests.cs | 194 | var tickers = QuantConnect.Algorithm.CSharp.StressSymbols.StockSymbols.Take(100).ToList(); | CODE |
| CRITICAL | Tests/Engine/PerformanceBenchmarkAlgorithms.cs | 75 | foreach (var symbol in QuantConnect.Algorithm.CSharp.Benchmarks.Symbols.Equity.All.Take(500)) | CODE |
| CRITICAL | Tests/Engine/PerformanceBenchmarkAlgorithms.cs | 97 | foreach (var symbol in QuantConnect.Algorithm.CSharp.Benchmarks.Symbols.Equity.All.Take(_parameters.Secu | CODE |
| CRITICAL | Tests/Engine/DataFeeds/FileSystemDataFeedTests.cs | 276 | Assert.IsTrue(universeData.Any(kvp => kvp.Key.Configuration.Symbol.ID.Symbol.Contains("CONTINUOU | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …/MeanVarianceOptimizationPortfolioConstructionModel.py | 91 | # Create a dictionary keyed by the symbols in the insights with an pandas.series as value to create a data frame | COMMENT |
| MEDIUM | …work/Portfolio/RiskParityPortfolioConstructionModel.py | 80 | # Create a dictionary keyed by the symbols in the insights with an pandas.series as value to create a data frame | COMMENT |
| MEDIUM | …lackLittermanOptimizationPortfolioConstructionModel.py | 91 | # Create a dictionary keyed by the symbols in the insights with an pandas.Series as value to create a data f | COMMENT |
| MEDIUM | …lackLittermanOptimizationPortfolioConstructionModel.py | 182 | # Create the diagonal Sigma matrix of error terms from the expressed views | COMMENT |
| MEDIUM | …rch/RegressionTemplates/BasicTemplateResearchPython.cs | 78 | ", it is a datapoint indicator\", \"# Define the indicator\", \"bb = BollingerBands(30, 2)\", \"\", | CODE |
| MEDIUM | …es/BasicTemplateCustomDataTypeHistoryResearchPython.cs | 68 | "tags\": [] }, \"outputs\": [], \"source\": [ \"# Create an instance\", \"qb = QuantBook()\", | CODE |
| MEDIUM | Tests/Python/PythonPackagesTests.cs | 85 | # Initialize dataframe object, specify time axis and variable names | COMMENT |
| MEDIUM | Tests/Python/PythonPackagesTests.cs | 353 | # Create a model (can be any object) | COMMENT |
| MEDIUM | Tests/Python/PythonPackagesTests.cs | 487 | # Define the models for the nuisance functions | COMMENT |
| MEDIUM | Tests/Python/PythonPackagesTests.cs | 649 | # Define the model hyperparameters | COMMENT |
| MEDIUM | Tests/Python/PythonPackagesTests.cs | 2012 | # Create the linear solver with the GLOP backend. | COMMENT |
| MEDIUM | Tests/Python/PythonPackagesTests.cs | 2015 | # Create the variables x and y. | COMMENT |
| MEDIUM | Tests/Python/PandasTests/PandasIndexingTests.py | 50 | # Create a new DF that has a plain ticker, test that our mapper doesn't break | COMMENT |
| MEDIUM | …hm.Python/NumeraiSignalExportDemonstrationAlgorithm.py | 41 | # Create a Scheduled Event to submit signals every trading day at 13:00 UTC | COMMENT |
| MEDIUM | …reStopMarketOrderOnExtendedHoursRegressionAlgorithm.py | 35 | # This method is opened 2 new orders by scheduler | COMMENT |
| MEDIUM | Algorithm.Python/CustomDataBitcoinAlgorithm.py | 31 | # Define the symbol and "type" of our generic data: | COMMENT |
| MEDIUM | Algorithm.Python/CustomPartialFillModelAlgorithm.py | 56 | # Create the object | COMMENT |
| MEDIUM | Algorithm.Python/MarginCallEventsAlgorithm.py | 59 | # This method is called when portfolio.margin_remaining is under 5% of your portfolio.total_portfolio_value | COMMENT |
| MEDIUM | …rithm.Python/CustomDataIndicatorExtensionsAlgorithm.py | 40 | # Define the symbol and "type" of our generic data | COMMENT |
| MEDIUM | Algorithm.Python/EmaCrossFuturesFrontMonthAlgorithm.py | 77 | # Create a new consolidator and register the indicators to it | COMMENT |
| MEDIUM | Algorithm.Python/IndicatorSuiteAlgorithm.py | 103 | # The following methods will add multiple charts to the algorithm output. | COMMENT |
| MEDIUM | …thon/HistoryWithCustomDataSourceRegressionAlgorithm.py | 49 | # Create a new symbol as equity so we find the existing data files | COMMENT |
| MEDIUM | ….Python/CrunchDAOSignalExportDemonstrationAlgorithm.py | 46 | # Create a Scheduled Event to submit signals every monday before the market opens | COMMENT |
| MEDIUM | Algorithm.Python/CustomDataNIFTYAlgorithm.py | 30 | # Define the symbol and "type" of our generic data: | COMMENT |
| MEDIUM | …ython/Collective2SignalExportDemonstrationAlgorithm.py | 41 | # Create a new PortfolioTarget for each symbol, assign it an initial amount of 0.05 and save it in self.targets | COMMENT |
| MEDIUM | Algorithm.Python/CustomIndicatorAlgorithm.py | 29 | # Create a QuantConnect indicator and a python custom indicator for comparison | COMMENT |
| MEDIUM⚡ | …orithm.Python/CustomConsolidatorRegressionAlgorithm.py | 31 | #Create a 3:10PM custom quote bar consolidator | COMMENT |
| MEDIUM⚡ | …orithm.Python/CustomConsolidatorRegressionAlgorithm.py | 41 | #Create an indicator and register a consolidator to it | COMMENT |
| MEDIUM | Algorithm.Python/BasicTemplateOptionsPriceModel.py | 38 | # Define the Option Price Model | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | Tests/Python/PythonPackagesTests.cs | 993 | # specifying a single input parameter. In this example, we just pass the random | COMMENT |
| HIGH | Algorithm.Python/FuturesMomentumAlgorithm.py | 18 | ### In this example, we demostrate how to trade futures contracts using | COMMENT |
| HIGH | Algorithm.Python/DataConsolidationAlgorithm.py | 22 | ### In this example we show one of the simplest consolidators, the TradeBarConsolidator. | COMMENT |
| HIGH | Algorithm.Python/CustomDataUniverseAlgorithm.py | 18 | ### and load data using the universe selection feature. In this example we | COMMENT |
| HIGH | Algorithm.Python/MovingAverageCrossAlgorithm.py | 17 | ### In this example we look at the canonical 15/30 day moving average cross. This algorithm | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Optimizer/Analysis/OptimizationAnalyzer.cs | 83 | // ── Aggregate helpers ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | Tests/Optimizer/Analysis/OptimizationAnalyzerTests.cs | 177 | // ── helpers ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | Tests/Common/Brokerages/WebullBrokerageModelTests.cs | 100 | // ── CanSubmitOrder — Option/IndexOption TimeInForce restrictions ──────── | COMMENT |
| MEDIUM | Tests/Common/Brokerages/WebullBrokerageModelTests.cs | 171 | // ── CanSubmitOrder — OutsideRegularTradingHours ────────────────────────── | COMMENT |
| MEDIUM | Engine/Results/Analysis/ResultsAnalyzer.cs | 54 | // ── Test chain ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | Engine/Results/Analysis/ResultsAnalyzer.cs | 146 | // ── 1. backtest equity from "Strategy Equity" chart ────────────────── | COMMENT |
| MEDIUM | Engine/Results/Analysis/ResultsAnalyzer.cs | 158 | // ── 2. Benchmark from SPY history ───────────────────────────────────── | COMMENT |
| MEDIUM | Engine/Results/Analysis/ResultsAnalyzer.cs | 173 | // ── 3. Resample both to daily data points ──────────────────────────── | COMMENT |
| MEDIUM | Engine/Results/Analysis/ResultsAnalyzer.cs | 182 | // ── 4. Align the two curves on the same timestamps ─────────────────── | COMMENT |
| MEDIUM | …alysis/Analyses/TakeProfitAndStopLossOrdersAnalysis.cs | 81 | // ── Sub-analysis 1: both TP and SL filled ──────────────────────────────────────── | COMMENT |
| MEDIUM | …sAnalyses/ExchangeNotOpenOrderResponseErrorAnalysis.cs | 72 | // ── Sub-analysis: exercise while exchange not open ──────────────────────────────── | COMMENT |
| MEDIUM | …sAnalyses/ExchangeNotOpenOrderResponseErrorAnalysis.cs | 94 | // ── Sub-analysis: MOC order for Future / FOP ───────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …Framework/Execution/StandardDeviationExecutionModel.py | 44 | CODE | |
| LOW | Algorithm.Framework/Execution/SpreadExecutionModel.py | 29 | CODE | |
| LOW | …/Execution/VolumeWeightedAveragePriceExecutionModel.py | 31 | CODE | |
| LOW | …folio/AccumulativeInsightPortfolioConstructionModel.py | 44 | CODE | |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 83 | CODE | |
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 223 | CODE | |
| LOW | …ork/Alphas/PearsonCorrelationPairsTradingAlphaModel.py | 39 | CODE | |
| LOW | Algorithm.Framework/Alphas/EmaCrossAlphaModel.py | 36 | CODE | |
| LOW | …ework/Risk/MaximumSectorExposureRiskManagementModel.py | 30 | CODE | |
| LOW | Algorithm/Execution/ImmediateExecutionModel.py | 26 | CODE | |
| LOW | Algorithm.Python/UpdateOrderRegressionAlgorithm.py | 53 | CODE | |
| LOW | …ConsolidateHourBarsIntoDailyBarsRegressionAlgorithm.py | 42 | CODE | |
| LOW | Algorithm.Python/FuturesMomentumAlgorithm.py | 49 | CODE | |
| LOW | Algorithm.Python/ObjectStoreExampleAlgorithm.py | 76 | CODE | |
| LOW | …thon/CustomDataUniverseScheduledRegressionAlgorithm.py | 51 | CODE | |
| LOW | Algorithm.Python/BubbleAlgorithm.py | 65 | CODE | |
| LOW | ….Python/FutureOptionPutITMExpiryRegressionAlgorithm.py | 56 | CODE | |
| LOW | …orithm.Python/OptionOpenInterestRegressionAlgorithm.py | 36 | CODE | |
| LOW | …Python/FutureOptionCallITMExpiryRegressionAlgorithm.py | 57 | CODE | |
| LOW | Algorithm.Python/BasicTemplateCryptoAlgorithm.py | 63 | CODE | |
| LOW | …orithm.Python/FractionalQuantityRegressionAlgorithm.py | 44 | CODE | |
| LOW | …ython/SecuritySessionWithFuturesRegressionAlgorithm.py | 38 | CODE | |
| LOW | …thm.Python/ExpiryHelperAlphaModelFrameworkAlgorithm.py | 51 | CODE | |
| LOW | Algorithm.Python/BasicTemplateEurexFuturesAlgorithm.py | 87 | CODE | |
| LOW | Algorithm.Python/IndiaDataRegressionAlgorithm.py | 46 | CODE | |
| LOW | Algorithm.Python/IndiaDataRegressionAlgorithm.py | 56 | CODE | |
| LOW | Algorithm.Python/ComboOrderTicketDemoAlgorithm.py | 39 | CODE | |
| LOW | Algorithm.Python/OptionRenameRegressionAlgorithm.py | 35 | CODE | |
| LOW | …hon/FutureOptionWithFutureFilterRegressionAlgorithm.py | 27 | CODE | |
| LOW | …ithm.Python/ConstituentsUniverseRegressionAlgorithm.py | 42 | CODE | |
| LOW | …/CanLiquidateWithOrderPropertiesRegressionAlgorithm.py | 29 | CODE | |
| LOW | ….Python/NullMarginMultipleOrdersRegressionAlgorithm.py | 37 | CODE | |
| LOW | …orithm.Python/CustomDataUniverseRegressionAlgorithm.py | 49 | CODE | |
| LOW | Algorithm.Python/ComboOrdersFillModelAlgorithm.py | 45 | CODE | |
| LOW | Algorithm.Python/Alphas/RebalancingLeveragedETFAlpha.py | 72 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …ckMonthOptionUsingCalendarSpreadRegressionAlgorithm.cs | 77 | // Step 1: short front month put | COMMENT |
| LOW⚡ | …ckMonthOptionUsingCalendarSpreadRegressionAlgorithm.cs | 83 | // Step 2: roll out front month put to back month put using a calendar spread. | COMMENT |
| LOW | …arp/FutureOptionWithFutureFilterRegressionAlgorithm.cs | 38 | // Not all future contracts have option chains, so we need to check if the contract is in the option | COMMENT |
| LOW | …uidatingMultipleOptionStrategiesRegressionAlgorithm.cs | 84 | // Step 1: buy spreads | COMMENT |
| LOW | …uidatingMultipleOptionStrategiesRegressionAlgorithm.cs | 116 | // Step 2: liquidate spreads | COMMENT |
| LOW⚡ | Tests/Brokerages/OrderCrossingBrokerageTests.cs | 475 | // Step 1: Create order request under the hood of any brokerage | COMMENT |
| LOW⚡ | Tests/Brokerages/OrderCrossingBrokerageTests.cs | 479 | // Step 2: Place the order request, paying attention to the flag 'isPlaceOrderWithoutLeanEvent' | COMMENT |
| LOW⚡ | Tests/Brokerages/OrderCrossingBrokerageTests.cs | 482 | // Step 3: Return the result of placing the order | COMMENT |
| LOW | …hon/FutureOptionWithFutureFilterRegressionAlgorithm.py | 31 | # Not all future contracts have option chains, so we need to check if the contract is in the option chai | COMMENT |
| LOW | Engine/AlgorithmManager.cs | 204 | // If backtesting/warmup, we need to check if there are realtime events in the past | COMMENT |
| LOW | Engine/AlgorithmManager.cs | 922 | // we need to check if the security was removed. | COMMENT |
| LOW | Engine/DataFeeds/DateChangeTimeKeeper.cs | 203 | // which already passed if we are moving on to the next data date. So we need to check if we need to emi | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Algorithm.CSharp/IndicatorHistoryAlgorithm.cs | 61 | // Let's log the BB values for the last 20 days, for demonstration purposes on how it can be enumerated | COMMENT |
| MEDIUM | Algorithm.CSharp/SecurityCustomPropertiesAlgorithm.cs | 111 | /// This custom fee is implemented for demonstration purposes only. | COMMENT |
| LOW | Common/Data/DynamicData.cs | 194 | // don't forget to add the dynamic members! | COMMENT |
| MEDIUM | Algorithm.Python/SecurityCustomPropertiesAlgorithm.py | 76 | '''This custom fee is implemented for demonstration purposes only.''' | STRING |
| MEDIUM | Algorithm.Python/IndicatorHistoryAlgorithm.py | 45 | # Let's log the BB values for the last 20 days, for demonstration purposes on how it can be enumerated | COMMENT |
| MEDIUM | Algorithm.Python/IndicatorSuiteAlgorithm.py | 18 | ### framework you can use for designing an algorithm. | COMMENT |
| MEDIUM | Algorithm.Python/BasicTemplateAlgorithm.py | 18 | ### framework you can use for designing an algorithm. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …ckMonthOptionUsingCalendarSpreadRegressionAlgorithm.cs | 77 | // Step 1: short front month put | COMMENT |
| LOW⚡ | …ckMonthOptionUsingCalendarSpreadRegressionAlgorithm.cs | 83 | // Step 2: roll out front month put to back month put using a calendar spread. | COMMENT |
| LOW | …uidatingMultipleOptionStrategiesRegressionAlgorithm.cs | 84 | // Step 1: buy spreads | COMMENT |
| LOW | …uidatingMultipleOptionStrategiesRegressionAlgorithm.cs | 116 | // Step 2: liquidate spreads | COMMENT |
| LOW⚡ | Tests/Brokerages/OrderCrossingBrokerageTests.cs | 475 | // Step 1: Create order request under the hood of any brokerage | COMMENT |
| LOW⚡ | Tests/Brokerages/OrderCrossingBrokerageTests.cs | 479 | // Step 2: Place the order request, paying attention to the flag 'isPlaceOrderWithoutLeanEvent' | COMMENT |
| LOW⚡ | Tests/Brokerages/OrderCrossingBrokerageTests.cs | 482 | // Step 3: Return the result of placing the order | COMMENT |
| LOW | Engine/AlgorithmManager.cs | 905 | // NOTE: This method assumes option contracts have the same core trading hours as their underlying contract | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …k/Portfolio/MeanReversionPortfolioConstructionModel.py | 154 | v_{t+1} = arg min || v - v_{t+1} || ^ 2 | STRING |
| HIGH | Common/PandasMapper.py | 105 | # Try the original args; if true just return true | COMMENT |
| HIGH | …thon/HistoryWithCustomDataSourceRegressionAlgorithm.py | 38 | if not aapl_history.equals(spy_history): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Algorithm.Python/DropboxCoarseFineAlgorithm.py | 62 | # Check if contains the row we need | COMMENT |
| LOW | …gorithm.Python/BasicTemplateFutureRolloverAlgorithm.py | 57 | # Check if information in SymbolData class and new slice data are ready for trading | COMMENT |
| LOW | Algorithm.Python/TrainingExampleAlgorithm.py | 32 | # Set TrainingMethod to be executed immediately | COMMENT |
| LOW | Algorithm.Python/TrainingExampleAlgorithm.py | 35 | # Set TrainingMethod to be executed at 8:00 am every Sunday | COMMENT |
| LOW | ….Python/Alphas/GasAndCrudeOilEnergyCorrelationAlpha.py | 92 | ## Check if Natural Gas returns are greater than the threshold we've set | COMMENT |
| LOW | Algorithm.Python/Alphas/RebalancingLeveragedETFAlpha.py | 89 | # Check if the returns are > 1% at 14.15 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …lackLittermanOptimizationPortfolioConstructionModel.py | 30 | CODE | |
| LOW | Report/ReportCharts.py | 138 | CODE | |
| LOW | Report/ReportCharts.py | 265 | CODE | |
| LOW | Report/ReportCharts.py | 656 | CODE | |
| LOW | Report/ReportCharts.py | 748 | CODE | |
| LOW | Report/ReportCharts.py | 973 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | find_datasource_repos.py | 154 | except Exception as e: | CODE |
| LOW | …eFromMultipleTickTypeTickHistoryRegressionAlgorithm.py | 35 | except Exception as e: | CODE |
| LOW | …m.Python/PythonDictionaryFeatureRegressionAlgorithm.py | 106 | except Exception as e: | CODE |
| LOW | Algorithm.Python/PandasDataFrameHistoryAlgorithm.py | 134 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Research/start.py | 17 | # Usage: | COMMENT |
| LOW | Tests/Brokerages/OrderCrossingBrokerageTests.cs | 546 | /// // Example usage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Algorithm.Python/RangeConsolidatorAlgorithm.py | 35 | def set_start_and_end_dates(self) -> None: | CODE |
| LOW | …m.Python/OptionModelsConsistencyRegressionAlgorithm.py | 43 | def set_models(self, security: Security) -> None: | CODE |
| LOW | Algorithm.Python/CompleteOrderTagUpdateAlgorithm.py | 83 | def update_order_tag(self, ticket: OrderTicket, tag: str, error_message_prefix: str) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Report/config.example.json | 5 | "strategy-description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut | CODE |
| LOW | Report/config.example.json | 5 | "strategy-description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Optimizer/Strategies/OptimizationStrategySettings.cs | 26 | /// TODO: implement | COMMENT |