11271 Commits

Author SHA1 Message Date
Martin-Molinero ca9e55fda6 Add null check for Tradier GetQuotes (#6170)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Fixing bug where tradier GetQuotes could return null in cases where
  the provided symbol would not match any. Adding unit test.
13541 13542 13543 13545 13544
2022-01-26 19:55:27 -03:00
Martin-Molinero b698641c90 Minor tweak for ApiDataProvider to support India (#6169)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Minor tweaks for the ApiDataProvider to better support India market
13530 13533 13534 13536 13537 13538 13539 13532
2022-01-24 21:27:22 -03:00
Ronit Jain e5c709ee29 Extract zerodha brokerage out of LEAN (#6163)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Remove zerodha brokerage

* use different brokerage for tests

* remove zerodha files with conflict

* remove redundant dependecies
13528
2022-01-24 18:43:12 -03:00
Martin-Molinero ca787d0a25 Add support for live price scaling (#6104)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Add support for live price scaling

- Add support for live trading price scaling for continuous futures.
  Adding unit tests

* Move live price scale application. Updating unit tests

- Live trading application of price scaling will happen before fill
  forwarding and updating securities real time price. Updating unit
  tests to reproduce issue
13525
2022-01-24 18:02:24 -03:00
Martin-Molinero b1a1277eca Fix GetLastKnownPrices resolution usage (#6165)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- GetLastKnownPrices will no longer guess which resolution to use but
  rely on other methods implementation/
- Updating basic template future algorithms to warmup contracts and
  assert it
- Minor improvements for FunSecurityInitializer and FuncSecuritySeeder
13520
2022-01-21 18:00:53 -03:00
Martin-Molinero 30d7fb042b Always reuse aggregator instance if any (#6161)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Always reuse aggregator instance if any

- When fetching a IDataAggregator instance from the composer, do not
  enfore type name on existing instances

* Fix unit tests
13513 13514 13515 13516
2022-01-20 18:52:22 -03:00
Ronit Jain d1bb70fbb7 Add account currency and IRegressionAlgorithmDefinition (#6159)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add account currency

* update stats

* use market order, same as c#
13507 13508 13509 13510
2022-01-19 18:25:57 -03:00
Ricardo Andrés Marino Rojas 0946bfc2fb Enable users to use symbol tickers when using Toolkit (#6158)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* If the market ticker has a ":" the user can use the symbol ticker

* Nit change
13506
2022-01-19 15:42:21 -03:00
Ronit Jain f34be8e3ff Feature add India index algorithms and data (#6145)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* add data

(cherry picked from commit 814011d89e5316d150f88ffca5f48d8d5f0ea7d9)

* update market hours for index

(cherry picked from commit edac40732c120eb84d27de00594b59eebb4983f5)

* add index algorithms

(cherry picked from commit b22d27b4fa98172c435f7c26de4a3a297c49a6b7)

* update statistics

* add cash

* Add india market

* add leverage for index

* can subscribe to index

* update format

* fix wrong cash

* fix ticker names

* update data

* update ticker and stats

* update docs
13505
2022-01-19 12:14:48 -03:00
Martin-Molinero e1d1e28bb8 Fix for Tick subscription history requests (#6156)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- Fix for history requests != Tick for existing subscriptions with Tick
  resolution. Adding unit test reproducing issue
13502 13503 13504
2022-01-18 17:36:27 -03:00
Colton Sellers 5ea9f04b10 Deprecate PTVSD for DebugPy (#6153)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Deprecate PTVSD for DebugPy

* Replace all references to PTVSD with debugpy

* Address review
13480 13481 13482 13485 13486 13487 13488 13489 13490 13494 13499 13500 13501
2022-01-13 09:45:12 -03:00
Adalyat Nazirov 2529ba124d FTX API endpoint is cinfigurable (#6026)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* specify enpoint url of ftx api (can be FTX pr FTX.US)

* more metadata for ftxus

* tidy up code

* tests

* more tests

* fix tests

* fix us fee rates

* add account tier

* update symbol props

* typo

* typo-2

* update symbol properties

* use FTXUS fee model

* minor tweaks
13477
2022-01-12 13:51:18 -03:00
Ricardo Andrés Marino Rojas 472f78cc53 Remove Quandl from LEAN (#6110)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Remove Quandl from LEAN

* Nit changes and CustomLiveDataFeedTests.cs

* Resolve conflicts

* Remove files related with Quandl

* Fix bug

* Fix QuantBookHistoryTests.cs

* Fix bug

* Fix bug

* Fix unit tests

* Try fix regression tests

* Nit changes

* Fix bug

* Some of the requested changes

* The missing changes

* Requested changes

* Nit changes

* Revert "Nit changes"

This reverts commit 9800bc5c34f3ac20e30bea7a92dd4a9867213bb5.

* Nit changes

* Fix bug

* Requested changes

* Missing file using Quandl to be removed

* Nit changes

* Not applied nit change

* Nit change

* Nit change

* Add nasdaq-auth-code parameter in config.json

* Remove 'quandl-auth-token' from config.json

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
13476
2022-01-12 12:10:20 -03:00
Adalyat Nazirov 0c26d42561 Feature 2839 black scholes data generator (#6135)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* replace to local functions as they are more performant

* fix random generator upper bound

Next() includes minValue, but not maxValue, so we increment it +1

* introduce abstract layers

* refactoring

* fix tets

* adapt tests

* fixup

* implement blackschole price model for options

* use risk free rate

* use ql price model

* wip

* change interface

* fix

* tidy up the code

* wip

* iterate groupped symbols

* wip

* wip

* fix

* allow symbol of different types

* improve settings

* wip

* iterate full range

* fix issue with negative option

* fix

* fixup

* use StandardDeviationOfReturnsVolatilityModel

* re-use existing tick types per security type

* parametrize underlying security type

* use default option style

* dynamic option price model

* fix enumeration

* test

* fix unit tests

* refactor code

* remove unused file

* minor tweaks and refactoring

* rename symbol generator class

* fix interface

* add comments

* more comments and unit tests

* more tests

* add disclaimer

* more tests

* more comments and tests

* split tests into different files

* tidy up the code

* tidy up the code; more tests

* refactor TickGenerator => use security price directly on each iteration

* remove dupe; reuse main constructor

* use SecurityManager, refactor code

* bugfix: save ticks in history array

* check volatility warm up & tests

* more unit tests

* describe volatility period span in settings

* rename command line option

* Minor adjusments. Address review

- Use Lean log handler instead of writting directly to console
- Rename BlackShcolesPriceGenerator to generically OptionPriceModelPriceGenerator
- Minor format clean up & standarization
- Add support for specifying the option chain size

* Rename TickGenerator private fields

* Fix unit tests

* fix tests class name

* Support tickers being specified

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
13465
2022-01-10 17:21:03 -03:00
Martin-Molinero 4b94f50754 Option selection improvements (#6144)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Zip entries will be sourced from cache provider
- Option underlying will use SubscriptionDataSource to fetch it's data.
  Fixing bug where it would let through an old data point, or miss
  sending data through.
13462 13464
2022-01-10 11:18:28 -03:00
Martin-Molinero 5bdc60b137 Fix for warmup history requests when internal subscriptions present (#6146)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13461
2022-01-10 11:10:44 -03:00
Ronit Jain 3837c32b36 Add India market local data and regression algorithm (#6088)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Add india market data

* use local data for algo

* Add India market regression algo

* update india market data

* Update readme

* add python algo for BasicTemplateIndiaAlgorithm

* Add India data regression python algo

* data india data files

* update tickers

* Fix algo template

* remove data

* fix stats

* update stats

* remove unused data
13445 13454 13456 13457 13459
2022-01-06 18:24:32 -03:00
Ronit Jain 0e298edcb2 use compression library (#6142)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13440 13441
2022-01-05 15:19:41 -03:00
Martin-Molinero 7a753bfa3f Live mapped subscription will clone the underlying (#6141)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- Live subscription enumerator will clone the underlying data set when
  live mapping is being done. To avoid issues where IDQH implementations
  could reuse a data point with same configurations. Adjusting unit test
  to reproduce issue
13439
2022-01-05 13:45:52 -03:00
Martin-Molinero 8e2554b110 Add continuous futures MHDB always. Adding unit tests (#6139)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13436
2022-01-04 20:31:31 -03:00
Martin-Molinero bfa58b4692 Fix IB Hong Kong Future Exchanges fees (#6133)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Fix IB HongKongFutureExchanges fees. Adding test

* Minor self review tweak
13422 13425 13426 13428 13429 13430 13431 13432 13433 13434
2021-12-28 20:12:59 -03:00
Martin-Molinero e3375bc45e Pin conda and pip foundation versions (#6134)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13421
2021-12-28 18:14:17 -03:00
Martin-Molinero ac8b500ba2 Foundation update: Ray, H2o & IB (#6126)
* Foundation remove Ray update H2o

* Update IB version to 10.12.2d
2021-12-28 16:17:52 -03:00
Omid K. Rad 2557a36feb Bug: Config.TryGetValue returns true if key is not found (#6128)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Fix typo

* Fix TryGetValue to return false if key is not found

* Revert "Fix TryGetValue to return false if key is not found"

This reverts commit b85b7b579aa722e1fec2599afbeee61163334184.

* Update documentation for TryGetValue
13416
2021-12-28 12:19:46 -03:00
Martin-Molinero 55cb3bdaff ApiDataProvider Support Future map & factor files (#6132)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- Add support for the ApiDataProvider to handle future map and factor
  files downloads. Adding unit test
13413
2021-12-27 21:52:51 -03:00
Martin-Molinero 10bb627fc2 Update to pythonNet 2.0.11 (#6131)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13412
2021-12-27 15:49:24 -03:00
Alexandre Catarino 3d3733c0fb Adds Market.HKFE to InteractiveBrokersFeeModel (#6127)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Adds `Market.HKFE` to `InteractiveBrokersFeeModel` in the Futures Options case.
13397 13398 13399 13400 13401 13402 13403 13404 13409 13410 13411
2021-12-22 19:32:07 -03:00
Martin-Molinero 1303ccf843 Update readme.md
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13395 13396
2021-12-22 17:16:41 -03:00
Martin-Molinero 3b5f3fcf42 Update readme.md
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13394
2021-12-22 16:18:09 -03:00
Andreas Sundebo e2de241c2b Feature 5090 add api optimization methods (#6108)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Move Optimizer-related DTOs and JSON converters into Common/Optimizer

* Add REST methods for Optimization

* Move OptimizationStatus into Common

* Change optimizationId parameter type to string

* Update Optimization and add lightweight optimization object

* Rename lightweight optimization to BaseOptimization and remove unneccessary properties

* Remove snapshotId from Optimization, add ParameterSet to Backtest

* Add missing IApi.cs method signatures

* Move ParameterSet into Common

* Replace Backtest with OptimizationBacktest

* Update UpdateOptimization to not include null or empty name and layout params in the request

* Change Objective targetTemplate regex pattern from ['(.+)'] to (.+) to prevent escaping target strings without whitespace

* Return Estimate object when calling EstimateOptimization

* Use DefaultNamingStrategy when serializing constraint operators

* Revert "Change Objective targetTemplate regex pattern from ['(.+)'] to (.+) to prevent escaping target strings without whitespace"

This reverts commit fbe7de0fd77dccc62e8c52c42a4ec9c18347acb2.

* Update Api method signatures

* Add unit tests

* Fix XML comment referring to the old class name

* Fix XML summary for OptimizationResponseWrapper

* Address review feedback
- Remove unused testOrganizationId
- Change NodeType from string to NodeType enum
- Clarify unit types for Estimate time and balance
- Simplify JsonConverter classes

* Add accessors to Common/Api classes

* Define performance metrics names in PerformanceMetrics class

* Remove unnecessary branching logic from GetSeriesValues method

* Add crefs and examples to XML comments in the Api class

* Revert "Change NodeType from string to NodeType enum"

* Remove layout param from UpdateOptimization method

* Backtest property ParameterSet should be of type ParameterSet

* Add asserts for deserialization in OptimizationBacktestJsonConverterTests

* Replace the three target-related properties with Criterion

* Add serialization and deserialization tests for Optimization

* Remove Optimization Serialization test

* Add EstimateDeserialization test

* Add asserts for integration tests

* Address self review

* Revert test case

* Update Nodes.cs

* Update Nodes.cs

* Set Aborted status when Optimization fails to start

* Add ParameterSetJsonConverter and ParameterSetJsonConverterTests

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
13390 13393
2021-12-22 13:14:56 -03:00
Martin-Molinero 68e2a9170a Do not send internal SecurityChanges to Algorithm (#6118)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Do not send internal SecurityChanges to Algorithm

- Will not send internal security changes to the Algorithm by default.
  Following custom security changes filter pattern. Updating regression
  algorithms to assert behavior.
- The universe member will know wether it was added with internal
  configurations or not

* Address reviews use a separate collection for internals

* Refactor solution. Adding security changes constructor class
13384
2021-12-21 20:24:32 -03:00
Adalyat Nazirov d395f704b3 Bug 6115 adjust dates (#6124)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* GH-6115: adjust dates

* fix

* use another approach

* Add lean data writter multiple days data unit test

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
13382
2021-12-21 17:33:36 -03:00
Martin-Molinero 4d1fc7e05a Handle security added and removed in the same loop (#6120)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Handle security added and removed in the same loop

- Correctly handle adding and removing a security in the same loop.
  Adding regression test

* Adding comments
13377 13381
2021-12-21 11:59:45 -03:00
Martin-Molinero e3a562d3c9 Add file and line number to documentation attribute (#6122)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13376
2021-12-20 17:30:04 -08:00
Martin-Molinero 4fdd60d146 Use 64 when saving zips update dotnetZip (#6114)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13369
2021-12-20 16:39:06 -03:00
Martin-Molinero abbb50e209 Minor improvements for data reading and caching (#6113)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Minor improvements for data reading and caching

* Address reviews

* Adjust zip cache error check
13359 13360 13361 13363 13364 13365 13368
2021-12-16 19:58:37 -03:00
Alexandre Catarino 0e1cc288a6 Change Default Market of CFD to OANDA (#6107)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Oanda is currently the only provider.
13348 13349 13350 13354
2021-12-13 17:58:57 -03:00
Martin-Molinero 3b826535c7 Fix for ConcurrentDictionary Thread Safety (#6105)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- ConcurrentDictionary with OrderBy is not thread safe, adding thread
  safe extension method. Adding unit tests
13347
2021-12-13 10:45:58 -03:00
Martin-Molinero 59da486e30 IB will correctly create non USD currency contract (#6103)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- IB will create contract based on SPDB entry for symbol. Adding unit
  test
13335
2021-12-10 13:56:32 -03:00
Martin-Molinero f42d7bb3a2 Align universe security and configuration TZ (#6102)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Align universe security and configuration TZ

- Make sure universe security and configuration tz are aligned always.
  Adding unit test reproducing issue

* Address review UserDefinedUniverse will use UTC TZ
13330
2021-12-09 15:53:56 -03:00
Martin-Molinero 87bd0d7792 CompositeDataQueueHandler handles duplicate configs (#6101)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* CompositeDataQueueHandler handles duplicate configs

- CompositeDataQueueHandler will handle duplicate subscriptions sharing
  the same config. Adding unit tests

* Refactor bug solution after review

- LiveSubscriptionEnumerator will not long perform any symbol mapping
  but will just trigger a new subscription call when remapped.
- CompositeDHQ will handling symbol mapping and keep track of these
  mapped configs to trigger unsubscribe accordengly. Adding unit tests

* Adjust solution after review

- To avoid breaking uniqueness of SubscriptionDataConfig will be adding
  a private `mapped` property that will change equality of mapped
  configs to avoid them clashing. Adding unit tests

* Rename IDQH subscription extension methods
13329
2021-12-09 14:53:04 -03:00
Louis Szeto 8ca9258e70 API Reference for docs v2 (#6098)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
API Reference for docs v2 

Co-authored-by: Alexandre Catarino <AlexCatarino@users.noreply.github.com>
13325
2021-12-08 16:25:36 -08:00
Martin-Molinero 72105539fc Minor Exchanges cleanup (#6100)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13320
2021-12-06 19:27:27 -03:00
Anuj Patel 589e8a9293 fix Kraken fee model (#6096)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Update KrakenFeeModel.cs

* Update KrakenFeeModelTests.cs

Co-authored-by: Anuj Patel <91538343+anuj-mitul-patel@users.noreply.github.com>
13318
2021-12-06 11:59:20 -03:00
Martin-Molinero dd27a382f7 Composite data queue handler IUniverseProvider (#6097)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Minor performance improvements

* CompositeDataQueueHandler is UniverseProvider

- CompositeDataQueueHandler implements the UniverseProvider interface.
  Adding unit tests
13317
2021-12-06 10:27:18 -03:00
Jovad Uribe 62a8aee38c Kaufman Efficiency Ratio Indicator (#6050)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Indicator

* Fixed logic error

* Removed old files, added KER into KAMA

* Removed old comments

* Added requested changes

* Minor clean up

* Refactors KaufmanEfficiencyRatio and KaufmanAdaptiveMovingAverage

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
Co-authored-by: Alexandre Catarino <AlexCatarino@users.noreply.github.com>
13315
2021-12-04 18:55:09 -03:00
Alexandre Catarino 7e7c27416b Updates KeltnerChannels to Update MiddleBand with EndTime (#6084)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Updates KeltnerChannels to Update MiddleBand with EndTime

* Adds Unit Test

This unit test shows that the timestamp of the MiddleBand and the indication are aligned as expected.
13313
2021-12-03 19:43:32 -03:00
Martin-Molinero 26f2f88c67 Add documentation attribute default value (#6095)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13311
2021-12-03 18:47:47 -03:00
Martin-Molinero c08c129860 Add documentation attribute (#6094)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13309
2021-12-03 18:23:06 -03:00
Martin-Molinero bae10389ae Update readme.md
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13307 13308
2021-12-03 17:15:58 -03:00