Report Generator Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Improve error message when consolidator period Python object is unsupported
* Make unsupported consolidator period error message more concise
* Apply descriptive Python conversion errors to other user-facing sites and add QuoteBarConsolidator.FromResolution
* List available overloads in unsupported Python argument error messages
* Update QuantConnect.pythonnet to 2.0.61
* Update overload hint test expectations to Python-typed signatures
* Exclude PyObject overloads from error hints and update to Python annotation style
* Move PyObject overload filtering from consumers into MethodSignatureFormatter
* Update Python alpha model name expectations for Python-style enum rendering
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Update QuantConnect.pythonnet to 2.0.57
* Update NoMethodMatch interpreter tests for pythonnet 2.0.57 snake_case method names
pythonnet 2.0.57 renders the method name in the 'No method matches given
arguments' TypeError in snake_case (e.g. 'for set_cash:' / 'for rsi:'),
matching the name Python callers use. The interpreter extracts it correctly;
only the tests' hardcoded PascalCase expectations (SetCash, RSI) were stale.
Assert the snake_case names the API now emits.
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Registering an indicator or consolidator for a symbol that had not been
subscribed to threw 'Please register to receive data for symbol ...'.
Order submission already auto-subscribes the symbol on the user's behalf;
this applies the same behavior to indicator/consolidator registration.
GetSubscription now adds the security automatically when it has no
subscription (guarded by the shared CanAutoAddSecurity check, which is
also used by order submission) before falling back to the error. The
subscription lookup is exposed via a TryGetSubscription out-parameter
helper.
Python Virtual Environments / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
* Convert daily resolution market orders to MarketOnClose/MarketOnOpen
A market order placed intraday (e.g. through a scheduled event) on an
asset subscribed only at daily resolution has no fresh intraday price to
fill against, so it was filling at the stale previous daily close. This
is common when mixing daily resolution assets with minute resolution
assets or intraday scheduled events.
QCAlgorithm.MarketOrder now converts these orders so they fill at a real
daily open/close instead of the stale previous close:
- market closed (any resolution): MarketOnOpen, as before
- market open, daily-only subscription: MarketOnClose (today's close),
or MarketOnOpen (next open) when already within the MarketOnClose
submission buffer near the close
Assets with intraday data are left untouched, and the conversion is only
applied in backtesting; in live trading an open-market market order fills
at the real current price.
Adds DailyResolutionMarketOrderConversionRegressionAlgorithm covering the
MarketOnClose and MarketOnOpen conversion paths plus a minute resolution
asset that is correctly left as a regular market order.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Minor fix
* Reword conversion warning: "current market price" instead of "real current price"
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Update regression stats affected by daily market order conversion
Daily-resolution market orders placed intraday are now converted to
MarketOnClose/MarketOnOpen so they fill at a real daily open/close
instead of the stale previous close. This shifts the affected fills:
- IndexOptionCall{ITM,OTM}ExpiryDaily: the SPX option entry, placed one
minute after the open, now fills at the daily close. Same economics,
one extra data point and a new order list hash.
- AllShortableSymbols (C# + Python): an intraday order's type changed
from Market to a converted order; identical End Equity, new hash.
- ResolutionSwitchingAlgorithm sampling test: the RemoveSecurity
liquidation (fired at 15:50) previously filled at the stale previous
close; it now converts, shifting the equity/performance samples.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Revert expected data point count change
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Throw clear error when AddData is called with a non-class first argument from Python
Calls like self.add_data("VIX", Resolution.DAILY) routed through CreateType, which
silently built a dynamic assembly named after the string and returned a fake type
whose activator factory tried to invoke the str like a function. The downstream
'str' object is not callable PythonException surfaced confusingly (and could
manifest as an apparent hang depending on where it was caught), making the actual
mistake hard to diagnose.
Validate the PyObject up front via TryCreateType in the AddData(PyObject, ...)
entry points and throw an ArgumentException pointing the user at AddEquity /
AddForex / etc. when the argument is not a custom data class.
* Improve the error message
Use only two alternative methods as examples, as we don't need an exhaustive list.
Implement WaveTrendOscillator (bar indicator) per the linked issue. Adds
the indicator class, the WTO helper in QCAlgorithm.Indicators.cs, unit
tests inheriting CommonIndicatorTests<IBaseDataBar>, and the reference
CSV under Tests/TestData/.
The oscillator is computed from the typical price (HLC/3): an EMA
smooths it (ESA), a second EMA tracks its absolute deviation (D), the
normalized channel index (HLC3 - ESA) / (0.015 * D) is smoothed by a
third EMA to produce WT1, and an SMA of WT1 produces the signal line
WT2. Crossovers between WT1 and WT2 are commonly used as entry and exit
signals for momentum reversals.
Reference values were generated with TA-Lib (talib.EMA + talib.SMA)
following the script posted by @LouisSzeto in the issue thread.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Use universe settings when adding derivatives
Use resolution, fill forward and extended market hours settings from universe settings when adding derivative securities (options, index options, futures and future options)
* Minor python syntax check fix
* Minor change
* Default resolution from universe settings for common lean types securities
* Minor test fix
* Cleanup
* Fix HistoryRequest DataMappingMode default to use security configuration
* Solve review comments
* Make HistoryRequest inherit existing subscription configuration values generically
* Exclude any class that inherits from BaseChainUniverseData
* Reuse existing filter for user configuration
* Solve review comments
* Normalize DataMappingMode
* Minor fix
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Implements Covariance as Lean Indicator
* Add COV helper method and fix AcceptsVolumeRenkoBarsAsInput test
* Fix AcceptsRenkoBarsAsInput test to use smaller period for faster execution
* Fix slow Renko tests by limiting data processed to 50 rows
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Refactor optimization result stats serialization
* Handle custom optimization statistics serialization
* Support custom statistics
* Support newest Lean statistics
Address peer review
* Add more tests
* Make indices reserved statistic names
* Minor fixes and cleanup
* Refactor ApiClient to use HttpClient
* Minor fix
* Refactor and cleanup in ApiConnection
* Add normalized extension methods for string and stream json serialization
* Minor fixes
* Address peer review
* Minor fixes
* Minor fixes and peer review
* Race condition fix
* Minor changes
* Cleanup
* Minor fixes
* Minor fix
* Centralize Python/C# model detection logic
* Improve helper method
* Remove unnecessary conditionals
* Fix unit tests
* Refactor QCAlgorithm.python.cs to use the new helper method for models
* Solve review comments
* Clean up Python wrapper exception
* Update XML comments to better describe T and TWrapper in CreateModelOrWrapper
* Join unit tests in TestCases
* Solve review comments
* Replace manual TryConvert checks with CreateInstanceOrWrapper helper
* Docs(Algorithm): Add XML code references
Adds XML documentation tags (<see/>, <paramref/>) to code
references within the Algorithm folder. This improves code
navigation, IntelliSense, and helps the stubs generator tool
to correctly map C# elements.
Resolves#9016
* Fix missing newline at end of QCAlgorithm.cs
* Update print statement from 'Hello' to 'Goodbye'
* Fix documentation for market parameter in crypto methods
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Add SeedInitialPrices algorithm setting
This is true by default and indicates that the engine will seed initial prices right after the security is added or selected
* Update regression algorithms
* Update regression algorithms
* Update regression algorithms
* Refactor default securities seeding
* Minor fix
* Minro fixes
* Cleanup
* Updated and add regression algorithms
* Address peer review
* Centralize logic to get last known data for multiple securities
* Some cleanup
* Minor build fix
* Minor fixes
* More logic centralization
* Some more cleanup
* Cleanup
* Update regression algorithms and minor fixes
* Update regression algorithms
* Minor fix
* More minor fixes
* Update regression algorithms
* Cleanup
* Minor test fix
* Address peer review
* Minor fix and performance improvement
* Fix to seed open interest data
* Minor test fixes
* Address peer review
* Minor change
* Minor revert
* Minor fixes and improvements
* Disable initial seeding by default
* Minor fixes
* Cleanup
* Cleanup
* Minor fix
* Refactor user define universe handling
- Normalize user define universe additions and removals to behave like
other subscriptions without requiting special handling
* Minor fixes
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Initial solution
* Solve review comments
* Add PythonSelectionModelHandler to reduce code duplication
* Refactor universe selection models
* Add python instance to Selection Models with virtual/override methods
* Add python instance to Alpha Models
* Add python instance to Execution models
* Solve review comments
* Solve new review comments
* Fix calling SetPythonInstance only when method exists and is callable
* Use unit test instead of regression algorithms
* Solve review comments
* Set python instance to the models
* Initialize Python containers only when instance is set
* Replace try-catch with explicit method existence check
* Initialize containers in BasePythonWrapper only when needed
* Add null instance check before method invocation
* Refactor TryExecuteMethod
* Refactor Python wrappers which inherit from BasePythonWrapper<>
* Solve review comments
* Remove ununsed methods
* Solve review comments
* Add optional strict parameter to PivotPointsHighLow indicator for relaxed comparison
- Added bool strict parameter (default true) to PivotPointsHighLow constructors
- When strict=true: Uses strict inequalities (> and <) - existing behavior
- When strict=false: Uses relaxed inequalities (>= and <=) - allows equal values
- Updated comparison logic in FindNextLowPivotPoint and FindNextHighPivotPoint
- Added new PPHL overload in QCAlgorithm.Indicators.cs with strict parameter
- Added 5 comprehensive unit tests using TestCase attributes
- All tests pass (19/19 relevant tests)
- Backwards compatible: default behavior unchanged
Addresses #8881
* Fix PPHL method signature to resolve overload ambiguity and maintain API consistency
- Remove wrapper overload to eliminate compilation ambiguity
- Reorder parameters: strict parameter now before resolution
- Keep selector as last parameter (consistent with other indicator helpers)
- Add unit tests verifying no overload ambiguity and correct strict parameter behavior
Addresses PR review feedback on #9033
* Implement backward-compatible PPHL overloads to support strict parameter
Added a second overload to maintain backward compatibility while introducing
the strict parameter. This prevents breaking changes for existing code that
uses positional arguments with the PPHL helper method.
Changes:
- Added backward-compatible overload that accepts (symbol, lengthHigh, lengthLow,
lastStoredValues, resolution, selector) and delegates to the new implementation
with strict: true
- Kept the new overload with strict parameter as the primary implementation
- Added comprehensive test (QCAlgorithmHelperOverloadResolution) documenting all
9 valid call patterns to prevent future regressions
This approach ensures:
- Existing calls like PPHL(symbol, 3, 3, 100, Resolution.Minute) continue to work
- New calls like PPHL(symbol, 3, 3, strict: false) are supported
- No ambiguity in overload resolution
- All 23 PPHL tests pass successfully
* Clean up some test duplication
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Fix settting brokerage model after adding security initializer
* Minor fix
* Minor change
* Minor change
* Send warning for calling SetBrokerageModel before setting or adding security initializer
* Send warning for calling SetBrokerageModel before setting or adding security initializer
* Minor change
* Minor change
* Cleanup