diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml
index a9361f687038..b3965a54960d 100644
--- a/.github/workflows/api-tests.yml
+++ b/.github/workflows/api-tests.yml
@@ -9,14 +9,19 @@ on:
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
# Only run on push events (not on pull_request) for security reasons in order to be able to use secrets
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: Free space
- run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
+ - name: Liberate disk space
+ uses: jlumbroso/free-disk-space@main
+ with:
+ tool-cache: true
+ large-packages: false
+ docker-images: false
+ swap-storage: false
- name: Run API Tests
uses: addnab/docker-run-action@v3
with:
diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml
index fd4345487441..1e69c304cbaa 100644
--- a/.github/workflows/gh-actions.yml
+++ b/.github/workflows/gh-actions.yml
@@ -9,12 +9,18 @@ on:
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: Free space
- run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
+
+ - name: Liberate disk space
+ uses: jlumbroso/free-disk-space@main
+ with:
+ tool-cache: true
+ large-packages: false
+ docker-images: false
+ swap-storage: false
- uses: addnab/docker-run-action@v3
with:
diff --git a/.github/workflows/rebase-org-branches.yml b/.github/workflows/rebase-org-branches.yml
index a5f95a522213..aaaa1c4e2b6f 100644
--- a/.github/workflows/rebase-org-branches.yml
+++ b/.github/workflows/rebase-org-branches.yml
@@ -7,7 +7,7 @@ on:
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
with:
diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml
index a8891dc2fff3..130e72ccd2e9 100644
--- a/.github/workflows/regression-tests.yml
+++ b/.github/workflows/regression-tests.yml
@@ -9,12 +9,17 @@ on:
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: Free space
- run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
+ - name: Liberate disk space
+ uses: jlumbroso/free-disk-space@main
+ with:
+ tool-cache: true
+ large-packages: false
+ docker-images: false
+ swap-storage: false
- uses: addnab/docker-run-action@v3
with:
diff --git a/.github/workflows/report-generator.yml b/.github/workflows/report-generator.yml
index e50a885c4f6e..718693575cf1 100644
--- a/.github/workflows/report-generator.yml
+++ b/.github/workflows/report-generator.yml
@@ -9,12 +9,17 @@ on:
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: Free space
- run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
+ - name: Liberate disk space
+ uses: jlumbroso/free-disk-space@main
+ with:
+ tool-cache: true
+ large-packages: false
+ docker-images: false
+ swap-storage: false
- uses: addnab/docker-run-action@v3
with:
diff --git a/.github/workflows/research-regression-tests.yml b/.github/workflows/research-regression-tests.yml
index 4b300feeb0e5..8e55b8666cb3 100644
--- a/.github/workflows/research-regression-tests.yml
+++ b/.github/workflows/research-regression-tests.yml
@@ -9,12 +9,17 @@ on:
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: Free space
- run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
+ - name: Liberate disk space
+ uses: jlumbroso/free-disk-space@main
+ with:
+ tool-cache: true
+ large-packages: false
+ docker-images: false
+ swap-storage: false
- uses: addnab/docker-run-action@v3
with:
diff --git a/.github/workflows/virtual-environments.yml b/.github/workflows/virtual-environments.yml
index c840aefd9b4e..22f876a8abd6 100644
--- a/.github/workflows/virtual-environments.yml
+++ b/.github/workflows/virtual-environments.yml
@@ -9,12 +9,17 @@ on:
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: Free space
- run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
+ - name: Liberate disk space
+ uses: jlumbroso/free-disk-space@main
+ with:
+ tool-cache: true
+ large-packages: false
+ docker-images: false
+ swap-storage: false
- uses: addnab/docker-run-action@v3
with:
diff --git a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
index bf9c3ff262da..9041425f8ec9 100644
--- a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
+++ b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
@@ -4,13 +4,11 @@
AnyCPU
QuantConnect.Algorithm.CSharp
QuantConnect.Algorithm.CSharp
- net6.0
+ net9.0
false
bin\$(Configuration)\
AllEnabledByDefault
false
- true
- true
QuantConnect LEAN Engine: Algorithm.CSharp Project - A collection of C# algorithm demonstrations for how to use the API
CS0618;CA1062;CA1002
diff --git a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj
index fa1f265c6a54..470132ccb66e 100644
--- a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj
+++ b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj
@@ -4,14 +4,13 @@
AnyCPU
QuantConnect.Algorithm.Framework
QuantConnect.Algorithm.Framework
- net6.0
+ net9.0
false
bin\$(Configuration)\
AllEnabledByDefault
bin\$(Configuration)\QuantConnect.Algorithm.Framework.xml
Library
false
- false
QuantConnect LEAN Engine: Algorithm.Framework Project - The core QCAlgorithm framework implementation
CA1062
diff --git a/Algorithm.Python/CallbackCommandRegressionAlgorithm.py b/Algorithm.Python/CallbackCommandRegressionAlgorithm.py
index 094b86b158cd..6fe1f06b9433 100644
--- a/Algorithm.Python/CallbackCommandRegressionAlgorithm.py
+++ b/Algorithm.Python/CallbackCommandRegressionAlgorithm.py
@@ -76,7 +76,7 @@ def initialize(self):
bool_command.something_else = { "Property": 10 }
bool_command.array_test = [ "SPY", "BTCUSD" ]
link = self.link(bool_command)
- if "&command[array_test][0]=SPY&command[array_test][1]=BTCUSD&command[result]=True&command[something_else][Property]=10&command[$type]=BoolCommand" not in link:
+ if "&command%5barray_test%5d%5b0%5d=SPY&command%5barray_test%5d%5b1%5d=BTCUSD&command%5bresult%5d=True&command%5bsomething_else%5d%5bProperty%5d=10&command%5b%24type%5d=BoolCommand" not in link:
raise ValueError(f'Invalid link was generated! {link}')
potential_command = VoidCommand()
@@ -85,12 +85,12 @@ def initialize(self):
potential_command.parameters = { "tag": "Signal X" }
command_link = self.link(potential_command)
- if "command[target][0]=BAC&command[quantity]=10&command[parameters][tag]=Signal+X&command[$type]=VoidCommand" not in command_link:
+ if "&command%5btarget%5d%5b0%5d=BAC&command%5bquantity%5d=10&command%5bparameters%5d%5btag%5d=Signal+X&command%5b%24type%5d=VoidCommand" not in command_link:
raise ValueError(f'Invalid link was generated! {command_link}')
self.notify.email("email@address", "Trade Command Event", f"Signal X trade\nFollow link to trigger: {command_link}")
untyped_command_link = self.link({ "symbol": "SPY", "parameters": { "quantity": 10 } })
- if "&command[symbol]=SPY&command[parameters][quantity]=10" not in untyped_command_link:
+ if "&command%5bsymbol%5d=SPY&command%5bparameters%5d%5bquantity%5d=10" not in untyped_command_link:
raise ValueError(f'Invalid link was generated! {untyped_command_link}')
self.notify.email("email@address", "Untyped Command Event", f"Signal Y trade\nFollow link to trigger: {untyped_command_link}")
diff --git a/Algorithm.Python/QuantConnect.Algorithm.Python.csproj b/Algorithm.Python/QuantConnect.Algorithm.Python.csproj
index eab90b412dad..c804224e54d7 100644
--- a/Algorithm.Python/QuantConnect.Algorithm.Python.csproj
+++ b/Algorithm.Python/QuantConnect.Algorithm.Python.csproj
@@ -4,13 +4,11 @@
AnyCPU
QuantConnect.Algorithm.Python
QuantConnect.Algorithm.Python
- net6.0
+ net9.0
AllEnabledByDefault
bin\$(Configuration)\
false
false
- true
- true
QuantConnect LEAN Engine: Algorithm.Python Project - A collection of Py algorithm demonstrations for how to use the API
diff --git a/Algorithm/QuantConnect.Algorithm.csproj b/Algorithm/QuantConnect.Algorithm.csproj
index af31c8e90149..671d5e8f9f8d 100644
--- a/Algorithm/QuantConnect.Algorithm.csproj
+++ b/Algorithm/QuantConnect.Algorithm.csproj
@@ -4,14 +4,13 @@
AnyCPU
QuantConnect.Algorithm
QuantConnect.Algorithm
- net6.0
+ net9.0
..\
false
AllEnabledByDefault
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Algorithm.xml
false
- false
QuantConnect LEAN Engine: Algorithm Project - Core QCAlgorithm implementation
CA1062
diff --git a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
index 29f454310502..90f36989cc08 100644
--- a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
+++ b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
@@ -4,13 +4,12 @@
AnyCPU
QuantConnect.AlgorithmFactory
QuantConnect.AlgorithmFactory
- net6.0
+ net9.0
false
bin\$(Configuration)\
AllEnabledByDefault
bin\$(Configuration)\QuantConnect.AlgorithmFactory.xml
false
- false
QuantConnect LEAN Engine: Algorithm.AlgorithmFactory Project - Factory for instantiation of QCAlgorithm algorithm objects to be used with LEAN
CA1062
diff --git a/Api/QuantConnect.Api.csproj b/Api/QuantConnect.Api.csproj
index 109e307ff0d2..20fb363b8669 100644
--- a/Api/QuantConnect.Api.csproj
+++ b/Api/QuantConnect.Api.csproj
@@ -4,7 +4,7 @@
AnyCPU
QuantConnect.Api
QuantConnect.Api
- net6.0
+ net9.0
..\
true
AllEnabledByDefault
@@ -12,7 +12,6 @@
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Api.xml
false
- false
QuantConnect LEAN Engine: API Project - C# SDK for interaction with the QuantConnect.com
CA1062
LICENSE
diff --git a/Brokerages/QuantConnect.Brokerages.csproj b/Brokerages/QuantConnect.Brokerages.csproj
index cc3a37530ffb..96f6221d4106 100644
--- a/Brokerages/QuantConnect.Brokerages.csproj
+++ b/Brokerages/QuantConnect.Brokerages.csproj
@@ -4,13 +4,12 @@
AnyCPU
QuantConnect.Brokerages
QuantConnect.Brokerages
- net6.0
+ net9.0
AllEnabledByDefault
false
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Brokerages.xml
false
- false
QuantConnect LEAN Engine: Brokerages Project - A collection of brokerages for live trading and backtesting
CA1062
LICENSE
diff --git a/Common/Brokerages/BybitBrokerageModel.cs b/Common/Brokerages/BybitBrokerageModel.cs
index 7c6a3e5295ac..d687ba88ad12 100644
--- a/Common/Brokerages/BybitBrokerageModel.cs
+++ b/Common/Brokerages/BybitBrokerageModel.cs
@@ -15,6 +15,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using QuantConnect.Benchmarks;
using QuantConnect.Orders;
using QuantConnect.Orders.Fees;
diff --git a/Common/Extensions.cs b/Common/Extensions.cs
index 98212d920edc..97670e5d54f2 100644
--- a/Common/Extensions.cs
+++ b/Common/Extensions.cs
@@ -4376,9 +4376,14 @@ public static decimal SafeDivision(this decimal numerator, decimal denominator,
}
}
+ ///
+ /// Retrieve a common custom data types from the given symbols if any
+ ///
+ /// The target symbols to search
+ /// The custom data type or null
public static Type GetCustomDataTypeFromSymbols(Symbol[] symbols)
{
- if (symbols.Any())
+ if (symbols.Length != 0)
{
if (!SecurityIdentifier.TryGetCustomDataTypeInstance(symbols[0].ID.Symbol, out var dataType)
|| symbols.Any(x => !SecurityIdentifier.TryGetCustomDataTypeInstance(x.ID.Symbol, out var customDataType) || customDataType != dataType))
diff --git a/Common/QuantConnect.csproj b/Common/QuantConnect.csproj
index 088dfd992381..ca20add0d8f8 100644
--- a/Common/QuantConnect.csproj
+++ b/Common/QuantConnect.csproj
@@ -2,7 +2,7 @@
Debug
AnyCPU
- net6.0
+ net9.0
QuantConnect.Common
..\
true
diff --git a/Common/Util/LinqExtensions.cs b/Common/Util/LinqExtensions.cs
index 2117e2d03b82..38c4ae89ec58 100644
--- a/Common/Util/LinqExtensions.cs
+++ b/Common/Util/LinqExtensions.cs
@@ -26,18 +26,6 @@ namespace QuantConnect.Util
///
public static class LinqExtensions
{
- ///
- /// Creates a dictionary enumerable of key value pairs
- ///
- /// The key type
- /// The value type
- /// The IEnumerable of KeyValuePair instances to convert to a dictionary
- /// A dictionary holding the same data as the enumerable
- public static Dictionary ToDictionary(this IEnumerable> enumerable)
- {
- return enumerable.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
- }
-
///
/// Creates a new read-only dictionary from the key value pairs
///
diff --git a/Compression/QuantConnect.Compression.csproj b/Compression/QuantConnect.Compression.csproj
index 083aefed130b..1f626d954416 100644
--- a/Compression/QuantConnect.Compression.csproj
+++ b/Compression/QuantConnect.Compression.csproj
@@ -4,13 +4,12 @@
AnyCPU
QuantConnect.Compression
QuantConnect.Compression
- net6.0
+ net9.0
AllEnabledByDefault
false
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Compression.xml
false
- false
QuantConnect LEAN Engine: Compression Project - A library with compression tools
CA1062
LICENSE
diff --git a/Configuration/QuantConnect.Configuration.csproj b/Configuration/QuantConnect.Configuration.csproj
index f0ef8301c96a..f222de092f40 100644
--- a/Configuration/QuantConnect.Configuration.csproj
+++ b/Configuration/QuantConnect.Configuration.csproj
@@ -4,7 +4,7 @@
AnyCPU
QuantConnect.Configuration
QuantConnect.Configuration
- net6.0
+ net9.0
..\
true
AllEnabledByDefault
@@ -12,7 +12,6 @@
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Configuration.xml
false
- false
QuantConnect LEAN Engine: Configuration Project - The Config and argument parser implementation
CA1062
LICENSE
diff --git a/DockerfileJupyter b/DockerfileJupyter
index 52c078e3e99c..669021394b67 100644
--- a/DockerfileJupyter
+++ b/DockerfileJupyter
@@ -37,9 +37,6 @@ ENV PYTHONPATH=${WORK}:${PYTHONPATH}
RUN mkdir -p /root/.ipython/profile_default/startup/ && \
ln -s /Lean/Launcher/bin/Debug/start.py /root/.ipython/profile_default/startup/start.py
-# conda libc is old and causes issues in research we want to use the hosts version which is updated
-RUN mkdir -p /opt/miniconda3/lib/ && ln -vsf /lib/x86_64-linux-gnu/libstdc++.so.6 /opt/miniconda3/lib/libstdc++.so.6
-
RUN find ${WORK} -type f -not -name '*.py*' -not -name '*.xml' -not -name '*.exe.config' -not -name '*.exe' -not -name '*.so' -not -name '*.dll' -not -name '*.ipynb' -not -name '*.csx' -not -name 'QuantConnect.Lean.Launcher.runtimeconfig.json' -not -name 'decimal.py' -delete
# Create initialize script
diff --git a/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj b/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj
index 54f42879b7ad..3409754162db 100644
--- a/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj
+++ b/DownloaderDataProvider/QuantConnect.DownloaderDataProvider.Launcher.csproj
@@ -6,12 +6,11 @@
Exe
QuantConnect.DownloaderDataProvider.Launcher
QuantConnect.DownloaderDataProvider.Launcher
- net6.0
+ net9.0
AllEnabledByDefault
false
bin\$(Configuration)\
false
- true
enable
enable
QuantConnect LEAN Downloader Data Provider: Project - Main startup executable for download data from various sources with our Lean-friendly application.
diff --git a/Engine/DataFeeds/DataQueueHandlerManager.cs b/Engine/DataFeeds/DataQueueHandlerManager.cs
index 7a842f3ce957..715ae3a034f7 100644
--- a/Engine/DataFeeds/DataQueueHandlerManager.cs
+++ b/Engine/DataFeeds/DataQueueHandlerManager.cs
@@ -32,7 +32,6 @@ namespace QuantConnect.Lean.Engine.DataFeeds
///
public class DataQueueHandlerManager : IDataQueueHandler, IDataQueueUniverseProvider
{
- private ITimeProvider _frontierTimeProvider;
private readonly IAlgorithmSettings _algorithmSettings;
private readonly Dictionary> _dataConfigAndDataHandler = new();
@@ -44,6 +43,12 @@ public DataQueueHandlerManager(IAlgorithmSettings settings)
_algorithmSettings = settings;
}
+ ///
+ /// Frontier time provider to use
+ ///
+ /// Protected for testing purposes
+ protected ITimeProvider FrontierTimeProvider { get; set; }
+
///
/// Collection of data queue handles being used
///
@@ -73,7 +78,7 @@ public IEnumerator Subscribe(SubscriptionDataConfig dataConfig, EventH
{
// Emit ticks & custom data as soon as we get them, they don't need any kind of batching behavior applied to them
// only use the frontier time provider if we need to
- var immediateEmission = dataConfig.Resolution == Resolution.Tick || dataConfig.IsCustomData || _frontierTimeProvider == null;
+ var immediateEmission = dataConfig.Resolution == Resolution.Tick || dataConfig.IsCustomData || FrontierTimeProvider == null;
var exchangeTimeZone = dataConfig.ExchangeTimeZone;
IEnumerator enumerator;
@@ -84,7 +89,7 @@ public IEnumerator Subscribe(SubscriptionDataConfig dataConfig, EventH
// let's only wake up the main thread if the data point is allowed to be emitted, else we could fill forward previous bar and not let this one through
var dataAvailable = eventArgs as NewDataAvailableEventArgs;
if (dataAvailable == null || dataAvailable.DataPoint == null
- || dataAvailable.DataPoint.EndTime.ConvertToUtc(exchangeTimeZone) <= _frontierTimeProvider.GetUtcNow())
+ || dataAvailable.DataPoint.EndTime.ConvertToUtc(exchangeTimeZone) <= FrontierTimeProvider.GetUtcNow())
{
newDataAvailableHandler?.Invoke(sender, eventArgs);
}
@@ -113,7 +118,7 @@ public IEnumerator Subscribe(SubscriptionDataConfig dataConfig, EventH
return enumerator;
}
- var utcStartTime = _frontierTimeProvider.GetUtcNow();
+ var utcStartTime = FrontierTimeProvider.GetUtcNow();
var exchangeHours = MarketHoursDatabase.FromDataFolder().GetExchangeHours(dataConfig.Symbol.ID.Market, dataConfig.Symbol, dataConfig.Symbol.SecurityType);
if (LeanData.UseStrictEndTime(_algorithmSettings.DailyPreciseEndTime, dataConfig.Symbol, dataConfig.Increment, exchangeHours))
@@ -122,7 +127,7 @@ public IEnumerator Subscribe(SubscriptionDataConfig dataConfig, EventH
enumerator = new StrictDailyEndTimesEnumerator(enumerator, exchangeHours, utcStartTime.ConvertFromUtc(exchangeTimeZone));
}
- return new FrontierAwareEnumerator(enumerator, _frontierTimeProvider,
+ return new FrontierAwareEnumerator(enumerator, FrontierTimeProvider,
new TimeZoneOffsetProvider(exchangeTimeZone, utcStartTime, Time.EndOfTime)
);
}
@@ -178,7 +183,7 @@ public void SetJob(LiveNodePacket job)
DataHandlers.Add(dataHandler);
}
- _frontierTimeProvider = InitializeFrontierTimeProvider();
+ FrontierTimeProvider = InitializeFrontierTimeProvider();
}
///
diff --git a/Engine/DataFeeds/Enumerators/LiveSubscriptionEnumerator.cs b/Engine/DataFeeds/Enumerators/LiveSubscriptionEnumerator.cs
index 0c7ae62b4f0d..917f21ad2ea0 100644
--- a/Engine/DataFeeds/Enumerators/LiveSubscriptionEnumerator.cs
+++ b/Engine/DataFeeds/Enumerators/LiveSubscriptionEnumerator.cs
@@ -80,7 +80,14 @@ public bool MoveNext()
}
var result = _underlyingEnumerator.MoveNext();
- _current = _underlyingEnumerator.Current;
+ if (result)
+ {
+ _current = _underlyingEnumerator.Current;
+ }
+ else
+ {
+ _current = null;
+ }
if (_current != null && _current.Symbol != _requestedSymbol)
{
diff --git a/Engine/DataFeeds/Enumerators/RefreshEnumerator.cs b/Engine/DataFeeds/Enumerators/RefreshEnumerator.cs
index 72fa82616bba..4c5954e0a744 100644
--- a/Engine/DataFeeds/Enumerators/RefreshEnumerator.cs
+++ b/Engine/DataFeeds/Enumerators/RefreshEnumerator.cs
@@ -60,7 +60,10 @@ public bool MoveNext()
try
{
moveNext = _enumerator.MoveNext();
- _current = _enumerator.Current;
+ if (moveNext)
+ {
+ _current = _enumerator.Current;
+ }
}
catch (IOException exception)
{
diff --git a/Engine/QuantConnect.Lean.Engine.csproj b/Engine/QuantConnect.Lean.Engine.csproj
index 5d4f43417f73..5b05656f0a3b 100644
--- a/Engine/QuantConnect.Lean.Engine.csproj
+++ b/Engine/QuantConnect.Lean.Engine.csproj
@@ -4,7 +4,7 @@
AnyCPU
QuantConnect.Lean.Engine
QuantConnect.Lean.Engine
- net6.0
+ net9.0
..\
true
publish\
@@ -21,8 +21,6 @@
bin\$(Configuration)\QuantConnect.Lean.Engine.xml
bin\$(Configuration)\
false
- true
- true
QuantConnect LEAN Engine: Engine Project - Core engine and datafeed implementation
CA1062
diff --git a/Indicators/QuantConnect.Indicators.csproj b/Indicators/QuantConnect.Indicators.csproj
index b044f2f14180..a0c33a5b5040 100644
--- a/Indicators/QuantConnect.Indicators.csproj
+++ b/Indicators/QuantConnect.Indicators.csproj
@@ -4,13 +4,12 @@
AnyCPU
QuantConnect.Indicators
QuantConnect.Indicators
- net6.0
+ net9.0
AllEnabledByDefault
false
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Indicators.xml
false
- false
QuantConnect LEAN Engine: Indicators Project - A collection of financial indicators
CA1062
diff --git a/Launcher/QuantConnect.Lean.Launcher.csproj b/Launcher/QuantConnect.Lean.Launcher.csproj
index be72e18761df..299780332618 100644
--- a/Launcher/QuantConnect.Lean.Launcher.csproj
+++ b/Launcher/QuantConnect.Lean.Launcher.csproj
@@ -5,12 +5,11 @@
Exe
QuantConnect.Lean.Launcher
QuantConnect.Lean.Launcher
- net6.0
+ net9.0
AllEnabledByDefault
false
bin\$(Configuration)\
false
- true
true
QuantConnect LEAN Engine: Launcher Project - Main startup executable for live and backtesting
CA1062
diff --git a/Logging/QuantConnect.Logging.csproj b/Logging/QuantConnect.Logging.csproj
index 4e4aa64991b8..c603d354cdce 100644
--- a/Logging/QuantConnect.Logging.csproj
+++ b/Logging/QuantConnect.Logging.csproj
@@ -4,7 +4,7 @@
AnyCPU
QuantConnect.Logging
QuantConnect.Logging
- net6.0
+ net9.0
..\
true
AllEnabledByDefault
@@ -12,7 +12,6 @@
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Logging.xml
false
- false
QuantConnect LEAN Engine: Logging Project - The logging library implementation
CA1062
LICENSE
diff --git a/Messaging/QuantConnect.Messaging.csproj b/Messaging/QuantConnect.Messaging.csproj
index a37c4480c6c2..80db8f6c7e4d 100644
--- a/Messaging/QuantConnect.Messaging.csproj
+++ b/Messaging/QuantConnect.Messaging.csproj
@@ -4,14 +4,12 @@
AnyCPU
QuantConnect.Messaging
QuantConnect.Messaging
- net6.0
+ net9.0
AllEnabledByDefault
false
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Messaging.xml
false
- true
- true
QuantConnect LEAN Engine: Messaging Project - The external messaging system implementation
LICENSE
CA1062
diff --git a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj
index ddd049dcad3d..7c9555446fc7 100644
--- a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj
+++ b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj
@@ -5,13 +5,11 @@
Exe
QuantConnect.Optimizer.Launcher
QuantConnect.Optimizer.Launcher
- net6.0
- true
+ net9.0
false
bin\$(Configuration)\
AllEnabledByDefault
false
- true
QuantConnect LEAN Engine: Optimizer Launcher Project - The Lean optimization engine launcher
CA1062
diff --git a/Optimizer/QuantConnect.Optimizer.csproj b/Optimizer/QuantConnect.Optimizer.csproj
index fd82049e648d..2154ba7021e8 100644
--- a/Optimizer/QuantConnect.Optimizer.csproj
+++ b/Optimizer/QuantConnect.Optimizer.csproj
@@ -4,14 +4,11 @@
AnyCPU
QuantConnect.Optimizer
QuantConnect.Optimizer
- net6.0
- true
+ net9.0
false
bin\$(Configuration)\
AllEnabledByDefault
false
- true
- true
QuantConnect LEAN Engine: Optimizer Project - The Lean optimization engine
CA1062
diff --git a/Queues/QuantConnect.Queues.csproj b/Queues/QuantConnect.Queues.csproj
index 013e69d19a75..c59e858512fa 100644
--- a/Queues/QuantConnect.Queues.csproj
+++ b/Queues/QuantConnect.Queues.csproj
@@ -4,13 +4,12 @@
AnyCPU
QuantConnect.Queues
QuantConnect.Queues
- net6.0
+ net9.0
false
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Queues.xml
AllEnabledByDefault
false
- false
QuantConnect LEAN Engine: Queues Project - Handles and generates live and backtesting algorithm jobs
LICENSE
CA1062
diff --git a/Report/QuantConnect.Report.csproj b/Report/QuantConnect.Report.csproj
index d35d6b1d3e04..1a6e3a1cd285 100644
--- a/Report/QuantConnect.Report.csproj
+++ b/Report/QuantConnect.Report.csproj
@@ -5,14 +5,12 @@
Exe
QuantConnect.Report
QuantConnect.Report
- net6.0
- true
+ net9.0
false
bin\$(Configuration)\
bin\$(Configuration)\QuantConnect.Report.xml
AllEnabledByDefault
false
- true
QuantConnect LEAN Engine: Report Project - Generates live and backtesting reports
diff --git a/Research/QuantConnect.Research.csproj b/Research/QuantConnect.Research.csproj
index e5bc65cd1c5e..f352eb0bddce 100644
--- a/Research/QuantConnect.Research.csproj
+++ b/Research/QuantConnect.Research.csproj
@@ -4,12 +4,11 @@
AnyCPU
QuantConnect.Research
QuantConnect.Research
- net6.0
+ net9.0
AllEnabledByDefault
bin\$(Configuration)\
false
false
- false
QuantConnect LEAN Engine: Research Project - Core implementation for jupyter research environment
CA1062
diff --git a/Tests/Api/AuthenticationTests.cs b/Tests/Api/AuthenticationTests.cs
index 495cc1969b46..c171b8809b68 100644
--- a/Tests/Api/AuthenticationTests.cs
+++ b/Tests/Api/AuthenticationTests.cs
@@ -45,7 +45,7 @@ public void PopulateQueryString()
var queryString = HttpUtility.ParseQueryString(string.Empty);
Authentication.PopulateQueryString(queryString, new[] { new KeyValuePair("command", payload) });
- Assert.AreEqual("command[SomeArray][0]=1&command[SomeArray][1]=2&command[SomeArray][2]=3&command[Symbol]=SPY&command[Parameters][Quantity]=10", queryString.ToString());
+ Assert.AreEqual("command%5bSomeArray%5d%5b0%5d=1&command%5bSomeArray%5d%5b1%5d=2&command%5bSomeArray%5d%5b2%5d=3&command%5bSymbol%5d=SPY&command%5bParameters%5d%5bQuantity%5d=10", queryString.ToString());
}
}
}
diff --git a/Tests/Indicators/PythonIndicatorNoinheritanceTests.cs b/Tests/Indicators/PythonIndicatorNoinheritanceTests.cs
index f895a4f59de7..cafef8f5c64a 100644
--- a/Tests/Indicators/PythonIndicatorNoinheritanceTests.cs
+++ b/Tests/Indicators/PythonIndicatorNoinheritanceTests.cs
@@ -96,7 +96,7 @@ protected override void RunTestIndicator(IndicatorBase indicator)
}
if (closeIndex * targetIndex < 0)
{
- Assert.Fail($"Didn't find one of 'Close' or '{line}' in the header: ", TestColumnName);
+ Assert.Fail($"Didn't find one of 'Close' or '{TestColumnName}' in the header: {line}");
}
continue;
diff --git a/Tests/Indicators/PythonIndicatorNoinheritanceTestsLegacy.cs b/Tests/Indicators/PythonIndicatorNoinheritanceTestsLegacy.cs
index 662b144b0868..b247d37f0c96 100644
--- a/Tests/Indicators/PythonIndicatorNoinheritanceTestsLegacy.cs
+++ b/Tests/Indicators/PythonIndicatorNoinheritanceTestsLegacy.cs
@@ -95,7 +95,7 @@ protected override void RunTestIndicator(IndicatorBase indicator)
}
if (closeIndex * targetIndex < 0)
{
- Assert.Fail($"Didn't find one of 'Close' or '{line}' in the header: ", TestColumnName);
+ Assert.Fail($"Didn't find one of 'Close' or '{TestColumnName}' in the header: {line}");
}
continue;
diff --git a/Tests/Indicators/PythonIndicatorTests.cs b/Tests/Indicators/PythonIndicatorTests.cs
index b572219f7586..a2807ce13bd9 100644
--- a/Tests/Indicators/PythonIndicatorTests.cs
+++ b/Tests/Indicators/PythonIndicatorTests.cs
@@ -112,7 +112,7 @@ protected override void RunTestIndicator(IndicatorBase indicator)
}
if (closeIndex * targetIndex < 0)
{
- Assert.Fail($"Didn't find one of 'Close' or '{line}' in the header: ", TestColumnName);
+ Assert.Fail($"Didn't find one of 'Close' or '{TestColumnName}' in the header: {line}");
}
continue;
diff --git a/Tests/Indicators/TestHelper.cs b/Tests/Indicators/TestHelper.cs
index 21b08d17fd2b..0eac582ffde7 100644
--- a/Tests/Indicators/TestHelper.cs
+++ b/Tests/Indicators/TestHelper.cs
@@ -75,7 +75,7 @@ public static void TestIndicator(IndicatorBase indicator, st
{
if (!(parts.ContainsKey("Close") && parts.ContainsKey(targetColumn)))
{
- Assert.Fail("Didn't find one of 'Close' or '{0}' in the header.", targetColumn);
+ Assert.Fail($"Didn't find one of 'Close' or '{targetColumn}' in the header.");
break;
}
diff --git a/Tests/QuantConnect.Tests.csproj b/Tests/QuantConnect.Tests.csproj
index 88daa6e7d5f5..3e917b9b5458 100644
--- a/Tests/QuantConnect.Tests.csproj
+++ b/Tests/QuantConnect.Tests.csproj
@@ -4,14 +4,12 @@
AnyCPU
QuantConnect.Tests
QuantConnect.Tests
- net6.0
+ net9.0
..\
AllEnabledByDefault
false
bin\$(Configuration)\
false
- true
- true
true
QuantConnect LEAN Engine: Tests Project - The test collection
CA1707;CA1062;IDE0066
@@ -45,13 +43,20 @@
-
-
+
+
all
+
+
+
+
+
+
+
diff --git a/Tests/app.config b/Tests/app.config
deleted file mode 100644
index 46a3342b6776..000000000000
--- a/Tests/app.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ToolBox/QuantConnect.ToolBox.csproj b/ToolBox/QuantConnect.ToolBox.csproj
index 782dc9c5f97a..52fd576aee02 100644
--- a/ToolBox/QuantConnect.ToolBox.csproj
+++ b/ToolBox/QuantConnect.ToolBox.csproj
@@ -5,13 +5,12 @@
Exe
QuantConnect.ToolBox
QuantConnect.ToolBox
- net6.0
+ net9.0
AllEnabledByDefault
false
bin\$(Configuration)\
true
false
- true
QuantConnect LEAN Engine: ToolBox Project - A collection of data downloaders and converters
CA1062