11197 Commits

Author SHA1 Message Date
Martin-Molinero 0a315b0ae6 Update readme.md
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13230 13232 13233
2021-11-17 19:59:03 -03:00
Colton Sellers 33599b473d Refactor Delistings Processing (#6059)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Move processing of delistings to Brokerage

* Deal with case that exchange is not open on OptionSymbol.ID.Date

* Refactor solution to use DelistingNotification event

* Adjust some regression expected liquidation time

* Mark some todos on deprecated functions

* Update expected liqudation time for Py regressions

* Update regressions that have been validated

* Use HandlePositionAssigned for assignment orders

* Update regressions

* Update some missed unit tests; remove one that is already covered by regression

* Cleanup deprecated backend functions

* nit - small cleanup adjustment

* Post rebase fix

* Address review

* Minor tweak to py regression
13226 13227 13229 13228
2021-11-17 17:43:35 -03:00
Jovad Uribe 325e788728 Super Trend Indicator (#6013)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Super Trend Indicator #4653

* Updated test data

Previous test data was wrong

* Reduced if statement

* Updated tests

Replacing spy test data with dwac test data from trading view.

* Minor comment update

* Minor tweaks

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
13225
2021-11-17 12:19:26 -03:00
Martin-Molinero 57ac4d6497 Add import for System.Drawing (#6063)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13224
2021-11-17 11:28:09 -03:00
Martin-Molinero 664dca2236 Tradier websocket bug fix (#6061)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Tradier brokerage will use BaseWebsocketsBrokerage which handled
  websocket resubscription. Minor API changes
13221
2021-11-16 18:44:38 -03:00
Ricardo Andrés Marino Rojas 5415fe6bc0 Beta indicator (#6042)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* First BetaIndicator prototype
- In construction

* Fist BetaIndicator version and unit tests

* More unit tests and regression test

* Nit change

* Requested changes

* Nit changes

* Requested changes

* Adjust beta formula slightly and nit changes

* Nit change
13217 13218 13219
2021-11-15 15:57:24 -03:00
Martin-Molinero b2517cbbb4 Fix DiskDataCacheProvider. Expanding unit test (#6058)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13216
2021-11-15 15:57:09 -03:00
Martin-Molinero b8b0d18993 Continuous futures (#6034)
* Continuous Future Contracts

* Mapping approach

* Tweaks WIP

* Live mapping

* Live mapping

- Add support for live mapping, refreshing mapfiles
- Fix future expiration functions
- Adding unit tests

* Update moq test package

* Continuous futures price scaling

* Refactor price factors scaling

* Factor file related renames

* Address reviews
2021-11-15 14:44:30 -03:00
Martin-Molinero ad865e2a53 Add new CustomWeight, AlphaModel for AlphaStreams (#6052)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Add new CustomWeight PCM for alpha streams
- Add new AlphaStreams AlphaModule that will handle security additions
  and removals, removing this logic from AlphaStreamsBasicTemplateAlgo
13213
2021-11-15 14:33:16 -03:00
Martin-Molinero 57f0d17c5d Remove user plan enum (#6055)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Remove user plan enum

- Get maximum order and runtime from job controls
- Remove user plan enum definitions

* Add log for BacktestingSetupHandler maximums
13211
2021-11-12 19:37:23 -03:00
Ricardo Andrés Marino Rojas d234d69abc Give timer more time (#6053)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13201 13202 13203 13209 13210
2021-11-12 13:41:56 -03:00
Colton Sellers dd4da7ba95 Feature Daily/Hourly Options Support (#6017)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Create generic writing for LeanDataWriter, + notes on todos

* Make Options Daily/Hourly data store by year

* Refactor Generic Write

* Permit hour and daily resolutions for options

* Refactor writer to merge when needed with other files

* Cleanup redundancies, run write tasks in parallel

* Make needed classes/vars available

* Update tests to reflect new naming convention for daily hourly options data

* Add Byte[] overloads for ZipData functions in compression

* Implemented Store() for ZipDataCacheProvider

* Have LeanDataWriter use a DataCacheProvider

* ZipDataCacheProvider cleanup

* ZipDataCacheProvider tweaks, doesn't support storing non-zips

* Test adjustments

* Update LeanDataWriter to use Write instead of SaveDailyHourly/SaveMinuteSecond

* Implement tests to verify DownloadAndSave behavior

* Nit cleanup on DownloadAndSave tests

* Fix for options daily/hourly underlying equity subscription read

* Add daily/hourly options data and regressions

* Add missing open interest for hourly

* Fix writing of OpenInterest Daily/Hourly data

* Update data

* Fix Date typo in regression

* Use daily algorithm to test delisting

* Revisions part 1

* Expand test for DataCacheProviders; refactor DiskDataCacheProvider

* nit - test adjustments

* ZipDataCacheProvider test setup refactor

* Adjust multithreaded read/write test; fixes for ZipDataCacheProvider

* Move DiskDataCacheProvider to its own file and add write test

* Remove _appendToZips; always overwrite entry or create zip

* Add mapping regression for daily options

* nit - add license to regression

* Fix Tick write case where more than one data point for a DateTime

* Fix data issue

* Address review

* Tweaks for tests

* Stop Store() early if no entry name is given
13196 13199 13200
2021-11-11 20:05:31 -03:00
Martin-Molinero 27f5223cd2 Pin dotnet interactive version for net5 (#6048)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13186 13188 13189 13193 13194
2021-11-10 13:00:59 -03:00
Adalyat Nazirov b3d3df3a3c rate limit is dependent on Account Tier, Tier1 by default (#6046)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13179 13180 13181
2021-11-09 16:44:29 -03:00
Ricardo Andrés Marino Rojas 3c1ddb7b96 Enable Warm Up process in MacdAlphaModel (#6037)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Warm up MACD indicators
- When a security is added in the MACD alpha model, it's warm up at once

* Add unit tests

* Nit change

* Code style and nit changes
13162 13165 13167
2021-11-04 12:15:32 -03:00
Ronit Jain 926ac3879a Add try-catch and null check (#6038)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13161
2021-11-03 20:07:47 -03:00
Martin-Molinero 0327b2012c Add default value for Exchange security types (#6032)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13134 13138 13139 13146 13147 13148 13149 13150 13151 13152 13157 13158
2021-11-01 12:05:15 -03:00
Martin-Molinero cd5e1d9c54 Can serialize unknown exchange. Adding test (#6031)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13130
2021-10-29 09:13:52 -07:00
Ricardo Andrés Marino Rojas fc6ddc2120 Feature 5988 WarmUpIndicator() method for indicators written in Python (#6027)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Implement IIndicatorWarmUpPeriodProvider
- Implement IIndicatorWarmUpPeriodProvider in PythonIndicator.cs
- Make a unit test to check whether the WarmUpPeriod is working as expected
- Make a regression test to check the new feature at a system level

* Nit change

* Change Period parameter for WarmUpPeriod parameter
- Change regression test to check if the new parameter keep backwards compatibility with indicators that do not set WarmUpPeriod

* Documentation change

* Fix tests bugs
- In CommonIndicatorTests.cs before finish the test it checks the period.value with the number of samples but for default the period.value was set to -1

* Change names

* Change WarmUp and RegisterIndicator methods
- Lean WarmUp indicator skip custom python indicators that don't define WarmUpPeriod parameter

* Call WarmUpIndicator manually
- Add a new "bridge" method called WarmUpIndicator in QCAlgorithm.Python.cs to set up everything to call WarmUpIndicator in QCAlgorithm.Indicators.cs
- Change the regression algorithm to warm up the indicators manually

* Remove unnecessary code and add more tests

* Nit change

* Revert "Nit change"

This reverts commit da411f59c9e4295d75a11c6c581f615a938dd2c6.

* Fix bugs

* Try fix bugs

* Add C# regression test
- More nit changes
- Fix bugs

* Requested changes

* Remove unnecessary code

* Requested changes

* Nit changes
- Add new Python class to check a custom indicator, which doesn't inherits from PythonIndicator, warms up properly

* Reduce redundant code

* Fix bug and add more unit and regression tests

* - Add more unit tests

* Nit change

* Test cleanup

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
13129
2021-10-28 20:29:22 -03:00
Ricardo Andrés Marino Rojas 013b9ea850 Set WarmUpPeriod value in MarketProfile constructor (#6029)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- Remove unnecessary attribute `_period` in MarketProfile
- Set the value of WarmUpPeriod to the period in MarketProfile constructor
- Fix unit test to check VolumeProfile and TimeProfile indicators are being warmed up properly and its WarmUpPeriod parameter isn't zero
13128
2021-10-28 19:54:11 -03:00
Martin-Molinero 9f29e3bf4e Some performance improvements for IndexOptions (#6025)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Some performance improvements for IndexOptions specially affects
  debugging C# algorithms.
13124 13125
2021-10-27 20:26:51 -03:00
Alexandre Catarino 4ecdf14ce8 Include Security Master Url to ApiDataProvider Error Message (#6023)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13113 13115 13116 13117 13118 13123
2021-10-27 14:58:15 -03:00
Martin-Molinero ede2d4a5e4 Lazy loading of the SecurityDefinition file (#6024)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- Perform a lazy loading of the security definitions file. Adding unit
  tests
13112
2021-10-27 14:57:50 -03:00
Martin-Molinero 8c71dbc8ba Revert "Feature 5988 IIndicatorWarmUpPeriodProvider for custom PythonIndicator (#5992)" (#6022)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
This reverts commit 995f598999.
13110
2021-10-26 22:07:22 -03:00
Martin-Molinero d17865b2cf CoinApi read previous date file (#6019)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- If available, CoinApi converter will read previous date files to
  rescue initial midnight ticks for the processing date. Also make sure
  to drop ticks from tomorrow
13106
2021-10-25 20:26:12 -03:00
Martin-Molinero 7b3b560dea Foundation update CVXPY 1.1.15 (#6020)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Update cvxpy python package version to latest 1.1.15. To avoid
  installation issue `error in cvxpy setup command: use_2to3 is invalid`
13105
2021-10-25 18:45:07 -03:00
Ricardo Andrés Marino Rojas 995f598999 Feature 5988 IIndicatorWarmUpPeriodProvider for custom PythonIndicator (#5992)
* Implement IIndicatorWarmUpPeriodProvider
- Implement IIndicatorWarmUpPeriodProvider in PythonIndicator.cs
- Make a unit test to check whether the WarmUpPeriod is working as expected
- Make a regression test to check the new feature at a system level

* Nit change

* Change Period parameter for WarmUpPeriod parameter
- Change regression test to check if the new parameter keep backwards compatibility with indicators that do not set WarmUpPeriod

* Documentation change

* Fix tests bugs
- In CommonIndicatorTests.cs before finish the test it checks the period.value with the number of samples but for default the period.value was set to -1

* Change names

* Change WarmUp and RegisterIndicator methods
- Lean WarmUp indicator skip custom python indicators that don't define WarmUpPeriod parameter

* Call WarmUpIndicator manually
- Add a new "bridge" method called WarmUpIndicator in QCAlgorithm.Python.cs to set up everything to call WarmUpIndicator in QCAlgorithm.Indicators.cs
- Change the regression algorithm to warm up the indicators manually

* Remove unnecessary code and add more tests

* Nit change

* Revert "Nit change"

This reverts commit da411f59c9e4295d75a11c6c581f615a938dd2c6.

* Fix bugs

* Try fix bugs

* Add C# regression test
- More nit changes
- Fix bugs

* Requested changes

* Remove unnecessary code

* Requested changes

* Nit changes
- Add new Python class to check a custom indicator, which doesn't inherits from PythonIndicator, warms up properly

* Reduce redundant code
2021-10-25 18:08:57 -03:00
Martin-Molinero 43c271a568 Atreyu template algorithm change traget SPY exchange (#6016)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13101
2021-10-25 15:43:35 -03:00
IlshatGaripov 2e4252c92b LiveTradingResultHandler -> changes access modifier of SetNextStatusUpdate (#6015)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13100
2021-10-25 11:17:35 -03:00
Adalyat Nazirov 0f189aa2b4 FTX brokerage rejects STOP order if market price missed (#6009)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* cannot submit stop orders with bad trigger price

* unit tests

* expect price data
13099
2021-10-25 11:14:41 -03:00
IlshatGaripov f55588e4c6 SecurityHolding -> impl. ToString() (#6014)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13098
2021-10-25 11:07:34 -03:00
Martin-Molinero 58ccdee1b1 PythonNet version bump 2.0.10 (#6010)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13095
2021-10-22 20:27:38 -03:00
Colton Sellers 6bd2859f64 Update to PythonNet 2.0.9 (#6004)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13087 13094
2021-10-21 20:06:38 -03:00
Alexandre Catarino 3ff7882dbf Round AverageLoss to Avoid Very Small Numbers (#6003)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13083 13085 13086
2021-10-21 17:00:31 -03:00
Martin-Molinero dace6d7ee1 Fix index live target exchange (#6000)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13073 13080 13081 13082
2021-10-20 17:26:25 -03:00
Colton Sellers 71d9eed07e BuyingPowerModel Fixes (#5996)
* Refactor error message for reproducability

* WIP Refactor GetMaximumOrderQuantityForTargetBuyingPower

* Additional tweaks and tests

* Address shorted margin case

* Reinstate tests with new modified function

* Update regression

* Some cleanup

* Expand test set

* Refactor solution

* Address review

* Final adjustments and cleanup

* Expand error message for GetAmountToOrder for safety and reproducibility

* Address reviews
2021-10-20 16:37:20 -03:00
Stas Kotykhin c4a4550a66 Override History provider in kraken environment (#5998)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* add history-provider field to config.json

* Add comment
13071
2021-10-20 16:36:34 -03:00
bmello4688 67081a8a05 Add virtual overrides for pivotpointshighlow computations (#5987)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Add base class for pivotpointshighlow

* abstracts do not work well with python switch to virtuals and use pivotpointhighlow as base implementation

* added missing documentatino header

* moved reset back to original location
13062 13066 13067 13068 13069 13070
2021-10-19 21:45:18 -03:00
alexgallotta a567053404 fix build command with dotnet (#5990)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13060
2021-10-18 16:55:56 -03:00
Martin-Molinero 56b8ccc4b4 CoinApi log error on duplicate symbol (#5989)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13059
2021-10-15 20:31:55 -03:00
Martin-Molinero 5f65677ede Add suuport for coinApi kraken ftx exchanges (#5985)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13056
2021-10-15 11:24:30 -03:00
Ricardo Andrés Marino Rojas def916aed1 Add IIndicatorWarmUpPeriodProvider for WindowIndicator.cs and Identity.cs indicators (#5984)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Implement IIndicatorWarmUpPeriodProvider interface in both indicators
- Add test to check the new functionality is working as expected. To test WindowIndicator IIndicatorWarmUpPeriodProvider there was used WindowIdentity indicator tests because that indicator only inherits from it
13055
2021-10-15 11:10:59 -03:00
Adalyat Nazirov 46ce138fa1 move methods for further usage across other brokerages (#5981)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13054
2021-10-14 17:08:11 -03:00
Martin-Molinero b8768ae274 Add FOPs price magnifier (#5979)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Add FOPs price magnifier

* Improve unit tests
13050
2021-10-14 11:57:48 -03:00
Ricardo Andrés Marino Rojas db04b5e110 Feature 5930 price magnifier (#5977)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Update SPDB with price magnifier parameter
- Add a new column for new parameter in symbol-properties-database.csv
- Change InteractiveBrokersBrokerage.cs implementation of GetContractPriceMagnifier() method in order to get the parameter directly from the SPDB
- Add test in SymbolPropertiesDatabaseTests.cs to check if the new parameter is loading properly

* Change GetContractPriceMagnifier() method name and implementation
- Change NormalizePriceToLean() and NormalizePriceToBrokerage() methods

* Nit change in GetSymbolPriceMagnifier() method

* Remove GetSymbolPriceMagnifier() method
- Remove redundant and unnecessary parameters in NormalizePriceToLean() and NormalizePriceToBrokerage()

* Requested changes and SPDB update
- Update SPDB with minimum order size parameter for futures in cents. The minimum order size parameter was extracted from the CME group API

* Address reviews. Adding unit test for failing case

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
13049
2021-10-14 11:16:23 -03:00
Colton Sellers cff3640f15 Update to PythonNet 2.0.8 (#5978)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
13048
2021-10-13 20:19:06 -03:00
Martin-Molinero b5574a7986 Do not emit zero quantity Exercise Order events (#5976)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- BrokerateTransactionHandler will not emit zero quantity Exercise order
  events. Updating unit tests
13044 13045 13047
2021-10-12 19:38:37 -03:00
Martin-Molinero c638f82337 Adjust Bitfinex currency fee error message (#5975)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13042
2021-10-12 17:05:27 -03:00
Adalyat Nazirov 3a591c3a72 Fix Binance ExchangeInfo downloader (#5965)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* fix exchangeinfo downloader

* normalize data, update symbol properties

* min ordersize should be in base currency

* check min order size using quote currency price

* check order size in quote currency

* improve checks

* improve code; more unit tests

* more description

* fix failing test
13040 13041
2021-10-11 12:36:41 -03:00
Martin-Molinero fdfb1b54c0 Add Binance debugging logs (#5974)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
13039
2021-10-11 11:55:12 -03:00