11015 Commits

Author SHA1 Message Date
Stefano Raggi 9a81414a94 IB Brokerage updates (#5744)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* IB Brokerage updates

- Update IBAutomater to v2.0.40
- Add config setting to enable export of IBGateway logs (default=false)
- Downgrade IB log level from Information to Warning

* Update IBAutomater to v2.0.41

* Trigger build
12232 12233 12234
2021-07-07 11:26:09 -03:00
Martin-Molinero 3f85c9ab82 Update readme.md
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12228 12230 12229
2021-07-06 23:06:03 -03:00
Martin-Molinero f062b54450 Update readme.md
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12221
2021-07-06 19:59:58 -03:00
Colton Sellers 64b95b2e8e MaximumOrderQuantity Error Log Expansion (#5741)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add more details to the log to improve insight into bugs

* Keep string formatting invariant
12217 12219 12220 12218
2021-07-06 19:26:49 -03:00
Martin-Molinero 7bcaaf8f23 Reduce dockerfoundation size (#5740)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
- Clean files and conda after each docker build step
- Merge steps to reduce size
- Clear apt lists
12215
2021-07-06 17:42:19 -03:00
bmello4688 8383163aae fixed problems with testcasesource (#5722)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12210 12212
2021-07-06 12:04:04 -03:00
bmello4688 04f3c850ba test fails sometimes from a race to check value (#5720)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* test fails sometimes from a race to check value

* add while limit
12209
2021-07-05 19:03:12 -03:00
Martin-Molinero 5bd0675423 Fix minor race condition in brokerage message handler (#5736)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Fix minor race condition in brokerage message handler

- Fix race condition where a message could be enqueued and
wait for a new call, not being processed ASAP

* Reduce BrokerageTransactionHandler logs
12208
2021-07-03 19:46:31 -03:00
Jasper van Merle 6eb3822193 Fix coarse universe generator crashing on single processor (#5735)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Fix coarse universe generator on single processor

* Make sure MaxDegreeOfParallelism value is not less than 1

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
12207
2021-07-03 19:08:55 -03:00
Martin-Molinero 12b62f6ec9 Add organization id to packet (#5733)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12204
2021-07-02 20:59:59 -03:00
Martin-Molinero 8d2455b629 Add BrokerageConcurrentMessageHandler (#5731)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add BrokerageConcurrentMessageHandler

- Add Brokerage helper `BrokerageConcurrentMessageHandler` class to lock message stream
while executing an action, for example placing an order, adding unit tests.
- Binance will use new message handler

* Fix unit test
12199
2021-07-02 19:11:25 -03:00
Colton Sellers 171f0f19d5 MaximumOrderQuantity Bug Fix (#5727)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Implement solution with lightest changes possible

* Update regressions v1

* Adjust AlgorithmTradingTests

* Adjust PatternDayTradingMarginBuyingPowerModel tests

* Drop need to loop twice

* Adjust last unit test, with calculations included

* nit - comment fix

* Break out adjustment calculation to static function; add unit test

* Update Py regression

* Upgrade adjustment calculation to be smart enough to get us to target always

* nit - cleanup GetAmountToOrder

* Add license to test

* nit - comment fix

* cleanup GetAmountToOrder further

* Add additional test cases
12197
2021-07-02 18:52:15 -03:00
Martin-Molinero e5a50109b4 DownloaderDataProvider improvements (#5730)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Ignore margin files requests. Only provided by ApiDataProvider
- Reduce noise by LeanData.TryParse() call on failure
12196
2021-07-02 14:03:16 -03:00
Ronit Jain c8d13080a8 Indian Market support for backtesting and live deploys through Zerodha (#5710)
* added symbolData class to store exchange and token values of tickers

* support for India Market

(cherry picked from commit 5f629dcb9e72426dc7b560e782cb1fae72861574)

* removed local vscode workspace file

* support for india market instead of nse and other exchanges

* changed hardcoded india values to Market.India

* changed zerodha getcash fromm available to net

* addded edge case handoing with expections

* support for market info (nse, bse) for india market

* exchange info for EmitQuoteTick

* basic testing with c#

* c# algo

* c# testing

* live orders during market open success

* support orderproperties for exchange value for order placement

* added exceptional handling cases

* fix xml descriptions for the files

* fix zerodha-product-type in DefaultOrderProperties

* add basic template for india market

* fix orderProperites for default values

* fix for local data, python implementation not available

* fix access modifiers of SymbolData

* fix variable name case

* fix single check for exchange, call to base

* fix styling, redundent code and access modifers

* fix non static not callable from static

* fix static
2021-07-02 11:06:47 -03:00
Rohan Sharma 8d352b6318 feat: Improve error message from ObjectStore (#5729) 2021-07-02 10:37:37 -03:00
Martin-Molinero 00cd8947a8 Update bitfinex channel Id (#5728)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12191
2021-07-01 21:42:17 -03:00
Gerardo Salazar c211d04798 Adjust AlgoSeek Futures price multipliers to quote/process prices in USD (#5725)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Adjust AlgoSeek Futures price multipliers to quote prices in USD

* Revert changes to AUP scaling

  * After a second review, seems that this contract isn't scaled.
    The contract multiplier differs from the NYMEX Aluminum Index's
    contract multiplier, and so does the minimum price variation.
    The minimum price fluctuation seems consistent with CME's
    quoted prices, which also claims the contract is quoted in USD.

* Fix futures contract multipliers for some scaled contracts
12189
2021-07-01 18:46:36 -03:00
Martin-Molinero 55195867a9 Reduce LTRH error log to debug (#5723)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12183
2021-06-30 16:44:52 -03:00
Gerardo Salazar c9a3ad35e1 Fix Futures SymbolRepresentation disambiguation of ticker with limited year information (#5715)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Fixes bug where future converter processing includes invalid values

* Fix issue in SymbolRepresentation

* Fixup

* Empty commit

* Empty commit
12179
2021-06-29 17:37:06 -03:00
Martin-Molinero 0d45bf5101 Add composite DataProvider (#5714)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Add new CompositeDataProvider that will wrap multiple instance. Allows
  using for example the ApiDataProvider and a DownloaderDataProvider.
- Adjusting ProductJsonConverter after recent Modules addition
12176
2021-06-29 12:40:31 -03:00
Martin-Molinero 66552b49bd Add new DownloaderDataProvider (#5709)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add new DownloaderDataProvider

- Moving LeanDataWrite and IDataDownloader to common project
- Add new BaseDataDownloaderDataProvider with concurrency helper method
- Add new DownloaderDataProvider which will use a IDataDownloader or
  IBrokerage implementation as data source

* Add support for downloading symbol chains data
12167 12168 12170 12171 12174 12175 12172
2021-06-28 15:56:10 -03:00
Martin-Molinero 0642f58bda Fix SEC downloader (#5711)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12162
2021-06-28 11:24:23 -03:00
Colton Sellers c7e6c96933 Encode/Decode Extension Addition (#5708)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Implement Encode/Decode Base 64

* Add unit test
12157
2021-06-25 17:50:55 -03:00
Colton Sellers 5c10b2cb82 Move Encode to Extension Util (#5707)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
* Move to extension util

* Move decode to extensions
12154 12155
2021-06-25 10:26:10 -03:00
Antoine Dray 4dd2ad85a9 Fix KrakenDownloader error on invalid pair format (#5703) (#5704)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
The Kraken allow queries from pairs of format XBTUSD and XXBTZUSD but it will only return data with the XXBTZUSD causing errors when XBTUSD ticker is specified.
This commit adds a more meaningful error when KDL is called with XBTUSD format.
12149 12151
2021-06-24 19:42:13 -03:00
Martin-Molinero 10defd4928 Include IB CSharpAPI in brokerage nuget (#5706)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12147
2021-06-24 18:59:14 -03:00
Martin-Molinero 891aeb87d3 Update readme.md
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
12114 12115 12118 12119 12106 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12137 12139 12140 12143 12124 12110 12121 12112
2021-06-23 18:17:25 -03:00
Stefano Raggi 2fa07561b1 Add missing IBGateway dependency library (#5696)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12102 12104
2021-06-23 17:12:50 -03:00
Stefano Raggi 148b9c8d45 IB Brokerage updates (#5695)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Update IBAutomater to v2.0.39

* Downgrade IB logging level from Detail (5) to Information (4)

- The online documentation warns of performance overhead when setting logLevel=5
12099 12100 12101
2021-06-23 11:34:33 -03:00
Jared 65cecef030 Update readme.md
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12094 12095
2021-06-22 18:15:35 -07:00
Stefano Raggi 4fed304eb7 Update Lean Foundation docker files to IBGateway v984 (#5686)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12089 12093 12086
2021-06-22 17:20:47 -03:00
Colton Sellers a987e0231f Scheduled Events for Start/End Week/Month Fix (#5690)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Apply fix for both start and end month cases

* Add unit tests for both cases

* Fix weekstart/weekend for same issue; add unit tests

* nit - rename tests

* Adjust logic
12083
2021-06-22 14:20:00 -03:00
Colton Sellers f47775338c Expand Lean Default Charts and Reduce Clutter (#5680)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Update charts that are not empty and not default values

* Testing

* Filter final results

* Explicitly filter alpha charts if not needed

* Use filtered charts for Live results handler

* Refactor solution to manage alpha charts internally by creator

* nit comment fixes

* Implement drawdown as default chart

* Implement Capacity Estimate for backtest default chart

* Add default values to QC.Plotting

* Adjust drawdown calculation

* Only sample "Capacity" once a day

* Implement Volume chart

* Nit fixes

* Volume Chart adjustments and fixes

* Rename to "Assets Sales Volume"

* Implement Exposure Sampling

* Store algorithm currency symbol, round capacity to nearest 1k

* Add new plots to default charts

* nit change name

* Address reviews

* Reduce duplication and clean up exposure sampling

* Address reviews

* Improve sample exposure

* Address review

* Only enumerate holdings once

* nit - comments

* Post rebase fix

* Don't need to round anymore
12062 12081 12078 12079
2021-06-22 11:19:48 -03:00
Colton Sellers fa1e97bc60 Round Capacity Estimate for Runtime Statistics (#5688)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Refactor solution to deal with rounding in CapacityEstimate

* Use DiscretelyRoundBy + adjust regressions
12060
2021-06-21 21:06:09 -03:00
Martin-Molinero 8fb649ceb4 SymbolJsonConverter improvements (#5683)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* SymbolJsonConverter improvements

- SymbolJsonConverter will be able to deserialize symbols expressed in
  user friendly format. Adding unit test
- Adding a couple of helper methods, removing duplicated code

* Fix FOPs expiration year parsing
12059
2021-06-21 21:02:46 -03:00
Stefano Raggi 7d8754f33c Update IBAutomater to v2.0.38 (#5682)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Update IBAutomater to v2.0.38

* Trigger build
12046 12057
2021-06-21 12:23:55 -03:00
Stefano Raggi 080511fa5a Add IResultHandler.BrokerageMessage (#5681)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add IResultHandler.BrokerageMessage

- Result handlers can receive notifications for brokerage message events

* Make LiveTradingResultHandler.RuntimeError virtual
12047
2021-06-21 12:23:46 -03:00
Martin-Molinero 5146329c0f CoinApi: reduce thread contention by lock per symbol (#5677)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Reduce thread contention in coinApi DQH by taking a lock per symbol
  versus a global lock.
- Improve tick creating by reducing object being wasted on empty
  constructor
12018 12024 12034
2021-06-17 20:47:57 -03:00
Stefano Raggi 47fb4e64f2 Update IBAutomater to v2.0.37 (#5676)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
12005 12007 12009
2021-06-17 16:14:38 -03:00
Alexandre Catarino 5361f87dd1 Updates Equity Market Data (#5576)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Updates Equity Market Data

* Updates Unit Tests

* Updates Regression Tests

In this commit we include regression tests with small changes (slightly different CAGR, Alpha, etc, but same number of trades) due to the data update.

* Updates Regression Tests 2

The following regression tests were adapt because of verification of hard-coded market data values:
- `AdjustedVolumeRegressionAlgorithm`
- `HistoryWithSymbolChangesRegressionAlgorithm`
- `OptionRenameRegressionAlgorithm`
- `RawDataRegressionAlgorithm`
- `SwitchDataModeRegressionAlgorithm`

The following regression tests have more trades since adjusted prices allowed more 1-2 shares trades that were rounded down to zero before:
- `AddUniverseSelectionModelCoarseAlgorithm` 23 -> 35
- `MeanVarianceOptimizationFrameworkAlgorithm` 12 -> 14
- `PortfolioRebalanceOnDateRulesRegressionAlgorithm` 298 -> 324
- `PortfolioRebalanceOnInsightChangesRegressionAlgorithm` 83 -> 86
- `ScheduledUniverseSelectionModelRegressionAlgorithm` 86 -> 90
- `SectorExposureRiskFrameworkAlgorithm` 17 -> 22
- `SetHoldingsMultipleTargetsRegressionAlgorithm` 8 -> 9
- `StandardDeviationExecutionModelRegressionAlgorithm` 196 -> 199
- `UniverseUnchangedRegressionAlgorithm` 11 -> 17
- `VolumeWeightedAveragePriceExecutionModelRegressionAlgorithm` 237 -> 238

Especial cases:
- `BlackLittermanPortfolioOptimizationFrameworkAlgorithm` 18 -> 17
 - BLM model sensibility
- `OptionChainedAndUniverseSelectionRegressionAlgorithm`

The following regression tests have different Capacity because of different volume from lowest capacity asset, except:
- `OptionEquityCoveredCallRegressionAlgorithm` New lowest capacity asset is underlying
- `OptionEquityCoveredPutRegressionAlgorithm` New lowest capacity asset is underlying

* Revert File Update for SPWR and SPWRA

* Fix Regression Tests

Temporarily removes python regression test for `MeanVarianceOptimizationFrameworkAlgorithm` as the `MeanVarianceOptimizationPortfolioConstructionModel` for each version are yeilding different results. If we use C# version in `MeanVarianceOptimizationPortfolioConstructionModel.py`, the results match.

* Changes Optimization Method in MinimumVariancePortfolioOptimizer [Py]

Uses `trust-constr`  method.
See https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html
12003
2021-06-17 14:04:51 -03:00
Jasper van Merle 72fb362f96 Fix futures not working with IQFeed (#5675)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Fix futures not working with IQFeed

* Trim slash from value instead of using ID.Symbol
12000
2021-06-17 08:46:03 -07:00
Martin-Molinero 24e3a71581 Coinapi improvements (#5672)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
- Add centralized download extension helper method
- Update coinApi client
11994
2021-06-16 20:30:51 -03:00
Colton Sellers 15555f710d Python Loading and Debugging Refactor (#5670)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Use Python algorithms directly in their location; also refactor pythonpath additions to one method

* Update VSCode Launch options

* Drop issue these changes fixes

* Use AddRange
11993
2021-06-16 20:30:33 -03:00
Martin-Molinero 3d13fb6935 Implement Atreyu fees (#5674)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Empty

* Implement Atreyu fees
11992
2021-06-16 19:43:27 -03:00
Colton Sellers 74f0c89499 Option Chain Provider Symbol Map Resolve (#5664)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Use mapFileProvider to resolve symbol mapping

* Add reproducing unit test

* Only resolve mapping for types that require it

* address review
11991
2021-06-16 19:42:38 -03:00
Martin-Molinero 0991f089d0 Reduce disk usage in the cloud (#5673)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
11988
2021-06-16 18:43:55 -03:00
Colton Sellers 424fa36703 Organization Product ID and ApiDataProvider Fix (#5671)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add ID to Organization Products

* Use Product ID to verify subscription
11982
2021-06-16 15:01:53 -03:00
Colton Sellers afbd058dad Add Site-Package Issue to Readme (#5668)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Add information to Python and Research readme

* Adjust doc
11977
2021-06-16 13:57:13 -03:00
Stefano Raggi 66d2f42d01 IBAutomater updates (#5669)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Update IBAutomater to v2.0.36

* Trigger build
11976
2021-06-16 12:52:43 -03:00
Martin-Molinero 11f8dc2958 Improvements for CoinApi subscription (#5666)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
11971 11965 11968
2021-06-15 19:49:14 -03:00