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
* Allow Python option filter functions to return None
The option filter universe is modified in place by the filter methods
(strikes, expiration, etc.), whose return value is only necessary for
chaining. A Python filter function that returns None would kill the
algorithm with a NullReferenceException.
* Allow C# option filter functions to return null and add regression algorithms
Adds C#/Python regression algorithms asserting that option filter
functions are allowed to mutate the universe in place and return
null/None instead of the universe, which is only necessary for chaining.
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 consolidator rolling window event ordering and out of order handling
* Unify DataConsolidated event and expose rolling window to Python consolidators
* Minor fixes
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Add built-in rolling window to all consolidators
* Minor fix
* Add unit tests
* Add Current and Previous properties to consolidators
* Add WindowBase<T> as single source of truth for rolling window logic
* Address review comments on consolidator rolling window
* Fix duplicate window in consolidator wrappers
* Fix Python consolidator equality
* Address review comments
* Make ConsolidatorBase implements IDataConsolidator
* Add IDataConsolidator<T> generic interface to avoid casting Consolidated output
* Revert "Add IDataConsolidator<T> generic interface to avoid casting Consolidated output"
This reverts commit f4bf812f4b26aff2789a8129fb07101962557a2a.
* Address second review round on consolidator rolling window
* Populate consolidator window before firing DataConsolidated events
* Move WindowBase to the Indicators namespace
* Restore original consolidator event ordering
* Recover original Sequential wire-up comment
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
* Use risk-free rate in probabilistic Sharpe ratio
* Extend risk free rate to live report PSR and fix probabilistic sharpe ratio tests
* Update regression statistics
* Update test regression statistics
* Add test asserting Sharpe ratio and PSR consistency
* Use excess returns for live report Sharpe and PSR
---------
Co-authored-by: Kevin-Li-2025 <2242139@qq.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
Python Virtual Environments / build (push) Has been cancelled
* Market orders wait for fresh data instead of filling on stale prices
A market order would previously fill immediately on the most recent
available data even when that data was older than StalePriceTimeSpan
(default one hour), only attaching a warning. This is unrealistic for a
coarse resolution asset (hour/daily) where the latest bar is the stale
previous close when the order is placed mid-bar or via an intraday
scheduled event.
The default fill models (FillModel, EquityFillModel, FutureFillModel) now
wait for fresh data instead of filling on a stale price, but only for hour
and daily resolutions; the order fills when the next bar closes. For
minute/second/tick subscriptions the previous behavior is kept (fill on
the stale price with a warning), since stale data there is a genuine gap
rather than a bar still forming.
Adds HourResolutionMarketOrderStalePriceRegressionAlgorithm, updates the
FillOutsideHours daily expectation, and regenerates statistics for the
hour/daily algorithms whose fills change. FutureOptionDaily buys and
liquidates a day apart now (a same-day buy + liquidate cannot fill on
daily data once stale fills are disabled).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Normalize and correct StalePriceTimeSpan XML docs
The interface and class docs now match and reflect the actual behavior:
the wait-for-fresh-data only applies to hour/daily resolutions, while
minute/second/tick subscriptions still fill on stale data with a warning.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fill resting market orders at the bar open instead of the close
A hour/daily market order that was resting before the current bar opened
(it predates the bar - placed after the previous close or while waiting
for fresh data) now fills at the bar open, the price when trading resumed
(like a MarketOnOpen), instead of the bar close. Orders placed during the
bar still fill at the current/close price, so intraday mid-bar fills are
unchanged. Equity fills are unchanged (resting equity orders are already
converted to MarketOnOpen by QCAlgorithm.MarketOrder).
Adds the shared FillModel.GetMarketFillPrice helper used by the base
FillModel and FutureFillModel, a unit test, and regenerates statistics for
the affected daily/hour futures, index and crypto regression algorithms
(order counts unchanged, only fill prices).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Add regression algorithm asserting resting market orders fill at the bar open
RestingMarketOrderFillsAtBarOpenRegressionAlgorithm buys a daily future on the
bar that delivers it (fills at that bar's close) and submits a liquidation while
the market is closed (overnight pulse, no fresh bar). The liquidation rests and
fills on a later bar at the bar open, not its close - asserting the new
GetMarketFillPrice behavior. The in-bar buy is asserted to fill at the close, for
contrast.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Carry the bar start time on Prices instead of re-reading the cache
Add Prices.Time (the bar start, mirroring BaseData.Time/EndTime), populated from
the source bar/tick in every GetPrices path. GetMarketFillPrice now uses
prices.Time directly instead of a second asset.Cache.GetData() lookup. Behavior
is unchanged (prices.Time equals the previously read cache time).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Add regression algorithm asserting in-session hour orders fill at the latest close
HourMarketOrderFillsAtBarCloseRegressionAlgorithm submits an hour resolution
market order mid-bar (via an intraday scheduled event) while the market is open,
using the default one hour StalePriceTimeSpan. It asserts the order fills
immediately at the latest available bar's close - not waiting and not at the bar
open - since the latest bar is within the stale window. Guards the resting-order
open-fill behavior against affecting ordinary in-session fills.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Regenerate custom fill model algorithm statistics for the open-fill change
CustomModelsAlgorithm and CustomPartialFillModelAlgorithm subscribe SPY at hour
resolution and their custom fill models delegate to base.MarketFill, so resting
orders now fill at the bar open. Regenerate their statistics (C#/Python) and the
inline expected statistics of the PEP8StyleCustomModelsWork test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regression 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
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
* Increase option strike digits precision to 6
- Increase option strike digits precision to 6. Adding unit test
* test:fix: couple of build tests
* fix:test: Asset CUSIP and OrderListHash in Regression Algorithms
* test:fix: several regression algos
* test:fix: old Symbol CUSIPs to new ones
---------
Co-authored-by: Romazes <romazes20@gmail.com>
* Freeze autoray version to 0.7.2 in foundation image
Required for compatibility with pennylane package
* Update foundation image
- Updating foundation image libraries and new libraries and tests
* Some more foundation tweaks
---------
Co-authored-by: Jhonathan Abreu <jdabreu25@gmail.com>
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
Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* feat: new Level One service
feat: new ctor in Tick
fix: missed SetValue in Tick ctor
* refactor: LevelOneService
feat: Tick Event Args
* feat: use aggregator in LevelOneService explicitly
remove: extra TickEventArgs
* feat: ThreadSafeDataAggregatorWrapper
refactor: use ThreadSafeDataAggregatorWrapper in LevelOneService
* feat: generic LevelOne Market Data Manager
refactor: LevelOneMarketData
remove: ThreadSafeDataAggregatorWrapper
* feat: support OpenInterest in LevelOneMarketData
feat: add EventBasedDataQueueHandlerSubscriptionManager in LevelOneServiceManager
feat: handle OpenInterest
* feat: add missed license in BaseDataEventArgs
* feat: create un-subscribe wrapper in LevelOneServiceManager
refactor: TryGetLevelOneMarketData
feat: validate the same Quote data in LevelOneMarketData
* feat: handle nullable value in levelOneMarketData
* feat: handle nullable value in LevelOneServiceManager
* refactor: change location of LevelOneMarketData Service
test:feat: test of LevelOneMarketData
* feat: add SetIgnoreZeroSizeUpdates
* refactor: use ignoreZeroSizeUpdates internally in TryResolvePriceSize
* refactor: position add symbols in collection in LevelOneServiceManager
* fix: validation of IgnoreZeroSizeUpdates setting in LevelOneMarketData
* test:feat: validate UpdateLastTrade with IgnoreZeroSizeUpdates setting
test:refactor: use global DateTime in testCases
* fix:test: missed calculation value in QuoteBar
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
* Normalize universe data frames
Universe and (generically BaseDataCollection) data frames are not normalize and unpacked into a data frame, instead of just creating data frames with the universe lists within it
* Fix unit tests and algorithms to expecte new universe dataframe format
* Fixes
* Add PandasConverter.DataFrameGenerator class
* Pandas data frame generator class fixes
* Add comments
* Housekeeping
* Add attributes to mark classes and properties for pandas processing
* Improve pandas properties expanding
Allow and handle duplicate names
* Use PandasData generalization for Lean common data types
* Add points time as column when converting base data collections to data frames
* Cleanup and minor changes
* Minor change
* Pandas data to get type members on demand
* Move Pandas helper classes to their own files
* Minor changes
* Add flatten argument to python history api
This allows users to decide whether they want fully expanded dataframes for universe and other collection data types. Else, master behavior is kept
* Adding missing changes to last commit
* Update Pythonnet version to 2.0.40
* Add flattent argument to algorithm's OptionChain api
* Minor changes
* Housekeeping
* Minor changes
* Bug fix skipping data collection data points
* Add comment
* Set correct exchange time to OptionUniverse instances
* Address peer review and cleanup
* Cleanup
* Minor changes
* Fix pandas converter to handle list of data with different symbols
* Properly convert list of data into dataframe
Take into consideration data for multiple symbols in the same list
* Cleanup
* Index dataframes by symbol object instead of SID string
* Add symbol equality operator to compare against object
* Exclude "ID" from option chain dataframe
* Minor fix
* Add greeks columns directly in option chain dataframe.
Also add pass-through properties for greek values in OptionUniverse
* Some cleanup
* Minor fix
* Add new QCAlgorithm.OptionChains() method
- Use OptionChains as output
- Add DataFrame to OptionChain and OptionChains
- Rename Greeks classes
- Add ISymbolProvider for classes that have a symbol (IBaseData, OptionContract)
* Unify QCAlgorithmOptionChain API
Also refactor OptionContract to handle: (1) Actual market data and option price model data, and (2) OptionUniverse data
* Pass symbol properties to OptionUniverse option chain from algorithm
* Format OptionContract for dataframe
* Minor fix
* Add multiple option chains api regression algorithms and other minor changes
* Address peer review
Add NullGreeks class: keep ModeledGreeks as internal as possible
* Minor fix and add PandasConverter unit tests
* Peer review: Non-thread-safe Lazy for Python
* Handle Greeks unwrapping by PandasData
* PandasData cleanup
* Add data and other minor changes
* Unit test fix
* Update Pythonnet to 2.0.39
* Cleanup
* PandasData handling children class members
Address peer review
* Fix: indexing symbol conversion in pandas mapper
* Fix pandas mapper to convert string keys to symbol only when necessary
* Cleanup
* Cleanup
* Add PandasColumn python class to handle proper indexing
This allows propery hash and equality between Symbols, C# strings and Python strings
* Minor fixes
* Symbol cache improvements
* Minor fix for cache miss
* Revert PandasMapper reserved names and improvements
* Minor fix
* Revert reserved names
* Minor fix for Symbol equality operators
---------
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
Python Virtual Environments / build (push) Has been cancelled
* Initial options universe with greeks implementation
* Options universe improvements
* Address peer review
* File based options universe fixes and improvements.
- Adjust OptionUniverse start-end times and period.
- Adapt unit tests and some algorithms to pass with new options universe selection.
* Updated options regression algorithms stats for new universe data
* Updated options regression algorithms stats for new universe data
* Updated options regression algorithms stats for new universe data
* Updated options regression algorithms stats for new universe data
* Updated options regression algorithms stats for new universe data
* Option chain provider with new options universe
* Allow canonical option history requests
* Address peer review
* Address peer review
* Fix symbols parsing in OptionUniverse
* Fix universe selection subscriptions start time to not include extended market hours
* Minor changes
* Minor changes
* Peer recommended changes and fixes
* Update regression algorithm stats
* Update regression algorithms stats and minor fixes
* Fix option chain provider history request
* Round option indicators values
* Added option universe csv header property
* Update regression algorithms stats
* Update regression algorithms stats
* Data fixes and regression algos stats update
* Unit test fixes
* Minor changes
* Option chain handling in live trading data feed
* Minor changes
* Added processed data provider
* Fix thread-safety violation in Slice class
* Minor change
* Update options filter universe API to use OptionUniverse data
Add new filter methods for greeks, IV and open interest
* Option filter universe api updates
* Add OptionUniverse history regression algorithms
* Add regression algorithms for new options filter universe api methods
* Added options greeks data and updated regression algorithms
* Address peer review
* Address peer review
* Add more assertions to new options filter api regression algorithms
* Minor performance improvement.
Reduce greeks binomial model steps to 140
* Minor tests updates
* Greeks numerical models performance improvements
* Greeks numerical models performance improvements
* Revert array pool change for option pricing numerical models
* Update default dividend yield provider depending on option type
* [TEST]
* Add helper method con calculate time till expiration
* Use double in price option numerical models
* Implied volatility calculation improvements
- Adjust root finding method accuracy as a factor of the option price
- Use BSM to get a first guess
* Cleanup
* Some regression algorithms and unit tests cleanup
* Regression tests updates after rebasing from master
* Add universe files
* Self review and cleanup
* Minor regression tests updates after rebase
* Fix: set data time zone to same as exchange tz for options universes
* Minor change
* Minor change
* Fix for live trading options universe selection
* Keep underlying when aggregating collections in BaseDataCollectionAggregatorEnumerator
* Update index options regression algorithms stats
* Minor change
* Address peer review
* Memory usage improvements
* Minor build fix
* Minor changes and test fixes
* Cache symbols in OptionUniverse
* Cleanup
* Fix index option creation in OptionUniverse
* Use cached underlying SID when parsing from string
* Abstract symbols cache to BaseDataCollection
* Return actual underlying symbol when mapping decomposing ICO ticker
* Address peer review
* Minor performance improvements reduce garbage
* Limit Symbols and SIDs cache size to help with memory usage
* Minor fix in symbols and sid cache cleanup
* Build fix
* Lazily parse greeks on individual access
* Cleanup and tests
* Address peer review
* Minor greeks fix
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
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
Benchmarks / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Default daily precise end times
- Enable by default daily precise end times. Updating stats
- Minor fix for algorithm manager consolidator updates, adding new regression test
asserting behavior and updating others
- Minor fix for SubscriptionData creator avoid round down on warmup if
not appropiate
- Adjust consolidators to emit on daily strict end times if requested
daily resolution and setting enabled
- Updating regression algorithms
* Skip daily data on extended market hours
* Some cleanup and self review
* Revert unrequired change
* Add algorithm unit tests
* Add Brokerage unit tests
* Add Common unit tests
* Fix unit test bugs
* Add remaining unit tests
* Address requested changes
* Address requested changes
* Fix failing unit test
* Address requested changes
* Fix: python consolidator reference lost when wrapped
* Make BasePythonWrapper equatable depending on the PyObject underlying reference
* Fix: TryConvert PyObject instances for generic C# types
* Minor unit tests fixes
* Address peer review and add unit tests
Report Generator Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- Make sure calling CSharp methods, fields, properties releases the GIL,
this was not hapenning for fiels & properties, adding unit test
reproducing the issue
* feat: support snake-case style Python QCAlgorithm implementations
* feat: add unit tests and minor fixes
* feat: implement new BasePythonWrapper class for python wrappers.
Used to cache methods and contains invoke functionality
* feat: make python wrappers implement the new base class for pep8 style support
* feat: keep overriden methods in Algorithm Python Wrapper
* feat: add unit tests for custom models algorithms with PEP8 style
* Bump pythonnet version to 2.0.30
* fix bugs and address peer review
* Address peer review
* Minor revert
* feat: StubsIgnoreAttribute for ignoring members or classes by the stubs generator
* Minor fixes
* Minor fix
* Minor fix
* Bump pythonnet version to 2.0.31
* Added Greeks.Lambda_ alias of Lambda for python compatibility.
Remove unused method
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
Benchmarks / build (push) Has been cancelled
* Improve consolidator scan
- Improve consolidator scan to be triggered even if no data is present.
Adding new regression test, updating existing
* Adding more tests & minor tweaks
* Delay security removal when there are pending settlements
* Add unit test
* Minor fixes
* Minor fix
* Replace HasUnsettledFunds method with UnsettledCash in ISettlementModel
* Minor fix
* Minor fix
* Address peer review
Replace ISettlementModel UnsettledCash property with GetUnsettledCash method that returns a CashAmount instead of a decimal to include the currency
* Minor fix
* Address peer review
* Improve GetFillModel()
* Add support for other methods
* Add regresion algos and improvements
* Make Python algorithms regression tests
* Improve unit tests
* Minor changes
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
* Add new Order.PriceAdjustmentMode property
* Minor fix and unit test
* Minor fix and regression algorithms' stats update
* Unit test fixes
* Minor fix
* Set order price adjustment mode to raw always for live trading