11490 Commits

Author SHA1 Message Date
Ryan Russell 052e20cbf4 refactor(Algorithm): readability improvements (#6547)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* refactor(Algorithm): Correct `Intrinino` -> `Intrinio` references

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* refactor(Algorithm): Update `evemts` -> `events`

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* refactor(BubbleAlgorithm): readability improvements

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* refactor(OrderTicketDemoAlgorithm): readability improvements

Signed-off-by: Ryan Russell <git@ryanrussell.org>

Signed-off-by: Ryan Russell <git@ryanrussell.org>
14432 14433 14434 14431
2022-08-15 10:52:07 -03:00
Jhonathan Abreu 771cc11b3a Fix KeyError in report generator due to missing color mappings (#6546)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Fix KeyError when rendering exposure chart in report with some security types

* Update exposure chart colors and add unit tests

* Updated json test file
14429
2022-08-12 18:52:15 -03:00
Ronit Jain 0d882b8201 Refactor handle lean-cli commands for live deployments (#6527)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* handle multiple command files

* remove default useage

* add tests for verify files are read in order

* add comment

* change reuslt file name

* add comment

* liquidate using given symbol values

* remove redundant

* accept ticker, market, security type to build symbol, to be used by CLI commands

* use null leverage

* symbol can be null if ticker, market, security type values are provided

* reject the default value of security type

* cleanup

* cleanup

* check if status is not invalid

* cleanup

* abstraction to remove duplication

* fix name

* address reviews

* use counter

* add test to validate symbol/ticker agrumnets

* remove hardcoded values
14427
2022-08-12 18:12:33 -03:00
Ryan Russell 95c1f752ac docs: Readability improvements (#6545)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Signed-off-by: Ryan Russell <git@ryanrussell.org>

Signed-off-by: Ryan Russell <git@ryanrussell.org>
14426
2022-08-12 16:56:26 -03:00
Martin-Molinero 37dca9d458 Remove log packet aggregation (#6538)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Remove log packet aggregation
- Clean up Queue api usage
14418
2022-08-11 19:06:11 -03:00
Jhonathan Abreu 2dd3a0cb94 Fix 'GetParameter()' ambiguous call error when no default parameter is provided (#6541)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Fix QCAlgorithm.GetParameter() ambiguous call error when no default parameter is provided

* Add unit tests

* Add regression algorithms
14417
2022-08-11 18:45:00 -03:00
Jhonathan Abreu aa8a3a241b GetParameter number conversion overloads (#6535)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Add numeric conversion overloads to QCAlgorithm.GetParameter()

* Add unit tests

* Address changes request
14412
2022-08-10 18:15:04 -03:00
Louis Szeto cfa4a4c1c1 Update readme information in Equity data (#6536)
* Update readme

* Update equity readme

* Add quote info

* Fix typo

* Add back QuoteQuant as pre-2007 vendor

* Fix typo
2022-08-10 18:11:20 -03:00
Ronit Jain 3064c1ed4b update config value (#6537)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
14410
2022-08-10 18:10:02 -03:00
Jhonathan Abreu 9e7690754a Forbid tick resolution period-based history requests (#6533)
* Detect implicit tick resolution in period-based history requests and throw

* Add regression algorithms
2022-08-09 18:19:08 -03:00
Jhonathan Abreu 460ef10ff4 Add more info to python runtime error message (#6526) 2022-08-09 17:56:23 -03:00
Jhonathan Abreu 6f70606f3e Allow tick history request without tick subscription (#6534) 2022-08-09 17:51:25 -03:00
Louis Szeto 9eb71e1543 Mean Reversion Portfolio Construction Model (#6519)
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* MRP

* Fix bug

* Rename

* Provide virtual `GetPriceRelative` function to override for any variants in future

* SymbolData class within model

* Address peer review

* fix bug

* revise unit test and fix bug in python model

* revise unit test and fix bug in model

* Revise regression statistics

* Revise regression statistics

* Revise regression statistics

* Revise regression statistics

* Revise regression statistics

* Address peer review

* Updated unit tests according to peer review

* Address peer review
14392 14395 14397 14399 14400 14402 14394 14398
2022-08-04 11:20:11 -03:00
Martin-Molinero 3f7d339463 Fix live result Handler null reference (#6521)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Fix live result handler null reference, that could happen if the
  algorithm explodes mid initialization. Adding unit test
14390
2022-08-03 19:57:03 -03:00
Martin-Molinero 3f2bcc1784 Add missing CancellationTokenSource dispose (#6512)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
- Add missing CancellationTokenSource disposals to avoid memory leaks
14377 14378 14379 14380 14381 14383 14384 14385 14386 14388 14382 14375 14387
2022-08-01 11:12:01 -03:00
Martin-Molinero 30d137e9cc Track CPU usage (#6520)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Track CPU usage, useful for debugging
14374
2022-08-01 11:10:52 -03:00
Martin-Molinero ab9ad75c93 Update readme.md
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
14367
2022-07-29 15:52:57 -03:00
Jhonathan Abreu 1440842d87 Fix LocalMarketHours.GetMarketClose for extended market hours (#6516)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
* Fix LocalMarketHours.GetMarketClose to get the actual next market close time with extended market hours

The method was not properly considering gaps between regular hours close and extended market open

* Revert some changes to fix errors
14364 14365 14366
2022-07-29 12:31:10 -03:00
Martin-Molinero 2df01c4d2e Update readme.md
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
14362 14363
2022-07-28 20:54:04 -03:00
Martin-Molinero 82aab246a8 Update readme.md 2022-07-28 20:43:32 -03:00
Martin-Molinero f665d693b7 Update readme.md 2022-07-28 20:30:15 -03:00
Martin-Molinero ef531e09bd Add Lean commands (#6513)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Add Lean commands

- Add Lean commands to common project

* Address reviews

- Address reviews, refactor command interfaces and classes

* Rename FileCommandQueueHandler to FileCommandHandler
14352
2022-07-28 16:44:40 -03:00
Jhonathan Abreu 3db470de52 Add fill forward and extended market parameters to QuantBook's history methods (#6515)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
14347
2022-07-28 15:29:15 -03:00
Martin-Molinero a43bdaf1c7 Fix crypto hash leak (#6511)
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Fix crypto sha256 memory leak
- Minor improvements to reduce improve performance
14331 14333 14334 14335
2022-07-26 20:00:23 -03:00
Martin-Molinero e0f483c46b Fix ARM IB gateway java version check (#6509)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
- Fix for ARM IB gateway java version check.
  See https://github.com/QuantConnect/lean-cli/issues/114
14324 14326 14327 14328
2022-07-26 10:35:47 -03:00
Martin-Molinero 8093df31cc Update readme.md
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
14322
2022-07-25 20:11:25 -03:00
Ronit Jain 9df9d76081 get value from config, default to local (#6502)
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
14318 14319 14320 14321 14316
2022-07-22 11:08:46 -03:00
Jhonathan Abreu ad844e9411 Fix checking market open for post market segments (#6500)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Consider post-market segments when getting market open

* Consider post-market segments when getting market open

* Fixes and more unit tests
14314
2022-07-22 10:57:01 -03:00
Derek Melchin e7e9153fbf Update indicator source links (#6501)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
14312
2022-07-21 17:50:14 -03:00
Martin-Molinero 24627f5efa Fix optimization json converter (#6499)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Fix optimization json converter, not handling correctly different
  account currencies. Updating unit test to reproduce issue
14310
2022-07-21 17:43:14 -03:00
Martin-Molinero 440282c138 Update compare_benchmarks.py
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
14305 14306 14307 14308
2022-07-20 20:04:33 -03:00
Martin-Molinero 3d3f04abbc Update python autocomplete readme (#6498)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Updating the python autocomplete readme to suggest adding
 `from AlgorithmImports import *`
14303
2022-07-20 18:40:52 -03:00
Martin-Molinero 0a64462e50 Add performance gh action (#6497)
Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Add performance gh action

- Add new performance github action, running python and csharp benchmark
  algorithms
- Adjusting algorithms length so they are not too long or too short

* Checkout master branch benchmark reference
14301
2022-07-20 18:15:38 -03:00
Martin-Molinero c43f472503 Fill model will use internal configurations (#6494)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Fill model will take into account internal configurations, this is
  specially relevant for continuous future mapped contracts. Updating
  regression algorithms and unit tests.
- Allowing internal configurations to update trade builder information
14287 14291 14298
2022-07-19 19:00:35 -03:00
Jhonathan Abreu 6c93af96a1 Disable MOO orders for futures out of regular market hours (#6480)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Remove suppport for market orders and MOO orders for futures

* Add regression algorithm to assert that limit orders are filled on after hours for futures

* Remove suppport for market orders and MOO orders for futures in DefaultBrokerageModel

* Update regression algorithms stats

* Fixed regression algorithm and clean up

* Add unit tests

* Fix regression algorithms

* Address changes request
14284
2022-07-19 16:18:06 -03:00
Martin-Molinero b3cb24a16f Update readme.md
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
14283
2022-07-19 14:39:14 -03:00
Jhonathan Abreu 38f7e72dbe Add delisted futures and FOP regression algorithms with daily resolution (#6493)
* Add regression algorithms for delisted futures with daily resolution

* Add regression algorithms for delisted futures options with daily resolution

* Updated documentation
2022-07-18 17:53:43 -03:00
Martin-Molinero a9073396bd Add WarmUpResolution pass through (#6487)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Add new WarmUpResoltuion pass through version for friendly
user experience. Adding unit test
14277 14279 14280
2022-07-18 13:47:04 -03:00
Martin-Molinero b7df632294 Correctly handle Polygon authentication sequence (#6485)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Correctly handler Polygon data queue handler authentication sequence
14276
2022-07-18 13:40:21 -03:00
Martin-Molinero 38772a5a89 Do not apply split during live warmup (#6488)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Do not apply split during live warmup. Adding unit tests asserting the
  behavior for live dividends and splits during warmup and non warmup
14273
2022-07-15 18:17:26 -03:00
Martin-Molinero 7540af454c Warmup resolution respected (#6467)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Respect warmup resolution given

- The data feed will respect the warmup resolution given and override
  the resolution used by the algorithm when adding a subscription.
  Updating regression algorithm to keep previous statistics. Adding new
  regression algorithm asserting the desired behavior

* Testing improvements

- Add more unit tests and regresion test
- Add missing data for crypto
- Fix bug with FFed data crossing after the end time of the warmup
  request

* Add more Warmup resolution regression algorithms

- Adding more warmup resolution regression algorithms, using
  Settings.WarmupResolution and an option selection case

* Add more warmup regression tests

- Adding more warmup regression tests.
- Will no longer skip universe selection subscriptions from warmup
  resolution enforcement. Updating regression algorithms data points

* Fix bug with data rounding

- Fix data rounding bug when warmup resolution is set to a different
  value than the original configuration. Updating regression algorithms
  to assert the expected behavior

* Address reviews

- Revert regression algorithms changes to use Resolution during warmup.
  Updating their stats.
- Adding new regression algorithms asserting the behavior warming up
  using a timespan and no warmup resolution
- Fix bug where data used to warmup the 'normal' enumerator will make it
  through into the warmup time span. Updating tests

* Address reviews

- Add missing comments, explaning warmup algorithms time span
  calculations.
- Revert changes in existing `WarmupOptionTimeSpanRegressionAlgorithm`
  to reduce diff to minimum
- Adding new warmup unit tests asseting algorithm warmup start time, for
  different combinations of bar count, timespan, resolution
14271
2022-07-15 13:05:06 -03:00
Derek Melchin cd06e87493 Update data normalization mode comments (#6486)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Update Data Normalization Mode enum descriptions

* Extend descriptions
14268 14270
2022-07-15 11:10:52 -03:00
Ricardo Andrés Marino Rojas 5200a9e593 Add ReadBacktestOrders() and ReadLiveOrders() methods (#6329)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* First commit

* Any change

* Add more unit tests

* Nit changes

* Changes requested

* Fix bugs and requested changes

* Requested changes

* More changes

* Check ongoing backtest orders

* Read ongoing backtest does not fail

* nit change

* Fixes for standarized API orders response

- Fixes for a standarized API read orders reponse

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
14263
2022-07-14 16:02:58 -03:00
Martin-Molinero 07aa5625e1 Avoid division by zero error in backtesting result handler (#6484)
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Minor improvements

- Avoid division by zero error in backtesting result handler. Race
  condition where the SetAlgorithm implementation would still be running
  and we try to loop through the update method
- Improvement nullreference exception message
- Cleanup resolution to timespan extension method

* Address reviews

- Cleanup data config fill forward conditional statement for tick
  resolution
14262 14260
2022-07-14 12:54:55 -03:00
Martin-Molinero 31fc7ac236 Do not generate Equity Quote Daily data (#6483)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- Fix for so the random data generator does not try to create daily
  equity quote data
14258
2022-07-14 10:20:34 -03:00
Martin-Molinero e6f8a7535e Fix live future and option universe selection daily resolution (#6482)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Fix live future and option universe selection daily resolution

- Adding unit test reproducing issue for option and future universe
  chain using daily resolution, since was rounding down in UTC TZ the
  date might not change and it would re emit the same data point

* Address reviews

- Add more test cases
- Adding locks around RegisteredSecurityDataTypesProvider to allow it to
  be used by multiple threads at the same time without exploding
14256
2022-07-13 19:10:13 -03:00
Martin-Molinero 778d436b94 Removed mapped futures contract is non tradable (#6479)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Minor fixes for mapped futures contract

- Future security was never able to be non tradable
- Skip remove future contracts from live holdings. Adding unit test
  reproducing issue and regression algorithm

* Fix removal of continuous futures

- The canonical continuous future would leave behind an OpenInterest
  subscription when removed because of a different in the way the
  configurations were built, this will now be centralized in a single
  method. Adding unit tests reproducing issue
- FillForwarding setting of the continuous future was not being
  respected. Updating algorithm reproducing the issue to assert the
  behavior failing in master

* Address reviews

- Minor refactors addressing reviews
14252 14255
2022-07-13 15:36:24 -03:00
Martin-Molinero 36ddf1c618 Update config.json 2022-07-13 15:33:48 -03:00
Martin-Molinero 632833caaa Minor live related testing changes (#6481)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
- The history provider manager will log the underlying instances it's using.
- Allow brokerage test suites to reuse the algorithm stubs class
14251
2022-07-13 15:26:45 -03:00
Martin-Molinero 6200988ad5 Fix result handler live holdings (#6478)
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Fix result handler live holdings

- Live result handler live holdings will include future assets
  associated with continuous futures. Adding unit tests

* Fixed for live holdings price rounding

- Live holdings will use the SPDB minimum price variation for rounding.
  Adding unit tests
14242 14244 14245
2022-07-12 18:31:35 -03:00