13115 Commits

Author SHA1 Message Date
JosueNina 7333dd3505 Ensure AdvanceTime() runs only after full algorithm initialization (#9284)
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
* Initial solution

* Add regression algorithm

* Solve review comments

* Fix failing unit tests

* Improve comments

* Solve review comments

* Update regression algo

* Minor fix
17541
2026-02-20 16:12:03 -03:00
Jhonathan Abreu e68ee853db Implement indicator-based option price model (#9237)
API 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
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Implement indicator-based option price model

This model uses IV and Greeks indicators to implement Lean's own option pricing model

* Minor fixes

* Address peer review

* Minor tests fixes

* Make the indicator based price model the default for options

* Address peer review

* Cleanup and minor changes

* Support indicators configuration for new pricing model

* Some cleanup

* Add QL option price model example algorithm

* Return lean models from static helpers

* Minor tests fixes

* Minor test fixes

* Address peer review

* Cleanup

* Fix unit tests

* Move QL models to OptionPriceModels.QuantLib.*

* Add forward tree helper method
17540
2026-02-19 15:15:25 -04:00
JosueNina 9f6219edd6 add quotes to docker env vars (#9298)
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
17535 17536 17537 17538 17539
2026-02-16 13:55:45 -03:00
Adrian Tkacz c55a064fe0 Fix combo order queue affinity to prevent duplicate brokerage submissions (#9293)
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
* Enhance order request processing by grouping requests and adding concurrency tests

* Minor adjustment

---------

Co-authored-by: Adrian Tkacz <adrian.tkacz@creatdy.com>
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
17534
2026-02-16 11:44:39 -03:00
Adalyat Nazirov 192a093769 JsonConverter for decimal and decimal? types (#9291)
* Create universal JsonConverter for decimal and decimal? types

* use it only for read

* removed unused import
2026-02-16 11:29:19 -03:00
Roman Yavnikov 4d61f42323 Refactor: error/log message (#9297)
* feat: improve error logging

* ref: error msg
2026-02-16 11:28:41 -03:00
Martin-Molinero cb2128be07 Update gh-actions.yml 2026-02-16 10:46:04 -03:00
JosueNina c1daa8de83 Fix: Replace deprecated docker-run-action with manual Docker setup (#9288)
* Migrate from addnab/docker-run-action to manual docker run

* Fix BASH_ENV undefined error

* Fix issue with research-tests

* Minor fix

* Minor fix
2026-02-13 19:56:48 -03:00
JosueNina 7fa3916baf Add generic DownloadData<T> extension methods for deserialization (#9286)
* Add new helper methods to deserialize to T

* Solve review comments

* Minor fix

* Add unit tests
2026-02-13 16:58:49 -03:00
Roman Yavnikov 0212acf927 Feat: support downloading single contract in DownloaderProvider (#9285)
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
* feat: improve symbol parsing for futures/options in downloader

* refactor: symbol parsing and unify ticker handling

* refactor: symbol parsing and loading in BaseDataDownloadConfig
17533
2026-02-13 13:45:10 -03:00
Martin-Molinero a52a580220 Update Packet.cs 2026-02-13 13:39:16 -03:00
Jhonathan Abreu 5e148a06af Add orders associated with closed trades on streaming (#9282)
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
17532
2026-02-12 12:31:56 -03:00
JosueNina a25e041793 Follow up: Fix weights calculation in VBaseSignalExport (#9281)
* Fix weights calculation in VBaseSignalExport

* fix empty portfolio handling

* Refactored signal export to compute and export weights for all portfolio positions, not just update targets.

* Update BuildCsv XML doc to clarify CSV output details

* Clarify comments on portfolio value and empty weights

* Stamp targets as is; we expect that users send all the weights they want to stamp. Extended the demo algorithm to use two positions to better demonstrate the intended usage of the VBaseSignalExport class.

* Minor changes to address PR review comments.

* Minor fix

---------

Co-authored-by: vb-vlb <volodymyr@vbase.com>
Co-authored-by: Volodymyr <vb-vlb@users.noreply.github.com>
2026-02-12 09:42:45 -03:00
Roman Yavnikov dfa3fd3fab feat: warn on manual brokerage orders not tracked by Lean (#9278)
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
* feat: warn on manual brokerage orders not tracked by Lean

Add a warning in DefaultBrokerageMessageHandler to notify users when orders are placed manually through the brokerage and are not observed by Lean. The warning is emitted only once per session and includes a message with documentation guidance.

* refactor: message for unrecognized order warning

* refactor: unrecognized order messaging with brokerage IDs

* refactor: unrecognized order msg
17531
2026-02-11 17:32:45 +02:00
JosueNina 63209a3fd3 Add Python overload for OptionPriceModelResult (#9277)
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
* Add python overload for OptionPriceModelResult constructor

* Solve review comments

* Update regression algorithms
17529 17530
2026-02-10 16:48:57 -03:00
Martin-Molinero 769843b118 Update Packet.cs
Benchmarks / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
API 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
Python Virtual Environments / build (push) Has been cancelled
17527
2026-02-10 12:35:42 -03:00
JosueNina 76e01bbc42 Adds support for custom option pricing models (#9270)
* Initial solution

* Made Greeks a non-abstract class

* Add regression algorithms

* Solve review comments

* Minor fix

* Minor fix

* Remove unnecessary imports

* Fix issues with regression algorithms

* Solve review comments
2026-02-09 12:46:15 -03:00
JosueNina 9e8c2203c1 OrderCommand should use default order properties (#9274)
API Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
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
17526
2026-02-09 09:37:15 -03:00
JosueNina 541513bee4 Add test to verify tick history consistency (#9263)
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Benchmarks / 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 test for tick history consistency

* Add test cases

* Minor fix
17523 17524 17525
2026-02-05 09:48:18 -03:00
Martin-Molinero e0db31dc08 Stop forcing full GC collection when reduced memory (#9267)
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
Report Generator Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
17515 17518
2026-02-04 13:54:27 -03:00
Jhonathan Abreu d329960e5f Enable trades results streaming (#9234)
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Add a temporary benchmark stats sample in live

Allow trades to be written to result file on first day of the deployment before the first daily sample is done

* Enable trades results streaming

* Minor changes

* Make Trade.Id a Guid

* Cleanup

* Sample temporary charts once per hour

* Minor change

* Minor fix

* Minor fix

* Minor fix

* Add fix for potential race condition
17512 17514
2026-02-03 18:46:06 -03:00
Martin-Molinero 2d64537711 Minor regression algorithm fix (#9265) 2026-02-03 17:59:20 -03:00
Martin-Molinero 9cd28a6236 Add WEX optional locate broker order property (#9264) 2026-02-03 16:57:14 -03:00
JosueNina 2504ddbb87 Add one time warning for daily consolidation (#9254)
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 warning for DailyConsolidationUseExtendedMarketHours mismatch

* Solve review comments
17510
2026-02-03 14:56:58 -03:00
Adalyat Nazirov 20736c1e29 Bybit - Allow placing orders of min size (#9261)
* Allow placing orders of min size

* add unit tests
2026-02-03 14:55:38 -03:00
Martin-Molinero 31e247689f Allow specifying PositionSize wolverine order properties (#9257)
Regression Tests / build (push) Has been cancelled
Syntax 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
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
17508 17509
2026-01-30 16:56:17 -03:00
Roman Yavnikov 297207badb feat: add MappedSynchronizingHistoryProvider base class (#9256)
* feat: add MappedSynchronizingHistoryProvider base class

Introduces an abstract class for history providers that handle symbol mapping and time-aligned data slices. Uses IMapFileProvider to resolve ticker changes, provides an abstract method for mapped history retrieval, and overrides GetHistory to synchronize results. Enables nullable reference types and adds documentation.

* Minor tweaks

---------

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
2026-01-30 16:55:10 -03:00
Jhonathan Abreu ecb8e8da41 Fix trades drawdown calculation (#9249)
* Fix trade drawdown calculation

* Cleanup

* Disable MAE. MFE and Drawdown calculation for FlatToFlat and FlatToReduced trade grouping methods

* Minor test fixes
2026-01-30 15:46:41 -04:00
Martin-Molinero c6c4c1edec Fix fundamental security direct access timestamp (#9255)
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
API Tests / build (push) Has been cancelled
- Fix the date used by fundamental data accessed directly through security.
  Updating regression algorithm asserting behavior
17504 17505 17506 17507
2026-01-30 11:41:24 -03:00
Martin-Molinero c02a8faedb Improve Wolverine brokerage model limitations (#9252)
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
Python Virtual Environments / 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
17501 17502 17503
2026-01-29 14:36:12 -03:00
JosueNina e620d3fd7b Replace ':' with '-' in backtest names for API CI (#9251)
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
17500
2026-01-29 14:03:58 -03:00
Martin-Molinero 4b6643312e Allow emtpy BNFCR cash through (#9247)
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
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
17498 17499
2026-01-28 10:53:19 -03:00
Martin-Molinero 4b2f203322 Fix USDC binance crypto future and stable pairs (#9246)
- Minor fix for stable pairs handling without a pair, adding unit tests
- Fix for USDC it's a USD-M crypto future not coin
2026-01-28 09:49:28 -03:00
JosueNina 7eefdebae5 Update signal when rangeBand is zero (#9245) 2026-01-28 09:47:53 -03:00
Jhonathan Abreu 7f17838ad0 Fix crypto future margin model to reflect margin used (#9235)
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
API Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Fix crypto future margin model to reflect margin used

* Minor tests fixes

* Cleanup

* Cleanup
17494 17495 17496
2026-01-27 13:40:36 -04:00
Martin-Molinero 5a1ebcbaad Fix LeanDataWriter Compression method so it supports unicode filenames (#9244) 2026-01-27 14:31:46 -03:00
Martin-Molinero 552511ef58 Fix dydx holdings value (#9243)
Benchmarks / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / 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
Syntax Tests / build (push) Has been cancelled
- dYdX crypto futures holdings value behaves like normal positions qtty
  * price
17491 17492 17493
2026-01-26 16:29:19 -03:00
Jared 8f2fd3d64a Redact local lean error message (#9232)
Redact message in local user's CLI's
2026-01-26 12:56:19 -03:00
JosueNina 609deb2b03 Logging only once price rounding warnings (#9238) 2026-01-26 12:54:33 -03:00
Jhonathan Abreu 7fb246511a Add total performance statistics to live result files (#9224)
Report Generator 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
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Add total performance statistics to live result files

* Truncate closed trades in live results

* Avoid adding totalPerformance to live minute result file

* Deprecated Trade.Symbol in favor of new Trade.Symbols

* Fixes for Trade serialization

* Add trades json serialization tests

* Cleanup
17488 17490
2026-01-16 15:41:35 -04:00
Martin-Molinero 745292c15a Add Async for submit request to string (#9228)
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
17487
2026-01-16 13:44:16 -03:00
JosueNina 22e0e5ddf5 Prevent SessionBar EndTime overflow when Time is DateTime.MaxValue (#9215)
* Fix SessionBar EndTime overflow

* Fix broken tests

* Update python regression tests

* Solve review comments

* Revert changes

* Prevent overflow from Time + Period
2026-01-16 12:07:41 -03:00
Adalyat Nazirov ef94b5affc Add dYdX IoC Time In Force (#9226)
Regression Tests / build (push) Has been cancelled
Research 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
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add `IoC` and update `PostOnly` in `dYdXOrderProperties` with validation logic; add corresponding unit tests.

* change case to use IOC

* more IOC
17486 17485
2026-01-15 17:20:11 -03:00
Martin-Molinero 61e8c63acd Fix dydx camel case (#9223)
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Regression Tests / 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
Report Generator Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
17481 17482 17483 17484
2026-01-14 11:55:29 -03:00
Adalyat Nazirov 1ca7320f2f Add dYdXFutureMarginInterestRateModel (#9221)
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
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Add `dYdXFutureMarginInterestRateModel` and update `GetMarginInterestRateModel` to support CryptoFuture funding rates

* missing import
17479 17480
2026-01-13 18:00:26 -03:00
JosueNina 5b8e54f272 Reduce excessive debug logging in live trading (#9220)
* Reduce excessive logs

* Revert unnecesary log changes
2026-01-13 14:19:40 -03:00
Jhonathan Abreu 26584c2fd0 Stop and delete unused threads in tests (#9219)
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
17477
2026-01-13 13:13:37 -03:00
Roman Yavnikov 48fd4eccff Feat: override ToString() in several Event Args (#9217)
* feat: override ToString() in several Event Args

* fix: typo
2026-01-13 10:00:48 -03:00
JosueNina 75d5cbcf2a Fix: RandomDataGenerator crashes when algorithm is null (#9211)
Python Virtual Environments / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
API 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
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
* Fix NullReferenceException in SecurityService

* Simplify the unit test

* Add unit test for RandomDataGenerator

* Improve unit test name

* Solve review comments
17472 17473 17475 17476
2026-01-12 14:50:01 -04:00
Jhonathan Abreu d702587ad8 Fix SecurityIdentifier properties lazy initialization (#9214)
API Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Syntax Tests / 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
17469 17470 17471
2026-01-09 18:07:26 -03:00