10777 Commits

Author SHA1 Message Date
Colton Sellers bfb09aa54a Update package to include nPython.exe 10883 10884 10889 10892 10890 2021-02-22 11:00:50 -08:00
Colton Sellers 23e208c4a9 Fix typo mistake 2021-02-19 16:55:16 -08:00
Colton Sellers 0e21a087f2 Set PythonNet pydll environment variable 2021-02-19 15:56:43 -08:00
Colton Sellers 9e5cb2aa23 Add local package source to travis 2021-02-19 15:43:58 -08:00
Colton Sellers e076b51fb9 Address merge conflicts and cleanup 2021-02-19 13:17:19 -08:00
Colton Sellers cf936f6fe6 Use local pre-compiled nuget package 2021-02-19 13:07:04 -08:00
Colton Sellers 28c41057b6 Update Runtime to latest version 2021-02-19 13:05:56 -08:00
Colton Sellers a7657d9cc8 Adjustments for cloud building 2021-02-19 13:05:55 -08:00
Colton Sellers 4e195921be CSProj Cleanup 2021-02-19 13:05:53 -08:00
Colton Sellers 01b3052fed Add PythonNet environment var 2021-02-19 13:04:58 -08:00
Colton Sellers dbb219cec3 Prepare for cloud testing 2021-02-19 13:04:58 -08:00
Colton Sellers 367dae0ec1 Reinstate decimal.py in common build 2021-02-19 13:04:58 -08:00
Colton Sellers 14b04fe557 Use PythonNet from repo outside of Lean directory 2021-02-19 13:04:58 -08:00
Gerardo Salazar 0645513f5e Capacity estimation in report generator (#5318)
* Adds strategy capacity estimation in report generator

* Style and license fixes

* Adds comments, constants, and new method accessibility

* Removes unneeded imports
10840
2021-02-18 17:51:40 -08:00
Martin-Molinero ecf91546e6 Update Nlog Math and fasterflect (#5310)
* Update Nlog Math and fasterflect

* Remove NLog
10835
2021-02-18 20:18:07 -03:00
Martin-Molinero c834a1c902 Revert Lean.Launcher nuget package rename (#5317) 10834 2021-02-18 19:39:05 -03:00
Colton Sellers 43a540cbb1 OpenInterest Bug Fixes (#5207)
* Filter values that are before subscription start time; also adjust starttime for OpenInterest

* Use data EndTime for comparison

* Allow Auxiliary data through

* Fix OpenInterest DataReader Logic

* Add regression

* Address review

* Ignore open interest for time slice

- TimeSliceFactory will directly ignore open interest for determining if
  the slice has data or not. Open interest will still be available
  through the Tick collection. Reverting some of the previous commits
  changes since they are no longer required.
- HistoryRequests and SubscriptionRequest will use AlwaysOpen exchange
  for open interest requests. Adding unit test reproducing issue
- Adding `BaseDataRequest` to avoid duplication logic.

* Make OpenInterest an internal feed and ignored by default in history

- Adding unit tests

* Revert SubscriptionFilterEnumerator Start time addition

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
10829 10830
2021-02-18 19:04:29 -03:00
Alexandre Catarino c5bb840bde Adds Static AlgorithmCreationTimeout Property to BaseSetupHandler (#5316)
* Adds Static AlgorithmCreationTimeout Property to BaseSetupHandler

This value will be used to set maximum time that the creation of an algorithm can take.

* Adds Additional Logging to AlgorithmPythonWrapper

It will informing the user how long it takes to import the module.

* Changes How AlgorithmCreationTimeout is Initialized

It will prevent callling Config.GetDouble on every call.
10828
2021-02-18 19:00:33 -03:00
Martin-Molinero 4632840da9 Add license file for project packages (#5314) 10826 2021-02-18 18:57:36 -03:00
Martin-Molinero ba4c45d729 Remove version checking (#5315) 10824 2021-02-18 18:32:07 -03:00
Martin-Molinero 9232427663 Remove all nuspec files (#5311) 10820 2021-02-18 17:13:11 -03:00
Martin-Molinero c30929f612 Add support for live trading delisting events (#5195)
* Add support for live trading delisting events

- Adding `LiveDelistingEventProviderEnumerator` that will emit delisting
  events. Adding unit tests
- Remove unused `LiveAuxiliaryDataEnumerator`.
- Refactor the corporate event providers being used per security type

* Self review: compare date component

* Add new LiveDataBaseDelistingEventProvider for equities

- Add support for delisting events for equities. Adding unit tests

* Fix cleanup of delisting equity subscription
10801 10806
2021-02-17 19:53:53 -03:00
Martin-Molinero df6e133833 Fixes for assembly information (#5306)
- Update version to 2.5
- Normalize version and assembly information
- Remove commented and unrequired code
10793
2021-02-17 16:42:23 -03:00
Juan José D'Ambrosio 2d99afc8c3 Refactor IPrimaryExchangeProvider.GetPrimaryExchange (#5302)
* Refactor IPrimaryExchangeProvider.GetPrimaryExchange 

now it returns a PrimaryExchange instead of a string

* Update MapFilePrimaryExchangeProvider.cs

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
10776 10777 10778 10780 10781 10783 10790 10791 10775 10779 10792
2021-02-17 12:43:41 -03:00
Gerardo Salazar b3835510d0 Changes calculation of rolling/series graphs to use EOD equity (#5303)
* To maintain consistency between calculations, we will use
    the end of day equity value to calculate the returns per day.
    This fixes a bug where daily equity series would zero out and result
    in an exception being thrown since no elements were being passed to
    the Sharpe calculation.
10766 10772 10773 10774
2021-02-16 13:43:27 -08:00
Stefano Raggi 239fa29bf3 Tradier Brokerage updates (#5265)
* Tradier brokerage updates

- Removed old authentication code (refresh tokens) and settings
- Added "tradier-use-sandbox" config setting

* Fix brokerage unit tests

* Update Tradier config.json settings

* Add sandbox check in Subscribe

* Bug fixes + unit test updates

* Trigger build

* Fix Tradier fee model

* Address review
10758
2021-02-16 13:37:46 -03:00
Juan José D'Ambrosio df4abd3c3a Bug algoseek taq writes tick exchanges correctly (#5301)
* Implements wrapper to get the exchange as a single letter representation

Also replace lower 'l' with capital 'L' in condition flags enums. it is a new warning on the compiler and it looks cool :)

* There are cases where the exchange is null or empty, in those cases return null

* Add tests for single character exchange representation

* Update GlobalTest.cs

Co-authored-by: Martin-Molinero <martin@quantconnect.com>
2021-02-16 12:51:08 -03:00
Gerardo Salazar 7d93f43d38 Calculate more report elements using LiveResult data in report generator (#5300)
* Calculate PSR for live algorithms in report generator

* Use live series for calculating of CAGR, Max DD, and PSR

  * Removes Kelly Estimate from report and template.html

* Update template.html

* Rolling Beta bug fix when using daily data

  * Max drawdown output as percent

* Make days live report element use equity curve last day instead of today

Co-authored-by: Jared <jaredbroad@gmail.com>
10753 10754
2021-02-15 19:56:52 -08:00
Gerardo Salazar c435caa7d1 Add check for new deployments to DaysLiveReportElement (#5299)
* This fixes a potential exception thrown when trying to access the
    first element of the Live equity series, when no equity series
    exists.
10749
2021-02-15 21:30:12 -03:00
Aaron Janeiro Stone 643e8754ed Feature 5162 - LimitIfTouched Orders (#5164)
* Adds LimitIfTouched order.

TODO:
-- Add tests.
-- Add into existing regression algorithms.
-- Refactors (?)

* Fixes

- Remove unrequired space changes
- Fix EquityFillModel min/max limit price fill
- Add TriggerPrice for UpdateOrderRequest.

Quote info used w.r.t. comparing against Limit prices for LIT

FillModel.cs implementation is fixed to use quotes when comparing against set limit prices.
Also changes test implementations to assert which of quotes/trade-bars are being used

Reviewer-suggested fixes
------------
Merge remote-tracking branch 'origin/limiftouched' into limiftouched
Styling
Adds missing null check for quotebar
Styling
Adds missing null check for quotebar
Merge remote-tracking branch 'origin/limiftouched' into limiftouched
High/Low w.r.t. trigger price for determining if TriggerTouched changed to Current price
https://github.com/QuantConnect/Lean/pull/5164/files/0462ad668a5fe65e771122165f36c72d56b92df6#r569832380
fill fixes:
FillModel.cs: Fills exactly at the limit
EquityFillModel.cs: https://www1.interactivebrokers.com/en/index.php?f=608
Equity fill now uses quotebars
Revert - use new constructor which emulates former SubmitOrderRequest
Style changes
Reverts order model to original by means if new constructor
High/Low w.r.t. trigger price for determining if TriggerTouched changed to Current price
https://github.com/QuantConnect/Lean/pull/5164/files/0462ad668a5fe65e771122165f36c72d56b92df6#r569832380
fill fixes:
FillModel.cs: Fills exactly at the limit
EquityFillModel.cs: https://www1.interactivebrokers.com/en/index.php?f=608
Equity fill now uses quotebars
Revert - use new constructor which emulates former SubmitOrderRequest
Style changes
Reverts order model to original by means if new constructor
Merge commit 'bf4c96d2a055ea808fa4293662528c11a89b72c7'

* Suggested style fixes

* Review fixes
-------------------
- Suggested style fixes
- Changes LIT regression to better incorporate order modifications
- TODO: orderlisthash must be fixed
Fixed LIT regression algo
-----------------------
- Includes asserts in OnOrderEvent

* Fix OrderListHash

OrderListHash -> -292689487

* Re-adds quote nullchecks

* EquityFillModelTests fixes asserts

* Reordering FillModel.cs

* Fixes quote logic, adds methods in FillModel.cs

* Refactoring + LIT regression fixes
-- revert unneeded changes

* Fixes list hash

* Rebase -- catch up upstream

* OrderListHash fix

* Various fixes by reviewer

* Final requested changes

* tagged time -> utcinvariant

* Fixes listorderhash

* Time changed to UtcTime.ToString(DateFormat.US, CultureInfo.InvariantCulture)

* Adds Python LimitIfTouchedRegressionAlgorithm

* adds LimitIfTouchedRegressionAlgorithm.py

* adds LimitIfTouchedRegressionAlgorithm.py

* Minor changes to LIT regression algorithms

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
10746 10742 10744
2021-02-15 10:29:51 -03:00
IlshatGaripov d17fe34c74 Fixing up Coin API streaming (#5295)
* fixing up Coin API streaming

* Fixing file name

* Adding log showing CoinApi product plan

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
10741
2021-02-15 09:55:00 -03:00
Stefano Raggi 512000d500 Update IBAutomater to v1.0.44 (#5290) 10732 2021-02-12 12:10:02 -03:00
Gerardo Salazar f5e730d776 Re-enable second page of reports generation (#5294) 10730 10731 2021-02-11 17:12:30 -08:00
Martin-Molinero a0f39ec6a4 Remove Microsoft.Net.Compilers (#5282)
* Remove Microsoft.Net.Compilers

* Remove deprecated analyzer packages

- Replace deprecated analyzer packages

* Travis will use dotnet for building
10723 10728 10729
2021-02-11 09:31:37 -03:00
IlshatGaripov 54bbdacd76 Just a small fix (#5287) 10711 10709 10720 2021-02-10 12:17:43 -03:00
Gerardo Salazar 096e34212c Replace AppDomain.CurrentDomain with AssemblyBuilder (#5284)
* .NET Core/5.0 will not compile when calling
    AppDomain.CurrentDomain.DefineDynamicAssembly() since it was removed
    in .NET Core.

    AssemblyBuilder replaces this specific functionality since
    AppDomains were deprecated in .NET Core
10693 10694 10696 10698 10701 10702 10703 10705 10706 10708
2021-02-09 18:37:39 -03:00
Martin-Molinero 6d8e38a692 Update IB Api dll (#5278) 10692 2021-02-09 17:35:55 -03:00
Gerardo Salazar fefac8ab34 Move report statistics JSON output to in-memory string as out param (#5283) 10691 2021-02-09 12:27:10 -08:00
Gerardo Salazar 3f53ba9b2f Report Generator Portfolio Result Statistics Output + TradesPerDayReportElement Bug Fix (#5281)
* Report generator statistics output

* Fixes issue where unsorted list could cause a negative trades/day kpi
2021-02-09 11:51:00 -08:00
Gerardo Salazar e2964dd4b1 Make OrderListHash deterministic by using MD5 as its underlying hash function (#5276)
* Update OrderListHash to use MD5 as hash instead of hash code

* Update regression algorithm OrderListHash statistic

* Use full MD5 hash as OrderListHash, update regression statistic

* Fixes failing regression tests
10678 10683 10679
2021-02-09 12:19:25 -03:00
Martin-Molinero a1cbe13bb0 Minor logging improvements (#5277)
* Minor logging improvements

- Remove Thread.Sleep() call when logging debug
- FileLogHandler will capture lock after generating message to log
- ConsoleLogHandler will log time as UTC, cheaper than converting time
  zones

* Fix typo

Fix typo
10677
2021-02-09 11:17:01 -03:00
Gerardo Salazar 17dbadea5b Remove cross-platform incompatible Thread.Abort() + ThreadAbortException (#5274)
* Remove cross-platform incompatible Thread.Abort() + ThreadAbortException

* Retrigger build

* Refactor thread abort logic into call to StopSafely()
10674 10676
2021-02-08 20:41:05 -03:00
Martin-Molinero d077651f32 Package updates (#5273)
- Update `System.Collections.Immutable`
10661 10662 10664 10665 10669 10670 10672 10673
2021-02-08 15:49:15 -03:00
Adalyat Nazirov c02ad0a89f Brokerage models improvements (#5267)
* fix Atreyu brokerage type full name

* improve brokerage models

-AtreyuBrokerageModel
-TradingTechnologiesBrokerageModel

* remove Limit price checks
10646 10658 10660
2021-02-05 20:23:54 -03:00
Gerardo Salazar aef2a47892 Updates CPU performance metrics gathering approach (#5261)
* Updates CPU performance metrics gathering for project modernization

  * PerformanceCounters are not supported cross-platform in
    .NET Core/5.0, which requires the use of an alternative method
    in the gathering of performance metrics. Since no exposed .NET API
    exists to gather these metrics without blocking, a new thread is
    created to block the time necessary for the CPU performance to be
    calculated.

* Address review: remove ResetEvent and make CpuPercent atomic

* Dispose of CpuPerformance instance before exiting Lean

* Minor tweak for Task and comment

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
10645
2021-02-05 20:23:30 -03:00
Gerardo Salazar bc4dbf5707 Removes extra day added to CBOE Time causing data to shift one day forward (#5266)
* Added test
10643
2021-02-05 19:42:01 -03:00
Gerardo Salazar fe1948d0ae Removes/updates System.ComponentModel.Composition package (#5257) 10627 10637 10638 10640 10641 10642 2021-02-05 12:03:49 -03:00
Gerardo Salazar 254d0896f1 Replaces Microsoft.Extensions.CommandLineUtils with McMaster CLI utils (#5255)
* Replaces Microsoft.Extensions.CommandLineUtils with McMaster CLI utils

  * Updates ValueTuple to 5.0.0 for compatibility with package.

* Retrigger build

* Retrigger build
10607 10608 10613 10615
2021-02-03 19:56:14 -03:00
Gerardo Salazar 115dcab789 Removes app.config and sets automatic binding redirects (#5248)
* Some app.config files were kept to either enable features
    that are only enable-able via the config files, or binding redirects
    for DLLs that are not packaged with NuGet (i.e. VisualStudio
    package, required to run tests successfully @ 15.0.0.0)
10602 10603 10604
2021-02-03 11:45:29 -03:00
Gerardo Salazar 5117609ea5 Fixes CBOE custom data consolidation (#5252)
* Adds regression algorithm testing consolidation of data.
10601
2021-02-03 10:56:58 -03:00