13206 Commits

Author SHA1 Message Date
JosueNina 5210eed084 Make RunRemoveConsolidatorsRegressionAlgorithm non parallelizable (#9537)
API Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Syntax 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
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
17841
2026-06-16 19:21:50 -03:00
Martin-Molinero 62d63010ab Convert daily resolution market orders to MarketOnClose/MarketOnOpen (#9534)
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>
17837 17838 17836
2026-06-16 13:08:57 -03:00
JosueNina d00e30d6c2 Fix race condition in Isolator cancellation test (#9532)
Research Regression Tests / 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
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
17833 17835
2026-06-15 14:23:38 -05:00
Martin-Molinero 98c59a0a32 Improve flat equity curve analysis solutions (#9529)
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
Python Virtual Environments / build (push) Has been cancelled
17779
2026-06-12 15:51:52 -03:00
Martin-Molinero affb275758 Revert "Market-hours aware intraday consolidation (#9516)" (#9528)
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
Python Virtual Environments / build (push) Has been cancelled
This reverts commit 9b89c166ff.
17776
2026-06-12 09:27:54 -03:00
Martin-Molinero 90261c89ee Few minor fixes for OrderFillsDuringExtendedMarketHoursAnalysis (#9523)
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
Python Virtual Environments / build (push) Has been cancelled
* Few minor fixes for OrderFillsDuringExtendedMarketHoursAnalysis

* Minor cleanup
17768
2026-06-11 11:49:56 -03:00
JosueNina 9b89c166ff Market-hours aware intraday consolidation (#9516)
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Python Virtual Environments / 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
* Add market-hours aware intraday consolidation to MarketHourAwareConsolidator

* Minor fix

* Address review comments

* Assert consolidated bar size in regression algorithms

* Move MarketHourAwareConsolidator to Data.Consolidators namespace

* Remove accidentally committed log file

* Keep MarketHourAwareConsolidator in Data.Common namespace
17766 17767
2026-06-11 10:02:26 -03:00
Martin-Molinero 02d0dfac45 Minor MarketHourAwareConsolidator tweak (#9517)
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
Python Virtual Environments / build (push) Has been cancelled
17765
2026-06-09 09:47:08 -03:00
Roman Yavnikov 02656df2ae feature: add bloomberg fix brokerage model (#9494)
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
Python Virtual Environments / build (push) Has been cancelled
* feature: add bloomberg fix brokerage model

- supports Equity, Option, Future
- Market, Limit, StopMarket, StopLimit order types
- margin-only account type

* feat: support MOO in  BloombergFix
17764
2026-06-08 17:52:16 -03:00
Jhonathan Abreu 23af4cbcd8 Add support for report log type (#9511)
* Add support for report log type

* Minor changes and improvements

* Minor fix
2026-06-08 15:12:48 -04:00
Martin-Molinero f4131bb3fa Minor quotebar constructor tweak (#9515) 2026-06-08 13:57:16 -03:00
laur89 9b6203ceca task: remove extraneous defaults from Isolator/MonitorTask (#9514)
* task: remove extraneous defaults from Isolator/MonitorTask

- ExecuteWithTimeLimit -- the only user of private MonitorTask --
  already defines the defaults for memoryCap & sleepInterval

* fix: typos
2026-06-08 13:56:37 -03:00
JosueNina b27d79a081 Fix PandasColumn equality wrongly matching non-string values (#9509) 2026-06-04 17:45:42 -03:00
Roman Yavnikov 24afc50dbe feature: add webull brokerage core integration (#9362)
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
Python Virtual Environments / build (push) Has been cancelled
* feature: add webull brokerage core integration

- add BrokerageName.Webull enum value
- add WebullBrokerageModel supporting Equity, Option, IndexOption
- add WebullFeeModel with zero commission for equity/option, tiered index option fees (SPX, SPXW, VIX/VIXW, XSP, DJX, NDX/NDXP), 0.6% crypto fee
- register Webull in IBrokerageModel factory switch and GetBrokerageName
- add webull config keys and live-webull environment to Launcher/config.json
- add WebullBrokerageModelTests (CanSubmitOrder, GetFeeModel)
- add WebullFeeModelTests covering all index option tiers and crypto

* refactor: split webull supported order types per security type

- replace flat _supportSecurityTypes/_supportOrderTypes with _supportedOrderTypesBySecurityType dictionary
- options and index options: Limit, StopMarket, StopLimit only
- equity, future, crypto: Market, Limit, StopMarket, StopLimit, TrailingStop
- add WebullOrderProperties with OutsideRegularTradingHours flag
- add messages for unsupported order type validation

* fix: add market order type to option and index option supported orders

* chore: add webull crypto symbols to symbol-properties-database

* test: consolidate webull fee model and brokerage model tests

- merge per-tier and per-symbol [Test] methods into [TestCase]/[TestCaseSource] parameterized tests in WebullFeeModelTests
- replace CreateIndexOptionSecurity/CreateOptionSecurity/CreateCryptoSecurity with single CreateSecurity(SecurityType, decimal, string) helper
- rename test methods to PascalCase (drop underscores) in WebullBrokerageModelTests
- remove section-separator comments from WebullBrokerageModelTests
- update Launcher/config.json for local Webull UAT environment

* remove: restriction GTC for Option and Buy side only

* refactor: limit webull to equity and options

- remove crypto and future support from order types and tests
- remove crypto fee logic and crypto symbol-properties rows
- reject market orders with outsideRth on equity
- log info when market order uses non-day tif
17757 17758 17762 17761 17759 17760
2026-05-29 22:49:58 +03:00
Alexandre Catarino 96a670a90b Add EMSX locate properties to TerminalLinkOrderProperties (#9502)
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
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Add LocateBroker (string) and LocateId (string) so algorithms can attach
Reg SHO locate information to short equity sales routed through Bloomberg
EMSX. These map to the EMSX_LOCATE_BROKER and EMSX_LOCATE_ID fields on the
EMSX order ticket (LocBrkr / LocId). The TerminalLink brokerage emits
EMSX_LOCATE_REQ = "Y" automatically whenever either identifier is set on
a short equity sale, so no separate "required" flag is exposed here.

Without these properties the TerminalLink brokerage has no way to identify
the lender on a short sale, and prime brokers reject the order.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17755 17756
2026-05-29 09:52:16 -03:00
JosueNina e1488ca133 Fix PM-settled index options settlement time on 3rd Friday (#9504)
Python Virtual Environments / 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
API Tests / build (push) Has been cancelled
* Fix PM-settled index options settlement time on 3rd Friday

* Add unit tests

* Fix 0DTE PM-settled index options expiry at 4:00 PM ET
17752 17754 17753
2026-05-28 14:07:39 -03:00
Derek Melchin 0f4cbbc8d4 Add optimization analysis (#9495)
* Add optimization analysis

* Address feedback

* Remove redundant CurveType

* Address feedback pt 2

* Address review pt 3

* Address review pt 4

* Removed redundant properties

* Add Interpretation member
2026-05-28 14:00:14 -03:00
JosueNina b68e9c8b60 Fix UniverseHistory filtering when selection security type differs from data security type (#9501)
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / 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
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
17750 17751 17749
2026-05-26 18:21:03 -03:00
Rudy Osuna 261366a7e2 Add VIX Mini Futures (VXM) Support (#9400)
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
Python Virtual Environments / build (push) Has been cancelled
* Add VIX Mini Futures (VXM) support

Adds complete LEAN support for VIX Mini Futures (VXM) traded on CBOE:
- Add Futures.Indices.VIXMini = "VXM" constant
- Add expiry function: 30 days before third Friday of following month
- Add symbol properties: multiplier 100, tick 0.01 (USD)
- Add 15 test date pairs for 2023-2025 to FuturesExpiryFunctionsTestData.xml
- Add [TestCase(VIXMini, EightOClockChicagoTime)] to IndicesExpiryDateFunction test
- Add market hours configuration mirroring VX trading hours

Closes QuantConnect/Lean#6655

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Fix VXM expiry holiday validation and add margin file

- Replace single `if` holiday check with `while` loop using
  `IsCommonBusinessDay()` to ensure the computed expiry date
  is always a valid tradable day (not just one step back)
- Fix test data: 2025-03-19 -> 2025-03-18 (April 18 2025 is
  Good Friday, a CFE holiday, shifting the expiry back)
- Add Data/future/cfe/margins/VXM.csv margin file

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
17747 17748 17746
2026-05-22 10:10:17 -03:00
Alexandre Catarino 932fb7e364 Fix Feeder Cattle (GF) tick size to $0.00025/lb (#9492) (#9493)
GF's minimum_price_variation in the symbol-properties database was
0.025 (cents per pound), inconsistent with every other livestock entry
which uses dollars per pound. CME's official spec is $0.00025/lb
($12.50/tick on 50,000 lb), matching LE and HE.

With price_magnifier=100 the prior value produced an effective per-
contract tick value of $1,250 instead of $12.50, putting algorithm-
rounded prices on a grid 100x coarser than the exchange grid and
causing rejected/unreachable orders on GF.

https://www.cmegroup.com/markets/agriculture/livestock/feeder-cattle.contractSpecs.html
2026-05-22 09:51:46 -03:00
JosueNina a2537513bd Fix ScheduledUniverse emitting triggers past end time (#9490)
Benchmarks / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Build & Test Lean / 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
API Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Fix ScheduledUniverse emitting triggers past end time

* Minor fix
17735 17736 17737 17738 17739 17740 17741 17742 17744 17745
2026-05-19 13:12:35 -05:00
Jhonathan Abreu 65aecb4fb0 Support indexing memoizing enumerable (#9489)
Regression Tests / build (push) Has been cancelled
Report Generator Tests / 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
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Support indexing memoizing enumerable

Pass MemoizingEnumerable to universe selectors

* Add CastingEnumerable class

* Minor change
17734
2026-05-18 18:12:45 -03:00
Roman Yavnikov d2daf42d34 feature: map exchange string to primary exchange on level one ticks (#9488)
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
Python Virtual Environments / build (push) Has been cancelled
- add saleCondition/exchange overload to UpdateQuote
- normalize exchange via GetPrimaryExchange in UpdateQuote/UpdateLastTrade
- cover exchange mapping with combined test
17733
2026-05-15 17:59:00 -03:00
JosueNina 9046162f77 Fix OnWarmupFinished algorithm time alignment (#9445)
* Align OnWarmupFinished time to StartDate when ScheduledUniverse skips midnight

* Align algorithm time to StartDate before OnWarmupFinished fires

* Apply warmup time alignment fix to LiveSynchronizer

* Minor fix

* Skip warmup pulse if algorithm not locked

* Fix OnWarmupFinished timing in live trading
2026-05-15 10:08:49 -03:00
JosueNina 0c874dae3f Fix SessionConsolidator skipping bars when updated manually (#9478)
* Fix SessionConsolidator skipping daily bars on manual Update

* Fix SessionConsolidator bar timestamp when no data arrives for a trading day

* Address review comments

* Minor fix

* Move initialization logic to start of AggregateBar
2026-05-15 09:57:46 -03:00
JosueNina 0df0e67cd1 Add deterministic counter to universe symbol ticker for stable sort order (#9487)
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
Python Virtual Environments / build (push) Has been cancelled
17732
2026-05-14 09:35:01 -03:00
JosueNina 636853fe3e Add CBOE index entries to MHDB and SPDB (#9482) 2026-05-14 09:31:09 -03:00
Martin-Molinero 1978080820 Replace SharpZiplib for new archive (#9481)
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Regression 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
17721 17723 17727 17730 17731
2026-05-12 18:40:34 -03:00
Martin-Molinero 3d87e39c95 Update pythonnet package version to 2.0.54
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
Python Virtual Environments / build (push) Has been cancelled
17719
2026-05-12 14:06:51 -03:00
Martin-Molinero 163de7d379 Minor backtest analysis fixes (#9479)
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
Python Virtual Environments / build (push) Has been cancelled
17717
2026-05-12 12:01:52 -03:00
Alexandre Catarino 521b3335fa Throw clear error when add_data first argument is not a custom data class (#9473)
* 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.
2026-05-12 11:44:40 -03:00
Alexandre Catarino 4717e320c3 Default to all market hours when no symbol is provided to time rules (#9470)
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
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Default to all market hours when no symbol is provided

Add no-symbol overloads of `AfterMarketOpen`, `BeforeMarketOpen`,
`AfterMarketClose` and `BeforeMarketClose` so scheduled events can be
defined without referencing a specific security. Per-date, the helpers
pick the earliest open / latest close across the algorithm's
non-always-open exchanges, falling back to US equities (SPY) when no
eligible security is subscribed. US equities are skipped during the
walk since SPY's exchange hours already represent them.

Closes #9461.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Test that option contracts dedupe to one exchange hours entry

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17716 17715
2026-05-11 09:55:45 -03:00
Jhonathan Abreu 3806e81388 Add Count property to MemoizingEnumerable (#9468)
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
* Add Count property to MemoizingEnumerable

* Update Pythonnet version to 2.0.54
17713 17714
2026-05-08 16:10:58 -04:00
JosueNina db8dd817cd Remove Symbol/str mypy suppression (#9472) 2026-05-08 15:51:45 -03:00
Martin-Molinero 3356c73d12 Set initial universe selected value (#9471)
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
Python Virtual Environments / build (push) Has been cancelled
17712
2026-05-08 13:48:29 -03:00
Roman Yavnikov 11f502d551 fix: update binance-fwebsocket-url to /private/ws (#9466) 2026-05-08 13:03:28 -03:00
JosueNina 63720f4504 Fix snake_case error messages for Python algorithms (#9345)
* Fix snake_case error messages for Python algorithms

* Minor fix

* improve FormatCode robustness and fix test state isolation

* migrate QCAlgorithm inline messages to Messages classes

* Solve review comments

* Minor fix

* Fix broken regression tests

* Minor fix

* Minor fix

* Add FormatCodeRoot helper for Python self-referenced properties

* Address review comments

* Minor fix
2026-05-08 11:41:25 -03:00
Martin-Molinero 329d91ba0e Update mypy (#9469)
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
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
17710 17711
2026-05-07 14:38:36 -03:00
JosueNina 421d3c3448 Fix RollingWindow element order corruption on resize (#9449)
Benchmarks / 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
Build & Test Lean / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
* Fix RollingWindow resize

* Fix MarketImpactSlippageModel

* Reorder RollingWindow list in place
17708 17709
2026-05-07 10:41:05 -03:00
Jhonathan Abreu 6c2c4d5192 Minor python syntax check improvement (#9452)
* Minor python syntax check improvement

* Update expected success rate
2026-05-07 09:55:15 -03:00
Alexandre Catarino e81cdf541d Allow SetAccountCurrency after SetCash without throwing (#9457)
* Allow SetAccountCurrency after SetCash without throwing

Previously, calling SetAccountCurrency after SetCash threw an
InvalidOperationException. The portfolio manager now switches the
base account currency in place: the previous Cash entry (and its
balance) is preserved in the CashBook, and a notice is logged. When
the new account currency matches the existing one, an optional
startingCash overrides the previously set amount and the override
is logged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Simplify SetAccountCurrency remarks and drop unused message

Tightens the XML remarks to two cases (different currency: keep previous
in its own entry; matching currency: override). Also removes the now
unused CannotChangeAccountCurrencyAfterSettingCash string since the
portfolio no longer throws.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Simplify in-line comment in SetAccountCurrency

Drops the "Undo that migration" wording (residue from a previous fix
attempt) and just describes what the branch does: keep the previous
balance in its own currency entry while the new account currency starts
at zero.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Differentiate implicit vs explicit SetCash on account currency switch

SetCash(decimal) is currency-agnostic: the amount is "this many units of
the (eventual) account currency". Switching the account currency now
re-labels the amount onto the new currency instead of preserving the
previous one. SetCash(symbol, ...) for the current account currency keeps
the old behaviour of preserving the balance in its own CashBook entry.

Splits the existing tests by overload and adds a starting-cash variant
for the explicit case.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Mark base cash explicit on any SetCash(symbol, ...) call

Broaden _baseCashSymbolSetExplicitly so any call to the explicit-currency
overload signals the user is committing to named currencies, not just
calls whose symbol matches the current account currency. SetAccountCurrency
then preserves the previous base-currency balance in its own CashBook
entry whenever the user has touched the explicit overload at all.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 09:54:20 -03:00
Derek Melchin 9d464c0900 Update StandardDeviation docs (#9464) 2026-05-06 19:09:53 -03:00
Alexandre Catarino 6035c1cf09 Add DateRules.QuarterStart and DateRules.QuarterEnd (#9454)
Closes #9453

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 19:07:05 -03:00
Alexandre Catarino 8647de0dc6 Add WaveTrend Oscillator indicator (#9429)
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>
2026-05-06 17:19:00 -03:00
Alexandre Catarino 2302a24262 Respect caller-provided User-Agent in Api.DownloadBytes (#9458)
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
Python Virtual Environments / build (push) Has been cancelled
Skip setting the default "QCAlgorithm.Download(): User Agent Header"
when the caller already supplied a User-Agent in the headers dictionary.
The check uses HttpRequestHeaders.Contains, which matches header names
case-insensitively per the HTTP spec.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17706
2026-05-06 16:26:52 -03:00
Martin-Molinero afd62cda32 Minor initialization weak (#9460)
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
Python Virtual Environments / build (push) Has been cancelled
17705
2026-05-06 15:57:09 -03:00
JosueNina 3f5eefd879 Fix IResultHandler.RuntimeError not stopping the algorithm (#9444)
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
* Fix IResultHandler.RuntimeError not stopping the algorithm

* Minor fix
17695 17698 17699
2026-05-04 10:46:43 -03:00
JosueNina 779a7c06c5 Fix PortfolioStatistics WinRate/LossRate documentation (#9431)
* Fix PortfolioStatistics win/loss inconsistency

* Update regression algorithms

* Revert changes

* Fix PortfolioStatistics win rate XML documentation
2026-05-04 10:27:41 -03:00
Roman Yavnikov 870f96dcaf fix: add AJY/ANE/ECD future-option expiry definitions (#9448)
Benchmarks / 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
API Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* fix: add AJY future-option expiry definition

- map AJY (AUD/JPY) FOP to SecondFridayBeforeThirdWednesdayOfContractMonth
- prior fallback to the AJY HMUZ-only future expiry collapsed serial-month FOPs (e.g. AJYN6) into their underlying quarterly Symbol

* fix: add ANE and ECD future-option expiry definitions

- map ANE (AUD/NZD) and ECD (EUR/CAD) FOPs to SecondFridayBeforeThirdWednesdayOfContractMonth
- prior fallback to the HMUZ-only future expiry collapsed serial-month FOPs into their underlying quarterly Symbol
17692 17693 17694
2026-05-01 18:47:06 +03:00
Roman Yavnikov daf0939e6c fix: add EAD future-option expiry definition (#9446)
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
Python Virtual Environments / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
- map EAD (EUR/AUD) FOP to SecondFridayBeforeThirdWednesdayOfContractMonth
- prior fallback to the EAD HMUZ-only future expiry collapsed serial-month FOPs (e.g. EADN6) into their underlying quarterly Symbol
17690 17691
2026-04-30 20:52:07 +03:00