* 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>
* Fix trade drawdown calculation
* Cleanup
* Disable MAE. MFE and Drawdown calculation for FlatToFlat and FlatToReduced trade grouping methods
* Minor test fixes
* 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
* Fix NullReferenceException in SecurityService
* Simplify the unit test
* Add unit test for RandomDataGenerator
* Improve unit test name
* Solve review comments
* 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
* rebase Add 2026 EUREX, CFE and ICE Holidays
* Remove entries present in generic entry
For some ICE Future entries, there were holidays that were already
present in their generic entry (Future-ice-[*]), so those dates were
removed from the entry
* 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
* Add 2026 HKFE Future holidays & early closes
* rebase Add 2026 Future-cme-equity Holidays, Early closes, late opens
* Add (again) HKFE 2026 Holidays and early closes
* Add Future-cme-interest 2026 holidays
* Add 2026 CME Fx 2026 holidays"
- Add 2026 CME Fx holidays, early closes, late opens, bank holidays
- Exclude CNH, MNH and MIR as they expire rules don't consider US
Holidays
- Fix wrong early close on 12/24/2025 from 12:15 to 12:45
* Add CME Future crypto 2026 Holidays, EC, LO & BH
* Add CME Future Energy 2026 holidays, EC, LO, BH
* Add CME Futures metals holidays, ec, lo, bh
* Add CME Futures grains 2026 holidays, ec, lo, bh
* Add CME Futures Dairy 2026 holidays, ec, lo, bh
* Add CME Futures livestock holidays, ec, lo, bh
* Add CME Future Lumber holidays, ec, lo, bh
* Add CME Futures Softs holidays, ec, lo, bh
* Add CME Futures Oilseeds holidays, ec, lo, bh
* Add CME Futures AW, GD Holidays, EC, LO and BH
* Move repeated bank holidays to generic entries
* Nit change
* Solve bug
Since 11/26/2026 is a bank holiday for CME energy futures, the expiry
date is moved to 11/25/2026 as the expiry date for HH is the third last
business day of the month prior to the contract month
* Return weekly contracts if no standard contracts exist
* Fix unit and regression tests
* Centralize default expiration type flags
* Add ExcludeWeeklys() method
* Mark IncludeWeeklys() as obsolete since weeklies are now default
* 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
* Add Api helper methods for POST requests
* Support json serializer setting for json requests
* Minor changes and cleanup
* Make ApiConnection disposable
* Added python-venv to ReportArgumentParser, getting python-venv in Program class
* Added venv activation and python initialization to Report class
* Resolve review comments. Move python init and env addition to Report/Program.cs
* 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
* add dYdX market constant
* Add dYdX market constant and update symbol properties database
* get Gaz limit from order properties or default value
* wip
* add symbol properties
* add more dydx order props
* update symbol properties
* Add dYdX brokerage and fee model
* Update dYdX configuration fields
* undone meta files
* minor tweaks
* fix file ending
* Add dYdX brokerage support to BrokerageName and IBrokerageModel
* Refine dYdX fee model integration and update configuration defaults
* Replace custom order size validation in dYdXBrokerageModel with DefaultBrokerageModel implementation
* undone changes
* Add market hours for dYdX CryptoFuture
* 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
* fix: use decimal instead long in Scale's LeanData
test:feat: validate naming with large precision
* feat: use normalization in Scale's LeanData
test:fix: strike precisions
* fix: use str normalization in Scale's LeanData
* 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
* 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>
* 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
* 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
* Fix performance degradation on expirying assets
- Options would expire and get removed, when the universe removed the
security it would never be reseted on universe selection, causing
leaks
- Minor improvement for composer assembly loading
- Minor improvement for loading exception interepreters, so it uses
composer
* Minor regression test fix
* Add new benchmark algorithm
* Use Futures Bank Holidays For Expirations
* Minor improvements
- Futures will be stored by their contract month, not expiry
* Delete dairy future products
* Minor test fixes
* 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>
* 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
* Add new QCAlgorithm.AddSecurityInitializer method
This allows to add multiple security initializers without manually creating an instance of a CompositeSecurityInitializer
* Add Python support
* Cleanup
* Fix: Add obsolete flag to AddUniverse coarse+fine
Added obsolete flag to AddUniverse(Func<IEnumerable<CoarseFundamental>, IEnumerable<Symbol>> coarseSelector, Func<IEnumerable<FineFundamental>, IEnumerable<Symbol>> fineSelector), added one time logging and altered docs accordingly.
* Update QCAlgorithm.Universe.cs
---------
Co-authored-by: Martin-Molinero <martin.molinero1@gmail.com>
* Fix ProcessSplitSymbols crash during live mode warmup
Fixes InvalidOperationException when CancelOpenOrders is called during warmup in live/paper trading mode.
When historical splits are replayed during live mode warmup, ProcessSplitSymbols attempts to cancel open orders for option contracts, but CancelOpenOrders throws an exception during warmup.
The fix adds an early return when algorithm.LiveMode && algorithm.IsWarmingUp. This is safe because in live/paper trading, current positions already reflect historical splits.
Includes unit tests validating the fix.
* Some improvements and more tests
- Ignore splits during warmup for backtesting and live trading. Adding a
regression algorithm reproducing issue
* Minor fix
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Minor fix for negative rolling window index
- Minor fix for negative rolling window index when partially full,
adding unit test
* Reduce RefreshesSymbolProperties test runtime
* 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>
* feat: support new OrderType in TastytradeBrokerageModel
* feat: extension GetGroupQuantity
* refactor: WaitOneAssertFail to return bool
* refactor: GetOpenOrders in BrokerageTests
* feat: display holdings when begin/end test run
* refactor: brokerageTest class to support handle combo order
feat: comboOrderTestParameters
feat: tastytrade option strategy algo
* refactor: Tastytrade Algo BullCallSpread
* feat: Bull/Bear-CallSpread test cases in BrokerageTests
feat: ComboLimitOrderTestParameters
* fix: remove static in ComboLimitOrderTestParameters of ExpectedStatus
* feat: restrict submit combo limit cross zero orders in Tastytrade
test:feat: submit combo limit cross zero test cases in tastytrade
* test:fix: missed test helper to c9907b23
* refactor: GetGroupQuantityByEachLegQuantity
feat: overload GreatestCommonDivisor
test:feat: GetGroupQuantityByEachLegQuantity
* test:feat: extra test cases to GetGroupQuantity to 925c214a
* test:refactor: take out Cancel Status update in HandleEvents()
* feat: prop Direction in Leg
* Revert "feat: prop Direction in Leg"
This reverts commit 4f92f97b63.
* refactor: ComboLimitOrderTestParameters
* test:refactor: CancelOrders
* test:feat: add missed xml description
* test:feat: support ModifyUntilFilled Combo orders
* test:feat: Long/Short-Combo unit tests
* test:fix: compare all status if it is combo order type
* test:refactor: applyOrderUpdate in gracefully way in LimitOrderTestParameters
* remover: Tastytrade algo
* test:feat: create new BaseOrderTestParameters with helper methods
test:rename: method in ComboOrderTestParameters
test:remove: duplication
* Fix extended hours only days period history
Don't include extended hours only days in date range calculated fro period history request
* Add comments
* Cleanup
* Revert some changes
* Cleanup
* Add VBaseSignalExport
* Add a VBaseSignalExport feature that allows signals to be stamped with the help of the ValidityBase REST API.
* Addressing review comments
* Create DefaultApiBaseUrl const in VBaseSignalExport
* Add vbase signal export demonstration algorithm
* Set initial parameters for VBaseSignalExportDemonstrationAlgorithm
* Refactor VBaseSignalExport and demonstration algorithm: update symbol list, extend end date, and improve API base URL handling
* Initialize allowed security types in VBaseSignalExport and fix symbol reference in CSV generation
* Adjust rate limiter for vBase signal export to allow 6 requests per hour for better performance
* Minor tweaks
---------
Co-authored-by: Volodymyr Bobko <volodymyr.bobko@un.org>
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Implement Session class
* Use MarketHourAwareConsolidator inside Session
* Delete SecurityCacheSessionConfig
* Refactor session class
* Solve review comments
* Fix regression algorithms
* Add null check to AvailableDataTypes
* Update session class
* Solve new review comments
* Add new test for futures and update regression test to PEP8
* Add new regression algorithm for Session with futures
* Resolve review comments
* Add local time keeper to SecurityCache
* Scan on consolidator updates and time updates
* Add new regression algorithms and unit tests
* Add unit tests and improve comments
* Fix syntax test
* Solve review comments
* Add regression algorithms
* Resolve review comments
* Make SessionConsolidator implement IDataConsolidator
* Add caching to avoid recreating SessionBar instances on every access
* Solve review comments
* Make SessionConsolidator inherit from MarketHourAwareConsolidator
* Add unit test to verify Session preserves previous day values
* Update regression algorithms
* Solve review comments
* Resolve review comments
* Solve new review comments
* Add unit test for Session class
* Refactor SessionBar properties and Update method
* Use WorkingDataInstance reference instead of _workingData.Clone()
* Use a delegate to get the workingBar instance
* Fix bug in MarketHourAwareConsolidator
* Solve review comments
* Handle OI values
* Add regression algorithms for future contracts and options
* Solve review comments
* Refactor SessionConsolidator to inherit PeriodCountConsolidatorBase
* Prevent overlapping higher resolution data
* Update tests
* Solve review comments
* Minor tweaks
Submit (and fill in case of market orders) in the same time step even if orders are asynchronous in backtesting since it's data driven instead of real time driven.
* Enable concurrency for paper brokerage.
Implement PaperBrokerageTransactionHandler to handle concurrency for live paper trading transaction handler
* Remove PaperTradingBrokerageTransaction handler
Favor existing BacktestingTransactionHandler
* Minor fixes and cleanup
* Minor unit tests fix
* Add 'asynchronous' parameter to trading api
* Add regression algorithms
* More fixes for asynchronous orders
* Fix failing unit tests
* Fix failing unit tests
* Add multiple orders requests in transaction handler
Make each transaction thread handle requests corresponding to the same order
* Refactor order state machine in BrokerageTransactionHandler
Now using a single dictionary to hold orders and their state, either pending for submission, open or closed.
* Revert: remove complete orders from new state machine in BTH
* Add order ticket to new BTH open orders state machine
* Run syn in Backtesting transaction handler for new orders submission
* Remove OpenOrderState.SubmissionPending property
* Add Security to OpenOrderState
* Minor fix
* Cleanup
* Some cleanup in BTH
* Cleanup
* Minor fix
* Minor unit test fix
* Minor fix
* Make Brokerage.ConcurrencyEnable property virtual
* Minor change
* Cleanup
* Add 'asynchronous' parameter to SetHoldings api
* Improve regression algorithms
* feat: not use CrossZeroOrder for MOO and MOC
* Revert "feat: not use CrossZeroOrder for MOO and MOC"
This reverts commit 1a71c5fe90.
* feat: Not support crossZeroOrderTypes
test:feat: cross zero orders
* Revert "feat: Not support crossZeroOrderTypes"
This reverts commit 16785b5d2f.
* feat: not support CrossZeroOrder in TradeStation
* feat: not allow to place MOO and MOC with CrossZeroOrder
* test:feat: MOO and MOC CrossZeroOrder reject
* Add support for some CME currencies FOPs
Support ADU (6A), GBU (6B), CAU (6C), EUU (6E), JPU (6J), CHU (6S)
* Cleanup
* Consider holidays in FOPs expiry function
* Add tag parameter, update CancelOpenOrders and Liquidate calls
* Resolved commen on the related PR: following the pattern of Liquidate() using Liquidated as default, I think the tag should be Removed
* Add tag parameter to RemoveSecurity and update regression algorithms
* Minor tweaks
---------
Co-authored-by: meysam <poormonfared.azimi@gmail.com>
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Set consolidated bar EndTime to last input's EndTime in count-based consolidator
* Solve review comments
* Move EndTime assignment to base class
* Update unit tests
* initial draft changes
* Saving draft changes for TD Sequential Implementation
* Fixed failing tests
* Refactoring changes
* Additional refactoring to TDSequential
* Added tests
* Incorporated review comments
* reverted changes to older file
* Updated for review comment
* Updated Buy and Sell Setup Perfect functions based on review comment to remove equality operator
* Added SupportPrice and ResistancePrice as read-only public properties to expose the internal _resistance and _support prices
* Changed return value of ComputeNextValue to TomDemarkSequentialPhase instead of the encoded value of Phase.StepCount as per review comment
* Updated initialization to include bullish and bearish flip checks
* Refactored and cleaned up based on review comments
* Some fixes for new C# enums handling in Pythonnet
* Minor changes and cleanup
* Update Pythonnet version to 2.0.45
* Minor changes
* Minor fix
* Minor fix
* Minor change
* Minor change
* Minor unit test fix
* Log the Number of Active Subscriptions Before and After Warm Up #8779
* Refactor: Log subscriptions count once before first timeslice
* Resolve review comments
* Minor cleanup
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* feat: Get AccessToken from Lean API
* feat: create TokenCredentials DTO instead of Tuple
* remove: extra unrequired null reference exceptions on argument check
* remove: SendAsync override in TokenHandler
* feat: override SendAsync in TokenHandler to prevent future bugs
* test:feat: SyncAsync in TokenHandler
* refactor: name property of AccessTokenExpires to Expiration in AccessTokenMetaDataResponse
* feat: add retry logic to getAccessToken in TokenHandler
test:feat: TokenHandler with retry logic
* feat: make retry timeout configurable in ctor
* Changed default async to true and passed target.Tag
* Make execution models place orders asynchronously if specified
* Add unit tests
* Execution model default to asynchronous orders.
Also, minor fixes for tickets remaining fill quantity potential race conditions
* Add SecurityHolding.UnrealizedQuantity property
It gets the holding quantity the security will have once all open orders are filled.
Added for thread safety reasons when execution models place asynchronous orders and need to calculate the actual quantity needed to reach the target of there are open orders
* Some cleanup
* Adjust projected holdings quantity on splits
* Minor fix
* More changes and cleanup
* Minor fix
* Improvements for thread safety
* Add IOrderProvider.GetProjectedHoldings to get projected holdings atomically
* Minor unit tests fix
* Add ProjectedHoldings DTO class
* Address peer review
---------
Co-authored-by: arthiondaena <arthiondaena@gmail.com>
* Implement a prototype of the maximum recovery time function.
* Add unit test skeletons.
* Add failing test
* Issue #4581: Implement MaxDrawdownRecoveryTime.
* Issue 4581: Add DTO for Drawdown Percentage, Drawdown Enddate, and High Value
* Issue 4581: Fix bgu for when lDrawdowns list is empty.
* Issue 4581: Change names of tests. Change name of file.
* Issue 4581: Make adjustements to flow of adding drawdowns to lDrawdowns.
* Issue 4581: Add multiple unit tests.
* Issue #4581: Change name of unit test
* Issue #4581: Add to PerformanceMetrics
* Issue #4581: Add Maximum Drawdown Recovery to PortolioStatistics class.
* Issue #4581: Add to portolfio statistics class.
* Issue #4581: Add to statistics builder.
* Issue #4581: Add report key.
* Case #4581: Convert to decimal.
* Issue #4581: Correct comment.
* Issue #4581: Correct performance metrics view model string.
* Case #4581: Correct statistics builder view model string..again.
* Issue #4581: Placed DradownDradownDateHighValueDTO at the end of the file for simpler diff.
* Issue #4581: Add 2 new tests.
* Issue #4581: Change algorithm so that when multiple maximum drawdowns occur, the longest of all recoveries is reported.
* Issue #4581: Add unit test.
* Issue #4581: Remove reportkey. Change dto name.
* Issue #4581: Change summary.
* Issue #4581: Change comment.
* Add max drawdown recovery calculation with unit tests
* Update regression algorithms with the new metric
* Solve review comments
* Update regression algorithms
* Add TryGet to safely get the key: MaximumDrawdownRecovery
* Ignore MaximumDrawdownRecovery metric in OptimizationBacktest Json
* Revert changes in Messaging
* Update regression algorithms
* Add test case: TakesLongestRecoveryAmongMultipleDrawdowns
* Use integer days for MaximumDrawdownRecovery
* Add MaximumDrawdownRecoveryReportElement
* Use more explicit names
* Rename files and variables for consistency
* Update regression algorithms
---------
Co-authored-by: Alain Schaerer <aschaerer@pcatg.com>
* Use correct sids when reading options/futures universe files
* Introduce new format for options and futures universe files
* Minor change
* Minor data fix
* Minor change
* Fix failing unit tests
* Add options and futures symbols cache
* [HACK] Force use test universe files
* Minor fix for universe symbols cache
* Performance improvements
* Miror change
* Cleanup
* Sort universe files
* Minor regression algorithm fix
AddAndRemoveOptionContractRegressionAlgorithm to not depend on universe file entries ordering
* Add time tolerance when checking if asset is within current bar
* Update IsExchangeOpen and add unit tests
* Solve review comments
* Add unit test in ImmediateFillModelTests
* Delete conditional IsExchangeOpen()
* Fill MOC orders when LocalTime is at or after market close
* Allow multiple concurrent transaction handlers
Also support multiple producers in BrokerageConcurrentMessageHandler
* Minor change
* Minor change
* Add new maximum-transaction-threads config to json file
* Minor naming changes
* Address peer review and add unit tests
* Minor fix
* Minor fix and unit tests
* Address peer review
* Support sub-indicator discovery using IIndicator and exclude PandasIgnore attribute
* WIP: PandasInclude
* Add PandasInclude annotation
* Resolve review comments
* Add a list of ignored properties
* Clean up [PandasIgnore] in IndicatorBase
* 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
* Make RollingWindow compatible with any data type
* Add generic RW<T> method
* Add RollingWindow wrapper class for PyObject
* Solve review comments
* Resolve review comments
* Fill-forward last warmup data point to normal data feed
* Minor clean up
* Minor changes and unit tests
* Address peer review
* Minor changes
* Improve unit tests
* implements Klinger Volume Oscillator
* preserve newest data file
* improve class summary
* address PR comments, add signal line, use RollingWindow to persist data, refactor code to make easier to follow
* add helper method KVO in in QCAlgorithm.Indicators.cs, add Signal test, fix IsReady and WarmUpPeriod
* default signal period for KVO, refactor and improve ComputeNextValue, simplified code
* update comment
* update comment
* Add open interest data to future chains contracts
Even though futures chains and contracts are not created from internal subscriptions data (like OI subscriptions or continuous futures contracts subscriptions), we still want to add OI data to already created contracts given that OI subscriptions are always internal but trade an quote ones are not.
* Minor changes
* Limit supported order types to Market, Limit, and StopMarket in Bitfinex brokerage
* Update brokerage models
* Fix broken unit test
* Solve review comments
* Convert regression algorithm into a unit test
* Resolve review comments
* Update SPDB with Bybit
* Update SPDB with CoinBase
* Update SPDB with Bitfinex
* Update SPDB with Kraken
* Update SPDB with Binance
* Update SPDB with BinanceUS
* Update regression algorithms
* Update SPDB - Binanceus to solve issues with the unit tests
* Initial solution
* Solve review comments
* Fix unit tests
* Resolve comments reviews
* Return a default symbol instead of throwing an exception
* Add unit test
* Ignore some errors in python syntax check.
Fix some algorithms syntax as well.
* Revert some changes
* Minor change
* Minor change
* Minor syntax check fixes
* Ignore more mypy errors
* Minor changes
* Ignore more mypy messages
* Ignore more mypy messages
* Make ExtendedDictionary extend IDictionary
* Revert "Make ExtendedDictionary extend IDictionary"
This reverts commit bbbe9c769be682767cb9e487b904480376b53596.
* Make ExtendedDictionary key a type parameter
* Make SecurityPositionGroupModel an ExtendedDictionary
* Add unit tests
* Minor change
* Add more unit tests and other minor changes
* Add Count and ContainsKey to BaseChain
* Update pythonnet version to 2.0.43
* Update some python regression algorithms
* Minor regression algorithms fix
* Make CashBook and ExtendedDictionary
* Minor changes
* Minor changes
* Update pythonnet version to 2.0.44
* feat: support MOO in CharlesSchwabBrokerageModel
* feat: validate IsMarketOpen with MOO order type in PreOrderChecks
* test:feat: Validate MOO in various Market hours time
* fix: Algo with new MOO time validation
* test:fix: set DateTime of Algo explicitly in OrderQuantityConversionTest
* First attempt
* Improve unit test
* Add suggestions
* Nit changes
* Address requested changes
* Fix failing unit tests
* First attempt to fix API tests
* Fix command
* Address suggestions
* Address minor suggestions
* wip: show work
* refactor: TradeStationBrokerageModel of using OutsideRegularTradingHours
test:feat: OutsideRegularTradingHours
* remove: comboLimit OrderType in IsLimitOrder(...)
* fix: regression algo which test unsupported OrderType in extend market hours
* fix: condition with supportsOutsideTradingHours in CanSubmitOrder
* refactor: regression test with OutsideRegularMarketHours TradeStation
* refactor: TradeStationBrokerageTradeWithOutsideRegularMarketHoursParameter
---------
Co-authored-by: Henry Ennis-Thomas <henry@henryetdev.com>
* test:feat: Assert Lean UnsettledCash and Brokerage.PerformCashSync
test:feat: new PaperBrokerage with manual cash balance
* test:refactor: calculation of Margin
* feat: change DefaultSettlementTime
* test:fix: use right brokerage settlement cash to balance
* test:refactor: use specific time when SettlementModel.Scan happens
* Initial solution: Add an extra conditional in SubscriptionManager and add regression algorithms
* Solve comments review
* Add unit test
* Refactor unit tests in SubscriptionManagerTests
* Resolve comments review
This allows the stubs generator to know when to not generate Union types for parameters that can accept multiple types, like Symbol | str | BaseContract
- To simplify stub generation, merge PythonSlice into Slice, following
existing pattern too, see QCAlgorithm.Python.cs
- Minor sintax fixes in example python algorithms
* Fill forward prev date universe file in manual chains fetch
If there is no universe file available for the current date, use the previous one and fill forward to avoid having empty chains on a day when we haven't generated the universe files
* Try a maximum of 3 days behind for manual chains fetching
* Minor change
* Minor fix
* Add comments
* Minor fix
* Minor fix for expired contracts
* Initial solution
* Create testCases for earlyClose and lateOpen
* Refactor GetExchangeHours and add unit tests
* Update market-hours-database and create a unit test
* Resolve review comments
* Update market-hours-database
* Parallelize the foreach loop to improve test performance
* Adds example of custom signal exports.
- SignalExportManager send signals automatically after 5 seconds.
- Missing example and Python support.
* Updates Examples to Disable Automatic Export
* Addresses Peer-Review
* Initialize securities on re-addition
* Minor unit tests fixes
* Reset Index.ManualSetIsTradable when security is removed
* More changes to clean up and simplify
* Address security re-utilization only
* Cleanup regression algorithms
* Fix QuantBook Option/Future history api date range
Properly calculate date range when passed range is not a whole date but a time of day
* Extended unit tests
* Disable extended market hours for universe history requests
* Exclude extended market hours for all chain universe history requests
* Disable extended market hours for chain universes
* Minor change
* Minor fix
* Minor change
- likely a copy-pasta error from Series, where index=0 is passed to
BaseSeries constructor, only now it was passed as SeriesType, which
is subsequently set in CandlestickSeries constructor
* feat: make static and get; set; of DefaultSettlementDays in Equity,Option
* refactor: reset _lastUnsettledCash depend on settlementDays in UnsettledCashWhenQuoteCurrencyIsNotAccountCurrencyAlgorithm
* FINAL TEST
* Change version
* test commit
* echo commits
* echo last commits before generating stubs
* Fix bugs
* fix more bugs
* fix yaml error
* try with a different version
* Check we can get last commits
* add variables in options
* Echo commits
* tweaks
* More tweaks
* Add an exception
* FINAL TEST
* Make FOPs selection universe file-based for backtesting
* Make FOPs option chains universe file based
* Make Future universe selection file-based like option universe
* Make Future universe selection file-based like option universe
* Abstraction cleanup
* Add FuturesChains API to QC algorithm
Also refactor future chain provider to use the new FutureUniverse instead of zip file names
* Update regression algorithms stats
* Refactor QuantBook option and future history to use new universes
* Fix failing tests
* Fix failing tests
* Fix failing tests
* Minor future chains unit test improvement
* Add futures chains DataFrame property
Also, remove IDerivativeSecurity interface from Future
* Add DataFrame property to FuturesChains class
* Add regression algorithms
* Add regression algorithms
* Replace QCAlgorithm.FutureChainProvider usages with new FuturesChain api
* Minor fixes
* Reduce number of universe files in repo
* Minor data fixes
* Regression algorithms updates
* Add implicit conversion from FuturesContract to Symbol
Modified algorithms to use futures contract objects directly instead of accessing their Symbol property.
Removed unnecessary import statements and redundant lines in various files.
* Improve resolution handling for history requests
* Changed _auxiliaryData field to lazily-initialized AuxiliaryData property
* Refactor data handling in BaseChain and TimeSliceFactory
- Added `AddData` method to `BaseChain` for adding market data
- Refactored `TimeSliceFactory` to use `BaseChain.AddData` method
* Remove specific constructors and indexers from Chain classes
Removed public indexers in `BaseChains` for getting or setting `BaseChain` instances by `ticker` or `Symbol`, which were used for Pythonnet compatibility.
* Remove chain cache logic from FuturesChainUniverse
* Refactor class and interface names for clarity
Renamed `FileBasedUniverse` to `BaseChainUniverseData` and
`IFileBasedUniverse` to `IChainUniverseData`.
* Add base class for options and futures contracts
- Introduced `BaseContract` as an abstract base class for contracts, consolidating common properties and methods.
- Removed ISymbolInterface
* Add minor fix for future options tickers parsing
Added tests
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Clean chain provider classes up
* Remove ZipEntryName other classes and unused code
Removed ZipEntryName class and references across various files.
Removed DataQueueFuturesChainUniverseDataCollectionEnumerator and DataQueueOptionChainUniverseDataCollectionEnumerator classes.
Removed OptionChainUniverseSubscriptionEnumeratorFactory class.
Removed unused code for handling OptionChainUniverse and FuturesChainUniverse in FileSystemDataFeed.cs and LiveTradingDataFeed.cs.
Removed several test files related to enumerator factories and universe data collection.
* Minor changes and cleanup
* Trigger Build
* Trigger Build
* Refactor FuturesContract data handling
Forward price data from bars and ticks stored in private fields for improved memory usage
* Fix: use universe data for market data in FuturesContract
* Update regression algorithms stats after rebase
Added HSI futures universe files
* Sort configs by internal flag
Internals go first
* Throw from option universe data filters for future options
Future options IV, Open interest and greeks are not supported for future options
* Minor changes
* Improve some regression algorithms
* Minor fix for failing unit tests
* Update FOPs universe file header
Removed greeks and IV columns.
Updated FOPs universe files: removed outdated columns.
* Minor unit test fix
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Minor fix
* Add history provider as constructor argument for chain providers
* Update new regression algorithms data points count
* Minor fix for FakeDataQueue
* Add initialize method to chain providers classes
* Minor changes
* Trigger Build
* Trigger Build
* Trigger Build
* Minor fix
* Minor fix
* Trigger Build
* Trigger Build
* Trigger Build
* Trigger Build
* Add logs to ProcessedDataProvider
* Removed test logs
* Minor fix
* Support downloading options and futures universe files from api data provider
- Fix for division by zero in option assigment check. Adding regression
test reproducing issue. Will now rely on normalized path in universe
selection to clear the cache
* Support registering indicators of type IndicatorBase<BaseData>
* Add IndicatorBase<BaseData> scenario for all the usages of ConvertPythonIndicator
* Add all scenarios in the test case
* Initial solution
* Update unit test
* Explicit conversion if T is IndicatorDataPoint
* Solve review comments
* Add override tests for Beta and Alpha
* Refactor and update unit test suite
* Create unit test for OptionIndicators
* Resolve review comments
* Resolve new review comments
* Add a new default selector
* feat: parsing of universe file path for different security types
* fix: market position in parsing of universe file
refactor: add example of universes file path in xml description method
* test:feat: parsing of universe path
* rename: return variable in ParseUniversePath
* feat: extension to create history request internally
* feat: entity DataUniverseDownloaderGetParameters
* config: downloaderDataProvider project
* feat: create DataUniverseDownloadConfig in download project
* feat: run universe downloader in DownloaderProvider
* test:fix: missing using
test:remove: parameter ctor of DataDownloadConfig
* refactor: run Universe downloader in Main
* feat: GetUniverseFileName by processingDate
* refactor: CreateDataUniverseDownloaderGetParameters with using Start and EndDate
refactor: exception message in DataUniverseDownloadConfig
* feat: new out argument in TryParsePath's LeanData
* feat: RunUniverseDownloader in DownloadDataProvider
* feat: DerivativeUniverseData to write csv file
feat: extension to download universe data with different parameters
* remove: log warn which path when get universe file path
* refactor: DataUniverseDownloaderGetParameters
feat: run Download Universes file in DownloaderDataProvider internally
* refactor: overload TryParsePath only with 4 parameters
* remove: editconfig file in DownloaderDataProvider
* remove: validation on null parameters
* rename: typo DateType to DataType
* refactor: use endDate in ctor DataUniverseDownloaderGetParameters
refactor: use UnderlyingSymbol from base class Symbol property
remove: CreateDataUniverseDownloaderGetParameters()
refactor: put LoadSymbol in base class
clean/remove: DataUniverseDownloadConfig
* refactor: use Time.EachTradeableDay in CreateDataDownloaderGetParameters
remove: CheckMarketOpenStatus
* fix: RunUniverseDownloader with EndUtc in DownloaderDataProvider
* refactor: GetUniverseFullFilePath
* remove: validate historyData like Any
* fix: use date from parsing path in DownloaderDataProvider
* feat: download QuoteBar for Universe file
feat: handle QuoteBar in DerivativeUniverseData
refactor: filter option in final dictionary
* revert: CreateHistoryRequest() in DownloaderExtensions
* feat: use optional parameter SecurityExchangeHours in DataUniverseDownloaderGetParameters
refactor: DataUniverseDownloaderGetParameters
refactor: use Log.Debug instead Log.Trace to prevent spamming
* fix: ordering of download universe data
revert: parameter ctor in DataDownloadConfig
revert:test: use parameter ctor instead of Config.Set
* clean: extra `usings`
* fix: Get DataType in DataDownloadConfig
feat: new ctor in BaseDataDownloadConfig
* Fix IndicatorHistory api for options indicators
Fix for indicators based on OptionIndicatorBase to be able to use IndicatorHistory api. They require proper conversion of indicators from PyObjects
* Fix WarmupIndicator to support multi symbol indicators in Python
* Minor fix for WarmUpIndicator api
* Refactored switch statements for indicator conversion
* Solve comments review
* Refactored WarmUpIndicator to remove duplicated code
* Resolve review comments
---------
Co-authored-by: Jhonathan Abreu <jdabreu25@gmail.com>
* Cache registered custom python security and universe data types
Use this cache to get the correct config for history requests since pythonnet will always pass PythonData and we lose reference to the actual Python type
* Use local repo data for unit tests
* Move unit tests to algorithm history tests
* Use UniverseManager instead of CacheCustomPythonDataType
* Add regression algorithms
* Update regression algorithms to solve issues
* Update regression test and History
* Updated source path to avoid issues with linux
---------
Co-authored-by: Jhonathan Abreu <jdabreu25@gmail.com>
* Adds BroadcastCommand Method
Send a command to all live algorithms.
* Addresses Peer-Review
* Minor tweaks
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Initial draft of the solution
* Remove old format
* Address requested changes
* Add Index option test case
* nit changes
* Address Martin reviews, improve unit tests and solve 8577
* Add unit tests
* Nit change
* Address requested changes
* Address Martin reviews
* Nit changes and more unit tests
* Nit change
* Address requested changes
* Address requested changes
* Initial solution
* Add python support for CompositeIndicator
* Add unit tests and update CompositeIndicator
* Add new test case
* Update TryConvertToIndicator logic
* Solve review comments
* Resolve review comments
* Remove unnessary case
* Use GetIndicatorAsManagedObject instead of ConvertToIndicator
* Add regression tests
* Upgrade IB gateway version to 3010
* Update ib gateway version in config file
* Remove ib-version config
Let the brokerage detect or set the correct ib gateway version
* Add new indexes, including market hours - part 4
* Resolve review comments
* Add an entry to SPDB for ASX
* Add new indexes and update the old ones
* Add entries to SPDB
* Add bank holidays
* Add missing holidays to MHDB
* Add 2025 new year's eve bank holiday
* Add Columbus day and veterans day to bank holidays
* Add missing bank holidays entry
* Modify FuturesExpiryFunctions
* Add missing change
* Remove empty bankHolidays lists from MHDB
* Address review
* Add tests
* Address review
* Add bank holidays from 2009-2024
* Fix unit and regression tests
* Review bank holidays
* Fix tests
* MHDB tweaks
* Remove Bank holidays from CNH, MNH and MIR
* Add setting for bank holidays disabled by default
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Add unit test reproducing the bug
* Improve unit test
* Apply market hours database updates to instance
Make sure entries are updated instead of overridden so that consumers holding the mhdb can pick up the changes
* Improved unit tests
* Update data folder MHDB entries instead of overriding instance
* Optionally reset custom mhdb entries on reset
* Simplify mhdb reset in live trading
Cleanup and minor fixes
* Ensure symbol properties database updates are picked up by consumers
Update SPDB entries instead of overriding them, just like for the MHDB so that consumers pick up updates after refresh
* Fix for symbol properties update thread safety
* Minor improvements and cleanup
* Mhdb and spdb update logic simplification
* Move "force exchange always open" logic to mhdb
* Simplify symbol properties holder and updates
* Refactor security databases to use a common base class
Introduce BaseSecurityDatabase<T, TEntry> to encapsulate common functionality for MarketHoursDatabase and SymbolPropertiesDatabase.
* Cleanup
* Add DualSymbolIndicator unit tests
* Introduce MultiSymbolIndicator for indicators working on multiple symbols
Use the new class as base for DualSymbolIndicator and OptionIndicatorBase.
The OptionIndicatorBase can now detect when ready even if underlying and options market close is different when resolution is daily.
* Accept any BaseData for options indicators
* Improve indicator conversion from python on registration
Also minor fixes
* Cleanup and simplification
* Fix ImpliedVolatility IsReady flag
* Update regression algorithm history count
AutomaticIndicatorWarmupOptionIndicatorsMirrorContractsRegressionAlgorithm history count decreased because options indicators period is now 1 instead of 2
* Address peer review
* Initial solution
* Update regression test
* Update assertions
* Resolve PR comments
* Add more order types to regression test
* Update regression algorithm name
* Update old regression algorithm
* Refactor validation to check buying power only for non-ComboLeg update orders
* Update ValidateSufficientBuyingPowerForOrders
* Update regression algorithm
* Resolve review comments
* Use try out pattern
When re-subscribing a request after a fill forward resolution change, clone Config to avoid memory access race conditions when emitting new tradable date events
* Refactor SetHoldings to return a List<OrderTicket>
* Add expectedQuantities to the testCases
* Update regression tests
* Update name of regressionAlgorithm
* Address review comments
* Update unit test
* Fix symbol changed events emission time
Ensure the symbol changed events are emitted after the securities are processes by the main loop in the AlgorithmManager. This way the algorithm has access to the new symbol security since it would be added by the securities processing logic.
Also, allow all securities to be properly updated, including prices and cash, before emitting the event, so that the any logic (like placing orders) done by the algorithm on the handler has the correct data.
* Minor fix
* Minor change
* Minor change
* Create regression tests and refactor liquidation logic
- Implemented regression tests for order creation and liquidation
scenarios
- Removed LiquidateExistingHoldings method
- Replaced LiquidateExistingHoldings with the general Liquidate method
* Addressed review comments
* Addressed new comments review
* Update default value for 'tag'
* Update ExpectedStatistics
* Identify and liquidate portfolio symbols not included in targets
* Create a new regression test
* Fix minor comments
* Move regression tests to the correct folder
* Refactor GetMatchingSubscriptions:
- Fixed retrieval of minute-resolution quote data for hour-resolution
equity
- Ensured correct retrieval of data regardless of equity resolution
- Created a unit test to verify functionality
* Update unit test and create test cases
* Add new unit test
* Addressed review comments
* Update readme.md to mention .NET 9 instead of .NET 6
* Update readme.md with new versions of python, pandas and wrapt
* Update readme.md for vscode and vs
The delisting time is handled by the DateChangeTimeKeeper now, so there is no need for the SubscriptionDataReader to do any special logic for it.
This was preventing the new tradable date events to be emitted after the delisting date in some cases, like when the day after delisting is not tradable
Co-authored-by: Jhonathan Abreu <jdabreu25@gmail.com>
* Update SPDB with Bitfinex, Kraken, Binance, BinaceUS
* Update unit test
* Added TestCase for CNHT and USD
* Fixed bug in pair comparison logic, corrected concatenation approach
* Add unit test for currency pair match
* Added test cases for currency pair comparison
* Addressed review comments
* Add Martin Luther King'day holiday to CME futures entries
Add unit test for MCL futures expiry function, first contract of 2025 expires on Jan17 but was returning the 20th
* Add holiday to equity and index
And by extension to options and index options
* Add holiday to other entries
* Inicial solution
* Use InitialMargin instead of MaintenanceMargin
* Addressed review comments
* Update unit test
* Refactor GenerateOptionTicker method to handle IndexOption
* Addressed PR comments
* Update unit test
* Add 1/9/2025 holiday to market-hours
* Patched holidays in MarketHours
* Minor fix
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Skip "no tradable dates" log for options added on non-tradable dates
* Skip subscription to selected securities when no tradable dates
Skip selected securities subscriptions when there are no tradable dates available from selection time till end date
* Minor comment
* Remove "no tradable days" error log
* WIP: Refactor Correlation Indicator
* Simplified comparison logic and improved abstraction
* Refactor Correlation and Beta indicators
- Created a base class to handle indicators with dual-symbol
functionality.
- Refactored the Beta and Correlation indicators to inherit from the new
base class.
- Updated unit tests.
- Added a new regression test to validate the latest computed value.
* Addressed review comments
* Update regression test
* Add new unit test to CommonIndicatorTests
* Addressed new review comments
* Implement Squeeze Momentum Indicator
* Create unit test for SqueezeMomentum Indicator
* Update QCAlgorithm with SqueezeMomentum indicator
* Resolved review comments
* Switched to using Keltner indicator instead of manual calculation
* Refactor Squeeze Momentum indicator
- Make the Bollinger Bands and Keltner Channels indicators public.
- In IndicatorBase -> Update, if T is IndicatorDataPoint, then create a new
IndicatorDataPoint.
* Fix issue with regression tests
* Fix unit test
* Fix bug in beta calculation
- Beta is fill-forwarded
- A correct pair considered when they have different symbols and the
same date
- Processing occurs when there are at least period+1 correct pairs
* Address review comments
* Add time zone handling and resolution-based truncation
* Fix regression test for Beta indicator
* Handle resolution for beta indicator
- Remove effectiveResolution and Beta constructor parameter for
resolution.
- Streamlined resolution handling logic for Beta indicator.
- Fixed issues with regression test for Beta.
* Fix issue with period and WarmUpPeriod
* Update unit tests for Alpha indicator
* Fixing minor issues
* Add a variable to track if the previous symbol is the target
* Add regression test for Beta calculation between BTCUSD and SPY
* Add an extra period if the TZ are different
* Add helper method to calculate options expiration date time
This allows to compute accurate time till expiry for greek indicators to be able to calculate on the actual expiration date before market close
* Update tolerance in greek indicators tests
* Minor fix
* Modify helper method to calculate settlement time instead of expiration time
* Cache option expiration date time
* Minor changes
* Minor changes
* Fix for daily options open interest data to be added to contracts
* Cleanup
* Update regression algorithms stats
* Minor fix and cleanup
* Minor fix
* Minor fix
* Update regression algorithms data point count
* Address peer review
* First draft of the solution
* Add regression tests
* Improve solution and add unit test
* Address suggestions
* Improve unit tests
* Nit changes
* Fix regression algorithms
* Implement Hurst Exponent indicator and unit test
- Implemented Hurst Exponent indicator class
- Created unit tests to validate indicator functionality
- Added helper methods for standard deviation and regression line slope
* Optimize Hurst Exponent calculation
- Removed redundat loops and unnecessary operations.
- Precomputed values fro time lag logarithms to avoid recalculation.
- Simplified logic in ComputeNextValue for better performance.
- Updated and clarified comments for improved readability.
* Refactor HurstExponent indicator
- Made _sumX and _sumX2 fields readonly.
- Updated loop for calculating time lag differences to avoid out of
bound.
- Renamed lookbackPeriod with period.
- Replaced DateTime.Now with a fixed date.
* Adjust time slice time for live trading
Adjust time slice to be driven by data, so that consolidators are update at the correct times.
Live trading uses DateTime.UtcNow which might be a few milliseconds after the latest data, causing some race conditions in consolidators scan times.
* Refactor: rounding time slice time down for past consolidators scan (live)
* Cleanup
- Ensure both previousPoint and previousPoint2 are non-zero.
- Prevent division by zero and undefined errors.
- Add unit test to verity the new validation logic.
* Default Data to null for ETFConstituentUniverses.
The data collection will be assigned only if needed. This allows data column to be filtered from dataframes since it will always be null for all constituents.
* Make base data collection aggregator reader fall back to BaseDataCollection
After instatiating the collection type, fall back to the base BaseDataCollection to aggregate data if the type is not a base data collection.
* Minor change
* Minor change
* Update pythonnet to 2.0.41
* Ignore data column for every flattened universe dataframe
* Filter empty collections columns in data frames
* Allow snake case named attributes in PythonSlice
* Remove PythonSlice Data Python class
Pythonnet handles dynamic objects behavior
* Adjust lower-resolution fill-forwarded daily bars when strict end times is enabled
This allows to get fill-forwarded bars with unchanged time stamps
* Minor fixes
* Minor test data changes
* Fixes and comments
* Address peer review and add some fixes
* Minor fix and add regression algorithm
* Minor fix
* Initial implementation of MAMA indicator and tests
* Implemented Mesa Adaptive Moving Average (MAMA) indicator
- Implemented the MAMA indicator.
- Created methods with overloads to support custom and default
fastLimit/slowLimit
- Included necessary logic to calculate the mesa adaptive moving average
based on John's formula.
- Created unit tests to validate MAMA's behaviour.
* Refactor Mesa Adaptive Moving Average(MAMA)
- Separated the logic into smaller functions for better maintainability.
- Improved variable names to reflec their purpose.
- Updated comments to reflect changes and improve readability.
- Consolidated MAMA method overlaod by using default parameters values.
* Refactor variables and update method parameters
- Renamed variables for better clarity.
- Updated method to use 'IBaseDataBar' instead of 'TradeBar'
- Used 'MAMA({fastLimit}, {slowLimit}) instead of just 'MAMA'
* 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
- Addressed bug causing mismatch between types of correlations.
- Updated C method to include CorrelationType.
- Created regression test to ensure proper validation.
* First potential solution
* Add unit tests
* Address requested changes
* Add unit test reproducing user bug
* Missing update
* Address reviews
* Improve unit test
* Improve unit test
* Nit change
* Nit changes
* Nit changes
* Add Connors Relative Strength Index(CRSI) Indicator
- Implemented CRSI combining RSI, Streak RSI, and ROC
- Added unit tests for CRSI calculation to ensure correctness and
reliability.
- Inclued the spy_crsi.csv file for testing purposes and validation of
CRSI logic.
* Refactor CRSI indicator
- Updated the CRSI logic to use Percent Change of Daily Returns instead
of ROC.
- Modified the ConnorsRelativeStrengthIndex class:
- Updated ComputeNextValue to calculate daily returns and relative
magnitude
- Improved documentation and comments
* Refactor CRSI Indicator:
- Refactored the method that updated the trend streak based on price
changes.
- Created a new method ComputeTrendStreak.
- Added check for null or 0 value in _previousInput.
* Fix comments from code review
- Add _ to priceChangeRatios
- Move _srsi.Update() to the top to avoid duplication
* Let delistings through for internal subscriptions
Without it, previously mapped continuous future contracts for which a position is open never received a delisting event for them to be liquidated and marked as non-tradable
* Update regression algorithm stats
* Revert/remove transaction handler initialization parameters DTO class
* Cleanup
* Fix option universe
Set right time using exchange time zone when reading.
Remove OptionUniverse market hours hack in GetEntry extension method.
* Minor change
* feat: ExtendedRegularTradingHours property in CharlesSchwabOrderProperties
* feat: BrokerageModel, FeeModel of Charles Schwab
* refactor: CharlesSchwab Fee model
remove: SecurityType.Index in CanSubmit CharlesSchwab
* refactor: CharlesSchwabFeeModel (a little bit simpler)
* refactor: CharlesSchwabFeeModel (more simpler)
* Add Average Daily Range indicator and tests
- Implemented AverageDailyRange indicator
- The indicator uses a Simple Moving Average (SMA)
- Created unit tests for the indicator
- Includes example input data and test file (spy_adr.csv)
* Refactor AverageDailyRange Indicator
- Renamed AverageDailyRange to AverageRage for a more generic approach
- Replaced explicit types with 'var'
- Updated method name in test cases
- Placed AR method in the correct alphabetical order
* Solving minor issues with AR indicator
- Replace TradeBar with IBaseDataBar
- Remove unnecessary override methods
* Implement Premier Stochastic Oscillator (PSO)
- Added PremierStochasticOscillator class with two Exponential Moving
Averages (_ema1 and _ema2) for double smoothing.
- Implemented PSO computation:
- Normalized Stochastic (nsk) = 0.1 * (Fast%K - 50)
- Double-smoothed Normalized Stochastic
- Added XML documentation for public methods and key calculations.
This commit introduces a new indicator.
* Add license header and adjust spacing
* Refactor Premier Stochastic Oscillator (PSO)
- Renamed smoothing variables for clarity
- Integrated PSO logic directly in ComputeNextValue
- Used IndicatorExtensions for streamlined EMA chaining
- Updated tests to match refactored logic
* Refactor PSO
- Changed "STO" to "PSO"
- Removed unused imports
- Updated private fields
- Minor code cleanup
* Test
* Fix price shift on continuous future rollover
* Keep track of both data and exchange time in subscription data reader
* Fix for daily and hourly resolutions.
Add daily and hour algorithms
* Fixes for emitting new exchange dates at the beginning and end when data is not available
* Cleanup
* Minor fix
* Minor fix: detect mapping in data reader after advancing time keeper
* Minor fix
* More fixes
* More fixes
* Fixes for universe files
* More fixes for daily resolution data
* Separate DateChangeTimeKeeper to its own file
* Add DateChangeTimeKeeper unit tests
* Minor fix
* Add more DateChangeTimeKeeper unit tests
* Address peer review
* Address peer review
* Address peer review
* Detect mappings using the config NewSymbol event
* DateChangeTimeKeeper performance improvement for time zone conversions
* Clean up date change time keeper
* Cleanup
* Minor regression algo update
* Cleanup
* Cleanup
* Fix perform universe selection on sundays for continuous futures with extended market hours
* Cleanup
* Address peer review
* More cleanup
* More cleanup
* Fix ConsolidateRegressionAlgorithm
- Fix Bitcoin custom data time range. Historical data goes from April 2014
- Fix expected consolidated bar counts
- Fix python Consolidate implementations to respect daily strict times for Daily resolution
* Housekeeping
* feat: sort property in SubscriptionDataSource
* refactor: read lines (with sort opportunity) in TextSubscriptionDataSourceReader
* refactor: xml description of Sort property in SubscriptionDataSource
* revet: TextSubscriptionDataSourceReader changes
* feat: develop UnsortedTextSubscriptionDataSourceReader
* remove: UnsortedTextSubscriptionDataSourceReader
* feat: develop SortEnumerator
feat: use SortEnumerator in SubscriptionDataReader
* revert: TextSubscriptionDataSourceReader changes
* feat: use sort Enumerator in LiveCustomDataSubscriptionEnumeratorFactory
* test:feat: Unsorted Live Data Feed with using Object Store
* test:feat: history CustomData request with unsorted data
* refactor: develop TryWrapper on SortEnumerator
* remove: extra spacing
* refactor: Sort in SubscriptionDataSource
* feat: add RegressionAlgorithms when source return data in Descending format
* refactor: xml description of prop Sort in SubscriptionDataSource
* refactor: SortEnumerator
* test:refactor access modifier in ExampleCustomDataWithSort
* test:refactor: increase performance LiveDataFeedSourcesDataFromObjectStore
* feat: add xml comment of regression algorithm
* test:revert: access modifier to public in internal test class
* test:refactor: use while instead of timer
* Revert "test:refactor: use while instead of timer"
This reverts commit 4fe43da809.
* 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>
* Enhance command support
- Enhance command support, adding link helper methods. Adding and
expanding new tests
- Minor improvement for command str representation
* Minor test fix
* Infer data type from configs in bar count history requests
* Infer data type from configs in bar count history requests
* Minor changes
* Minor fix
* Cleanup
* remove: not used proxy config TradeStation
* feat: missed config of TradeStation in Launcher
* feat: support new OrderTypes in TradeStationBrokerageModel
* Option universe improvements
- Improvement for resolution handling of option universes, affecting
performance in live mode. Adding regression algorithm
* Minor fix for research test
* Fix: adjust option expiry reference date
* Add universe files
* Update data and other minor changes
* Minor changes
* Add regression algorithm summary
* EUREX data
EUREX data model and sample data
* Add EUREX futures expiry function and sample algorithms
* Add EuroStoxx50 futures map and factor files
* Reduce eurex data for repo
* Map eurex market to primary exchange
* Update Euro Stoxx 50 (FESX) map and factol files
* Update Euro Stoxx 50 (FESX) minute data
* Added EURSD data
* Added 2 basic FESX futures algorithms in CSharp and Python (#2)
* Add regression algorithms
* Update regression algorithms and data
* Minor change
* Cleanup
---------
Co-authored-by: paulius-an <118921953+paulius-an@users.noreply.github.com>
* Add new QCAlgorithm.OptionChain method to get full data option chain
* Add extension method to get canonical symbol
* Support future options in new OptionChain method
* Replace option chain provider with OptionChain method in some regression algorithms
* Add new regression algorithms for OptionChain method
* Replace option chain provider with OptionChain method in some regression algorithms
* Minor
* Cleanup
* Minor changes in regression algorithms
* Minor adjustments
* First draft of the solution
* Handle end date better
* Improve unit tests
* Add extra argument in missing method
* Nit change
* Nit change
* Nit change
* Undo changes to C# generic UniverseHistory()
* Address suggestions
* Improve unit test
* Add null checks
* Minor adjustment
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* 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>
* refactor: adding OrderId in GroupOrderManger
* feat: new support of OrderTypes in TradeStationBrokerageModel
feat: unSupported OrderTypes in CanUpdateOrder's TradeStationBrokerageModel
* feat: AllOrNone property in TradeStationOrderProperties
* feat: unsupported SubmitCrossZero of Combo Order in TSBrokerageModel
* test:feat: submit / update CrossZero Combo Orders
* feat: new Message Brokerage error message
refactor: use new Message in TradeStationBrokerageModel
* feat: setter of Id in GroupOrderManager
* feat: new constructor of GroupOrderManager
* feat: develop GroupOrderCacheManager service
* fix: groupOrderManger.Id in OrderProvider
* fix: incrementOrderGroupOrderManagerID in BrokerageTransactionHandler
feat: add _groupOrderManagerId in OrderProvider
* remove: extra semicolon
* refactor: prevent increment GroupOrderID
* feat: add new Exchanges
* feat: Try Get Group Combo Orders extension
* refactor: ComboORderType in TSBrokerageModel
* remove: implementing of prop ID in GroupOrderManager
* refactor: UnsupportedCrossZeroByOrderType message
* fix: warning of UnsupportedCrossZeroByOrderType
* fix: several exchanges code based on tradier docs
https://documentation.tradier.com/brokerage-api/reference/exchanges
* feat: add missed Exchange in Global class
* refactor: possible update LimitPrice in TSBrokerageModel
test:feat: validate upddate LimitPrice of ComboLimit Order
* refactor: GroupOrderCacheManager
remove: TryGetGroupCachedOrders from extension
* refactor: exchange SPHR to MIAX_SAPPHIRE
* remove: Exchange BYX cuz It is BATS_Y
* refactor: change position of Exchange C2
* refactor: change constructor's access modifier in class Exchange
* First draft of the solution
* The same check for crytpo is done before
* Fix failing unit tests
* Remove non perpetual crypto futures from SPDB
* Address requests
* Fix failing unit tests
* Adds Overload to AddIndexOption
Simplify usage. We don't need to create/add the underlying explicitly, see AddIndexOption(string, Resolution, string, bool) overload.
* Addresses Peer-Review
- Default market is `null` instead of `Market.USA` allowing for `BrokerageModel` setup.
- `AddIndexOption` and `AddIndexOptionContract` methods now return `indexOption` objects.
* Fixes Logic Bug
* Minor indicator history fix
- Take into account warmup period when used, the last bar of the warmup
period is counted as a data point.
- Fix bug where in some cases the last data point could of been missed
and the indicator not updated with it
* Minor tweak
* Fix dividend yield calculation
* Get security price as input for dividend yield provider
* Account for splits in dividend yield provider
* Fix split adjustment for dividend yield calculation
* Use right dividend yield in options indicators
* Implemented the vortex indicator.
* changed the vortex.cs calculations
* chore: Refactor VortexTests.cs and QCAlgorithm.Indicators.cs
* Refactor VortexTests.cs
* made changes according to the comments
* used indicator exxtension methods
* made changes in the naming convention and added condition for division by zero.
* Using composite indicators to clean up
---------
Co-authored-by: Jhonathan Abreu <jdabreu25@gmail.com>
* 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
* First draft of the solution
* Reduce duplication and add more properties
* Add regression tests
* Add xml docs
* Add unit tests
* Improve regression and unit tests
* Address requested changes
* Address request and improve unit tests
* Add unit test and fix bug
* Improve unit tests and implementation
* Nit change
* Address reviews
* Improve regression tests
* Address requests
* Fix bug
* Address requests
* Implements ChandeKrollStop
* readonly
* Move IsReady/WarmUpPeriod above the constructors
* remove private _period
* minor
* rename Stops to Short/Long
* using Maximum/Minimum
* fix tests
* rename some variables and use movingAverageType for ATR
* movingAverageType
Commit d24f665ee4 removed the
Engine/AlgorithmManager.cs support for OnData(TradeBars), making these
methods dead code. Hence, some of these algorithms no longer placed
orders. Fix by changing OnData(TradeBars) to OnData(Slice). Files that
use the TradeBars argument or use OnData(Dividends) have the same
trouble; leave them for future work.
* feat: new constructor of AlgorithmNodePacket
* refactor: extract JobQueue configuration
* remove: not used `using` in IDataDownloader
* feat: create BrokerageDataDownloader
* Revert "refactor: extract JobQueue configuration"
This reverts commit 5778936b71.
* Revert "feat: new constructor of AlgorithmNodePacket"
This reverts commit d7a565ff76.
* feat: new config `data-download-brokerage` in DataDownloadProvider
* refactor: initialize in BrokerageDataDownloader
* remove: not used `using` in Program's DataDownloadProvider
* remove: not used ref on QuantConnect.Queue proj
* refactor: use default market based on SecurityType
* refactor: MarketName in DataDownloadConfig struct
test:feat: validate MarketName
* feat: support Canonical Symbols in BrokerageDataDownloader
* remove: not used command arguments
* feat: init CacheProvider of IOptionChainProvider in Downloader
* feat: add brokerage message event in BrokerageDataDownloader
* Set best recommended model based on option style.
The best option model will be used in options indicators based on option style if not specified
* Reduced Greeks/IV numerical models steps to 100
* Minor fixes
* Minor changes and improvements
* Changed default pricing model for IV
* Minor performance improvements
* Minor performance improvements and fixes
* Minor change
* Minor regression algorithm fix
* Update greek indicators internal IV indicator only when not user provided
* Revert unnecessary changes
* Minor changes
* Cleanup
* implement Rogers-Satchell volatility
* naming RSVolat to avoid confusion between volume and volatility
* fix InitializeIndicator call
* fix AcceptsRenkoBarsAsInput test
* add symbol parameter to InitializeIndicator
* Update RogersSatchellVolatility.cs
* some fixes after review
* Return 0 when Open High Low or Close is 0
* IBaseDataBar
* Made changes in the ParseOptionTickerOSI function. Now it can handle both with and without space
* added new function GenerateOptionTickerOSICompact and added the test cases for it, expanded test cases for ParseOptionTickerOSI
* added assertions for strikePrice and date, corrected the indentation
* First draft of the solution
* First draft of the tests
* Nit changes
* Nit change
* Add improvements
* Improve unit tests
* Regression algos
* Nit change
* Nit changes
* Improve unit tests
* Improve unit test
* Nit change
* Address reviews
* tests passing except ResetProperly and WarmsUpProperly
* doc
* minor fixes
* doc - return
* fix InitializeIndicator call
* workaround ResetsProperly
* fix WarmsUpProperly test
* remove WriteLine
* remove WriteLine
* cr
* fix data
* open high low defaults to close when these columns don't exist into data
* simplify using ternary operator
* better fix for ResetsProperly
* fix some code conventions issues
* fix some review issues
* Update StochasticRelativeStrengthIndex.cs
* WIP
* All tests are passing except AcceptsRenkoBarsAsInput
* Update QuantConnect.Tests.csproj
* comment formating and use input.EndTime
* fix AcceptsRenkoBarsAsInput test
* fix InitializeIndicator call
* add symbol parameter to InitializeIndicator
* FI above FISH
* Improve indicator warmup
- Allow indicator warmup to handle multiple symbols, used for option
greeks. Adding regression test
- Improve indicator history to handle specific T types. Adding unit test
- Remove period, and historical underlying volatility, from IV so
simplify warmup behavior
* Address review, fix minor issues
* Implement new indicator IBS
* remove using System
* typo
* doc fix
* Implement new indicator IBS
* remove using System
* typo
* doc fix
* inherit TradeBarIndicator and return 1m when High=Low
* duplicate spy_with_ibs
* returns 0.5 when High=Low
* Minor fix for Mis-Aligned Timestamps from IndicatorHistory
- Minor fir for mis-Aligned Timestamps from IndicatorHistory. Adjusting
unit test to reproduce issue.
* Add another assert to indicator history tests
* Minor fixes for IndicatorHistory and IV
- Minor fix for IndicatorHistory, use ScaledRaw data normalization mode
for option indicators. Adding unit test
- Expand the IV expected upper range to 400%, given values can be higher
than previous value of 200%
- Adjust IV to use smoothing function only when both option calculations
succeed
* Updating regression algorithm expected greeks, minor change
- Remove universe selection on dates with extended market hours only
- Updating regression algorithms
- Expand date & time rules API to support specifying whether extended
market hours only dates are desired or not
* Implement new indicator ZLEMA
* Add script to generate reference data from talipp
* Some review fixes
* description
* use isReady
* use Delay(...)
* simplify ComputeNextValue
* Minor tweaks addressing review
* replace DateTime.UtcNow for specific date time instances
* remove unused imports
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Minor indicator test suite improvements
- Simplify and improve indicator test suite assertions
- Reduce indicator suite run time
* Fix DividendYieldProviderTests dependency
* Fix half of the CA1051 warnings
This warning is about not declaring visible instance fields. There are
something about 500 warnings in the solution, mostly in the QuantConnect and QuantConnect.Algorithm.CSharp projects. I aim to fix one of them in this PR and the other half of them in a second one. To fix it, I'm changing the visible instancce fields for properties.
* fix bugs
* Addressing minor reviews
* More minor fixes
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Add indicator helper methods for base Algorithm
- Add indicator helper methods for base algorithm. Adding new unit tests
* Expand indicators helper methods
- Expand indicators helper methods, adding support for C# and custom
indicators too. Adding unit tests
- Expand indicators helper methods to support multiple symbols as input.
Adding unit tests
- Improve conversion of symbol enumerable from python to C# adding unit
tests
* Address reviews
- Keep old QB.Indicator methods for backwards compatibility
- Rename new API to IndicatorHistory, matching
FutureHistory/OptionHistory
- Add new regression algorithms
- Minor improvement to DynamicData so it supports snake name access
* empty
* refactor: orderType for SecondCrossZeroOrder
* refactor: handle some specfic orderStatus in CrossZeroOrder process
* refactor: Handle specific OrderStatus in SecondPartCrossZeroOrder
* refactor: handle order status
revert: convertOrderType of CrossZeroSecondPart
* fix: use right collection when removing cross zero order class
* Fix CA1819 and CA1002 warnings
Changed the type of Languages statistic in regression tests from
Language[] to List<Language>. By doing that, the warning CA1819 was
removed but then the warning CA1002 was raised. However, this warning
was expected to be excluded from QuantConnect.Algorithm.CSharp.
* Improve implementation
* Simplify code
* Fix bugs
* Define Iron Butterfly and its buying power model
* Add unit tests
* Add regression test
* Address peer review
* Add short iron butterfly and short iron condor
* Add unit tests on short strategies
* add regression algorithms
* Invert direction of iron butterfly
* First draft of the solution
* Fix bugs
* Fix bugs
* Fix another overloaded method
* Add new unit test
* Address requested changes
* Address requested changes
* Minor tweaks
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* 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
* feat: TryCrossPositionOrder
feat: helper methods to CrossPosition
* refactor: get rid CrossOrder +UTests
* feat: test simulator of cross zero orders request
* remove: callback from TryCrossPositionOrder
rename: TryCrossPositionOrder -> TryCrossZeroPositionOrder
feat: handle event of CrossZeroOrder
feat: new prop in CrossZeroOrderRequest
test:feat: write working test imitate of CrossZeroOrdering and assert different params
* feat: temp collection to keep CrossZeroOrder with Lean
* refactor: flag which indicate should we place crossZero order with LeanEvent or not
* refactor: change access modifier
* fix: CrossZero tests
* refactor: property collection instead of variable
* feat: lock context of CrossZeroOrder
feat: helper method for CrossZeroCollection
* refactor: test of cross brokerage ordering
* refactor: CrossZero Brokerage
* fix: lock area
* feat: Update CrossZero Ordering
refactor: CrossZeroOrders tests
* feat: additional test case for CrossZeroOrdering
* feat: Invalid OrderStatus when FirstPart of CrossZero ordering try to place
feat: message property in CrossZeroOrderResponse
refactor: CrossBrokerageTest a little bit
* feat: PossibleUpdateCrossZeroOrder
* refactor: UpdateCrossZeroOrder
* refactor: TimeOut for resetEvent
* refactor: crossZeroOrder change DateTime UtcNow on specific time
refactor: change action scenario for Filled FirstPart of CrossZeroOrder
* refactor: change firstPartQuantityproperty to link of FirstPartOfCrossZero order completely
fix: crossZeroOrder test put orderStatus internally
* feat: additional orderType in CrossZeroOrder tests
* test:remove: not use GetOrderCrossesZero()
* refactor: extra paddings
* rename: TryGetUpdateCrossZeroOrderQuantity instead of IsPossibleUpdateCrossZeroOrder
* refactor: CrossZeroOrder process and models
* remove: interface ICrossZeroOrderRequest
* feat: TradeStation NotSupportUpdate of CrossZeroOrder quantity
* feat: add license
remove: extra validation of variable
* refactor: add validation of quantity update in TradeStationBrokerageModel
* test:feat: canUpdate of TradeStationOrder
* refactor: reuse OrderEvent when we handle FirstPartCrossZeroOrder
* remove: assignment of filled quantity of FirstPartCrossZeroOrder
* Add support for FTP notifications
* Add optional parameters for SFTP notifications with private key
* Add optional "secure" parameter for FTP notifications.
Improve FTP notifications constructor and input checks.
* FTP notification improvements.
Add public key property.
Add multiple constructors and methods for FTP and SFTP notifications with either password or SSH keys.
Encode file contents.
* Address peer review
Add support for FTP notification with string contents
* Minor changes
* Minor changes
* Remove public key argument
* Fixes and minor changes
The second and third parameter are `fastPeriod` and `slowPeriod`, but we had `slowPeriod` and `fastPeriod`, which is inconsistent with the class contructor and other indicators with `fastPeriod` and `slowPeriod` parameters.
* Dynamic spdb
* Minor changes and unit test
* Get MHDB and SPDB refresh period from config
* Add databases refresh period to algorithm settings
* Address peer review and add unit test
* Add Protective Collar Option Strategy
* Add buying power model for Protective Collar
* Add unit test for Protective Collar
* Add regression test for Protective Collar
* Add unit test on position group buying power
* allow same strike for later abstraction
* minor bug fix
* Set up conversion option strategy
* add margin requirement
* add unit tests
* Add regression test
* add reverse conversion definition
* add reverse conversion and refactor conversion/collar margin model
* added/modified unit tests for conversion/reverse conversion
* minor bug fix on unit test, add regression test
* Address peer review
* update new set of IB testing data
* Fix fill forward resolution adjustment on removal
- Fix fill forward resolution adjustment on subscription removal. Adding
regression algorithm reproducing issue
* Minor fix for undeterminism behavior on security removals and FF res change
* Further improvements and determinism
- Improve regression algorithm add, remove and readd future, asserting
FF resolution changes
- Adjust universe selection to be deterministic and avoid unnecessary
FF resolution changes
* Daily data Time & EndTime Improvement
- Adjust daily data Time & EndTime to actually reflect the time of the
data used, for example US Equity from 9.30 to 4PM. Adding new unit and
regression tests
* Refactor solution to use enumerator
- Refactor daily strict end times solution to be through enumerator
usage, so it applies for history providers too
* Minor fixes
* Revert fill forward enumerator change
- Revert FillForward enumerator causing stats changing, enhancing unit
tests
* Some cleanup
* Improve handling of live trading FF enumerator
- Improve handling of live trading FF enumerator, by adding support for
bars to arrive with a delay so we can handle auction close/option
prices or data providers which might have some delay making the data
available. Adding new unit tests asserting the behavior
* Round combo order prices
* Combo limit order round fix: use smallest security min price variation
* Minor unit test change
* Improvements and unit tests
* Minor change
* Cleanup
* Handle expired options
* unit test
* Move Zero Checks to Single Location
---------
Co-authored-by: Alexandre Catarino <AlexCatarino@users.noreply.github.com>
* 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
* Fix: properly adjust prices after a split
* Minor fixes
* Minor: Adjust cached data on split
* Minor change
* Expand regression algorithms assertions
* refactor: modifier static to parse enum and ignore warning
* feat: group symbol when download cannonicial data
feat: log total time execution of download provider
test: right keeping of cannonicial data
* feat: parameter ctor in DataDownloadConfig
* test:feat: additional assertion of wrote data in file
* feat: static FilterGroupDownloadDataBySymbol
* refactor: extract downloader folder path
* try: map file false
* feat: get rid of dataCacheProvider in DownloaderDataProvider
* refactor: get rid mapFile flag
* CI test fix
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Fix: source custom data from remote CSV zipped file
* Fix: Custom data sourcing zip entry names from remote locations
* Address peer review
* Add unit tests
* Minor fix
* Address peer review
* Minor fixes
* Return byte array in IApi.DownloadBytes
* Allow sourcing custom data from specific csv entry in a zipped remote file
* Minor change
* feat: init Download proj
* feat: update docker file to copy download proj
* feat: parsing in cmd arguments
* feat: DataDownloadConfig model
feat: add config file
refactor: logic of parsing config
* feat: overrid ToString in DataDownloaderGetParameters
* remove: not used argument command
* feat: calculate downloading % (without ETA time)
* fix: dockfile copy path for DownloaderDataProvider proj
* feat: additional Property in .csproj
* remove: DataProviderFullName prop from DataDownloadConfig
* remove: extra package (ref from Configuration proj)
* feat: ETA calculation of downloading data
* Minor tweak
* rename: namespace of downloaderDataProvider to generic style format
* test: ETA from DownloaderDataProvider
* fix: calculate ETA like real downloading process
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
- Make sure calling CSharp methods, fields, properties releases the GIL,
this was not hapenning for fiels & properties, adding unit test
reproducing the issue
* pep8 conversion of alphas
* pep8 conversion of benchmarks
* Various fixes and rebase
---------
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Initial boilerplate code
* Fix build failure
* Initial iteration for the code for Derivative Oscillator code
* Add foundation for unit tests
* Add reset method for test
* Add test case
* fixed test cases, all tests pass
* Put placeholder for IsReady change
Not implemented, as test cases fail when change is uncommented
* Update documentation and change class name
* Change names for Derivative Oscillator to more meaningful
* Add DO extension to create the indicator
* Provide variable definitions with var, replace old test file with new
* Use chaining for indicators creation
* Add test based on external data
* Change test file
* Fix WarmUp test + alphabetical order + rename indicator class
* Make all tests run except for external data tests
* Fixed warmup period and fixed the ResetsProperly test case
* Removed unused directives
* Add output directory for Derivative Oscillator test
* Minor tweaks
---------
Co-authored-by: HaentjeGH <l.m.j.haenen@student.tue.nl>
Co-authored-by: ivkozlov <ivkozlov@ozon.ru>
Co-authored-by: DanielVanRijswijk <d.j.v.Rijswijk@student.tue.nl>
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
* Improve python exception message for cases when derived class uses member names already defined in base C# classes
* Update pythonnet version to 2.0.33
* Update error message
* Pythonnet version bump to 2.0.34. Minor unit test fix
* Enhance pythonnet overload tests
---------
Co-authored-by: Jared <jaredbroad@gmail.com>
Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
- Pep8 adjustment for GoodTilDate, so it behaves like `Expiry` static
readonly funcs which will be binded to both snake case and upper
constant format, `good_til_date` & `GOOD_TIL_DATE`
* 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
* Add support for auxiliary data history request
- Add support for split/dividends/margin interest history requests.
Adding regression algorithms
* Expand auxiliary history regression tests
- By default Time rules yield times in UTC TZ, already correctly handled
by 'ScheduledUniverseSelectionModel' but this wasn't fixed in ScheduledUniverse
* Minor api improvements
- Adding Universe.Selected to hold the current set of selected symbols.
Adding regression tests
- Adjusting TimeRules and DateRules to fallback to the MHDB if the
security hasn't been added. Updating existing regression tests
* Expand regression test assertion
* fix: download year file data only for hour and daily resolutions for options and index options
* minor fix: index options regression tests expected status
* Minor change
* minor: update regression algorithms stats
* Adding new algorithm data handling options
- Adding new QCAlgorithm data handling method options to override.
Adding Py/C# regression tests
- Removing old OnData Type specific invoker methods
* Address reviews. Remove old OnData C# only methods
* Add Scheduled Universe Selection
- Adding `UniverseSettings.Schedule` that will allow users to
specify a custom selection schedule which is independent of the
underlying data frequency
- Adding unit and regression tests
* Add live trading schedule time shift
* Support CFDs in IB
* Add new currency pair util method
* Minor changes to IB fee model and tests
* Add CFD USA market hours
* Add new Market interactivebrokers for cfds
* Add sample algorithm illustrating manually adding market hours to MHDB
* Update MHDB and SPDB
* First draft of the solution
* Add missing changes
* Remove the new KPI's from report
* Fix bugs
* nit change
* Add improvements
* Fix regression tests
* Solve bugs in the regression algos
* Fix regression tests bugs
* Expand unit tests and add minor changes
* refactor: map files in lean/data folder
* feat: Indexers in MapFile
* feat: extension for mapFile and downloader param
* refactor: getAllTickers from MapFiles
* feat: addition out variable in TryParsePath
fix: tests with new variable
* refactor: DownloadDataProvider with getting all ticker with different DateTime Ranges
feat: test
* revert: "refactor: map files in lean/data folder"
This reverts commit 41fa26eb8627446028d4f2d4c536511ea82a9a48.
* revert: "feat: addition out variable in TryParsePath"
refactor: some actual changing
This reverts commit 9de482bd6490eecd1eeee83e035dfc1ece8d6415.
* revert: "feat: Indexers in MapFile"
fix: actual changes
This reverts commit 393181c6316a354a8cdcbfb093707cb545383a8a.
* remove: high performance Any validation
feat: validation on ticker start with specific sign
fix: option test
* feat: validation on mapping
refactor: when resolution less hour
test: new test cases + validation of SecurityType
* refactor: add additional day when return date range from MapFile
fix: FirstTicker instead of Permtick when generate new Equity
feat: validation of request Date in DownloaderDataProvider
refactor: by style proj DownloaderDataProvider
test:fix: starting Date in TestCases
* remove: duplicate code
* fix: check of income data.Time with requested Start/End-Date
* test:fix: download test cuz we can not get/write future data
* remove: extra Symbol Create mthd
* test:feat: validate of TryParse returns correct symbol
* remove: excess if condition
* test:remove: extra chaning
connected # 3a62adf54c
* refactor: split big method to small ones (add readability)
* fix: typo in xml description
* refactor: get the correct symbol value
* refactor: use local time instead of Utc in download Param extension
refactor: use struct instead of class
* test:fix: convert time to Utc from local time
* Adds Rebate and Fee Rates to Shortable Provider
If the provider does have this information, the rates are zero.
* Adds Helper Methods to QCAlgorithm
- Improve summaries.
- Express values as rates instead of percentages.
- Adds headers to files to emulate real data
* Clarify the Data Format
* Removes Helper Methods from QCAlgorithm
* Removes `Shortable` and `ShortableQuantity` from Example
Algorithms should prefer getting the information from the `Security.ShortableProvider`.
* Add schedule manager unit tests
* Add schedule manager unit tests
* Fix overriding security exchange hours
* Minor comments changes
* Minor change
* Add SecurityExchangeHours.Update method to set without changing the reference
* Minor change
* Refactor universe historical data source
- Add new universe history API methods
- Refactor QuantBook UniverseHistory to use the universe selection
itself instead of a given func
- Refactor and rename fundamental types
- Refactor AddUniverse API to handle universe collection data which
holds another type internally, like fundamental
* Fix minor bug causing ApiDataProvider not to serve Bitfinex universe data
* Further improvements to add universe API
* Handle no selection function
* feat: helper to return old name of symbols
feat: test
refactor: test a little bit neat
* feat: SplitHistoryRequest() with different mapped symbol
feat: test
refactor: RetrieveSymbolHistoricalDefinitions
* refactor: split historyRequest by historical symbol name
refactor: change location of extension
refactor: change location of test extension
* revert: extra changes
* fix: validation on RequiresMapping in SplitHistoryRequest
feat: add Future Symbol tests
* move: extension method to another file
* fix: wrong extension call param position
* fix: wrong extension call param position in test
* refactor: IEnumerable foreach to more simple form
feat: add TickerDateRange struct instead of Tuple
fix: test
* refactor: map extension alway returns empty result
* refactor: SplitHistory extension returns original HistoryRequest
* feature: new extension for RequiresMapping except Futures
* fix: validation of symbol map file to contains something
* refactor: extension test cases
* feat: assert of right ticker in tests
* fix: split historical request with using Local Time instead of UTC
fix: test description
* feat: test helper IEnumerable of TimeZones
* test: validate right EndDate with different TimeZones
* remove: validation of end of date
test: several new test cases
* feat: additional test with specific dateTime
* remove: extra Extension method validation on future and mapping
* Allow mirror contract and smoothing IV
* Python wrapper on smoothing IV
* helper method update
* Add forward tree model
* modify and add unit tests and data
* address peer review
* address peer review
* Update symbol-properties-database.csv
Updating Symbol properties database to reflect kraken API information.
#### Description
Updated the market_ticker column of Symbol properties database to reflect information as per Kraken API.
#### Related Issue
Close#7794
#### Motivation and Context
We updated symbol mapping for the Kraken market.
#### Requires Documentation Change
No
#### How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
#### Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Refactor (non-breaking change which improves implementation)
- [ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Non-functional change (xml comments/documentation/etc)
#### Checklist:
<!--- The following is a checklist of items that MUST be completed before a PR is accepted -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [X] My code follows the code style of this project.
- [X] I have read the **CONTRIBUTING** [document](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md).
- [X] I have added tests to cover my changes. <!--- If not applicable, please explain why -->
- [X] All new and existing tests passed.
- [X] My branch follows the naming convention `bug-<issue#>-<description>` or `feature-<issue#>-<description>`
<!--- Template inspired by https://www.talater.com/open-source-templates/#/page/99 -->
* Update symbol-properties-database.csv
- Update as per peer review
* Correction
* Implement VaR in PortfolioStatistics
* Added ValueAtRisk indicator
* Refactored ValueAtRiskTests
* Added returns column to test data
* Change indicator helper method name
* Addressed comments
* Chande Variable Index Dynamic Average (VIDYA) Indicator
* Improvements
* Improvements
* Final Changes
* Editted, Retested
* Comments
* Minor Corrections
* Updated Datetime Format of test data to US Standards
---------
Co-authored-by: Pronoy Chowdhury <rokstarr.dbz@outlook.com>
* Make sure continuous futures universe selection is performed right away on the start of the algorithm.
This ensures the Future.Mapped is not null
* Minor changes
* Minor fixes
* Update regression algorithms stats
* Add DC futures map file
* Update DC futures map file
* Update regression algorithms stats
* Include ETFs for immediate universe selection
* Include Coarse Fundamentals for immediate universe selection
* Include Futures Chain Universe for immediate selection
* Add Option Chain Universe test
* Include custom universes for immediate selection
* Minor updates
* Include constituents universes for immediate selection
* Minor update
* Minor changes, docs and stats updates
* Minor changes
* Minor changes and clean up
* Minor regression algorithm stat update
* Models OZN: 10-Year US Treasury Future Options
<!--- Provide a general summary of your changes in the Title above -->
#### Description
We added future option for OZN
#### Related Issue
Close#7783
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->
#### Motivation and Context
We added future option supported by CME
https://www.cmegroup.com/markets/interest-rates/us-treasury/10-year-us-treasury-note.contractSpecs.options.html#optionProductId=317
#### Requires Documentation Change
No
#### How Has This Been Tested?
I tested the change using fake files to check if mapping is correct.
#### Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Refactor (non-breaking change which improves implementation)
- [ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Non-functional change (xml comments/documentation/etc)
#### Checklist:
<!--- The following is a checklist of items that MUST be completed before a PR is accepted -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [X] My code follows the code style of this project.
- [X] I have read the **CONTRIBUTING** [document](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md).
- [X] I have added tests to cover my changes. <!--- If not applicable, please explain why -->
- [X] All new and existing tests passed.
- [X] My branch follows the naming convention `bug-<issue#>-<description>` or `feature-<issue#>-<description>`
<!--- Template inspired by https://www.talater.com/open-source-templates/#/page/99 -->
* Add unit tests
---------
Co-authored-by: Ashutosh <ashutoshrana171@gmail.com>
* 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
- Adjust live equity delisting to be map files based like splits and
dividends. Adding unit test
- Expand existing unit tests asserting delistings in live mode, set
securities to not tradable
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTests.AssertVirtualEnvironment"
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTests.AssertVirtualEnvironment" && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTests.AssertVirtualEnvironment"
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonVirtualEnvironmentTests.AssertVirtualEnvironment" && \
# Run Python Package Tests
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests" --blame-hang-timeout 120seconds --blame-crash && \
# Run StableBaselines Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StableBaselinesTest" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StableBaselinesTest" --blame-hang-timeout 120seconds --blame-crash && \
# Run AxPlatform Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.AxPlatformTest" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.AxPlatformTest" --blame-hang-timeout 120seconds --blame-crash && \
# Run TensorlyTest Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorlyTest" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorlyTest" --blame-hang-timeout 120seconds --blame-crash && \
# Run NeuralTangents, Ignite Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.NeuralTangentsTest|IgniteTest" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.IgniteTest" --blame-hang-timeout 120seconds --blame-crash && \
# Run TensorflowTest
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorflowTest" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorflowTest" --blame-hang-timeout 120seconds --blame-crash && \
# Run TensorflowProbability
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorflowProbabilityTest" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorflowProbabilityTest" --blame-hang-timeout 120seconds --blame-crash && \
# Run Hvplot Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.HvplotTest" --blame-hang-timeout 120seconds --blame-crash
# Run Stellargraph Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StellargraphTest" --blame-hang-timeout 120seconds --blame-crash
# Run Keras Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.KerasTest" --blame-hang-timeout 120seconds --blame-crash
# Run Scikeras Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ScikerasTest" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.RiskparityportfolioTest" --blame-hang-timeout 120seconds --blame-crash && \
# Run Transformers
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Transformers|XTransformers" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Transformers" --blame-hang-timeout 120seconds --blame-crash && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.XTransformers" --blame-hang-timeout 120seconds --blame-crash && \
# Run Shap
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.KerasTest|PyvinecopulibTest" --blame-hang-timeout 120seconds --blame-crash && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StatsForecast|Mlforecast" --blame-hang-timeout 120seconds --blame-crash && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.MlxtendTest|Thinc" --blame-hang-timeout 120seconds --blame-crash && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ModuleVersionTestExplicit" --blame-hang-timeout 120seconds --blame-crash && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Neuralforecast" --blame-hang-timeout 120seconds --blame-crash && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Tsfel" --blame-hang-timeout 120seconds --blame-crash && \
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ScikitOptimizeTest" --blame-hang-timeout 120seconds --blame-crash
@@ -12,16 +12,16 @@ This document contains information regarding ways to use Visual Studio to work w
<h2>Option 1: Lean CLI</h2>
To use Lean CLI follow the instructions for installation and tutorial for usage in our [documentation](https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cli).
To use Lean CLI follow the instructions for installation and tutorial for usage in our [documentation](https://www.quantconnect.com/docs/v2/lean-cli/key-concepts/getting-started).
<br />
<h2>Option 2: Install Locally</h2>
1. Install [.Net 6](https://dotnet.microsoft.com/download) for the project
1. Install [.Net 9](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) for the project
2. (Optional) Get [Python 3.8.13](https://www.python.org/downloads/release/python-3813/) for running Python algorithms
- Follow Python instructions [here](https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#installing-python-38) for your platform
2. (Optional) Get [Python 3.11.11](https://www.python.org/downloads/release/python-31111/) for running Python algorithms
- Follow Python instructions [here](https://github.com/QuantConnect/Lean/tree/master/Algorithm.Python#installing-python-311) for your platform
3. Get [Visual Studio](https://visualstudio.microsoft.com/vs/)
@@ -35,7 +35,7 @@ Your environment is prepared and ready to run lean
<h1>How to use Lean</h1>
This section will cover configuring, launching and debugging lean. This is only applicable to option 2 from above. This does not apply to Lean CLI, please refer to [CLI documentation](https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cli)
This section will cover configuring, launching and debugging lean. This is only applicable to option 2 from above. This does not apply to Lean CLI, please refer to [CLI documentation](https://www.quantconnect.com/docs/v2/lean-cli/key-concepts/getting-started)
thrownewException($"Unexpected configuration for {symbol} after it has been deselected from coarse universe and option contract is removed.");
thrownewRegressionTestException($"Unexpected configuration for {symbol} after it has been deselected from coarse universe and option contract is removed.");
thrownewException($"{Time}:: Detected differences in expected and actual securities{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}");
thrownewRegressionTestException($"{Time}:: Detected differences in expected and actual securities{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}");
thrownewException($"{Time}:: Detected differences in expected and actual universes{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}");
thrownewRegressionTestException($"{Time}:: Detected differences in expected and actual universes{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}");
thrownewException($"{Time}:: Detected differences in expected and actual slice data keys{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}");
thrownewRegressionTestException($"{Time}:: Detected differences in expected and actual slice data keys{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}");
thrownewException($"Expected Symbols selected on {Time.Date:yyyy-MM-dd} to match expected Symbols, but the following Symbols were missing: {string.Join(",", missing.Select(s => s.ToString()))}");
thrownewRegressionTestException($"Expected Symbols selected on {Time.Date:yyyy-MM-dd} to match expected Symbols, but the following Symbols were missing: {string.Join(",", missing.Select(s => s.ToString()))}");
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.