10644 Commits

Author SHA1 Message Date
Adalyat Nazirov 017b464e21 Map legacy symbols using map file (#5017)
* map IB brokerage symbol

* map Alpaca symbols

* improve empty symbol checking
10197
2020-12-28 17:54:00 -03:00
Gerardo Salazar 4dec21ccc0 Fixes failing option chain provider test for futures options (#5088)
* The test didn't take into account that the contract expiring on
    December would mean that there would temporarily be no Dec. FOP
    contract. We fix this by looking for the Mar. contract instead
    if the december contract has expired.
10195
2020-12-28 16:28:41 -03:00
Martin-Molinero 529d0a3634 Fix low resolution cache (#5080)
* Replace cache size for MB

* Remove setting capacity

* Custom cache implementation

* Reduce locks in custom cache

* Add cache performance unit test
10194
2020-12-28 16:27:11 -03:00
Martin-Molinero 9c89e8d403 Fix backtest result packet deserializing (#5084)
* added test covering minValue / maxValue issue with JsonRoundingConverter

* change namespaces

* JsonRoundingConverter fix decimal.Min and MaxValues (cannot deserialize)

* remove dependency on 3rd party library

* c# 6 compatible code (remove pattern matching)

* Fixes BacktestResultPacket deserializing

- Serializing decimals as strings to avoid precision loss, since json
  convert will use floating point precision. Updating unit tests.
- Fix logging unit test failing to delete file being used.

Co-authored-by: Mark Virchenko <mark.virchenko@calienteam.com>
10193
2020-12-28 16:26:40 -03:00
Adalyat Nazirov 1988ad1ae5 Bug 4925 daylight out of order bar (#4941)
* test

* wip

* Revert "Fix duplicated history entries when contains daylight saving time change (#4700)"

Use proper rounding down

* regression test

* remove unused parameters

* more tests

* fix name and comment

* improve regression test

* more tests: oanda market hours

* re-apply Exchange TZ to bar EndTime

* fix expected results

* we can't substract minute because it can harm algorithm on minute resolution; so we could use tick?

* rename prop: conflict with QCAlgorithm.StartDate

* do not log messages to pass travis ci log limit

* assign loghandler in AlgorithmSetupHandler

* reference to PR for more description

* due to https://github.com/QuantConnect/Lean/pull/5039 we don't need to override it manually
10192
2020-12-28 16:24:33 -03:00
Martin-Molinero 3658fb1405 Update config.json (#5086) 10191 2020-12-28 13:06:07 -03:00
Colton Sellers 0ac79487d7 IB Brokerage Restore Subscriptions Fix (#5078)
* Return true after all symbols have been processed

* Continue on Canonical Future Symbols
10178
2020-12-23 20:56:07 -03:00
Gerardo Salazar 38120a3217 Converts QuantConnect.Common.csproj file to .NET Sdk format (#5071) 10172 2020-12-23 13:15:29 -03:00
Martin-Molinero 01a13a095a Remove cloud-api-url config setting (#5073) 10171 2020-12-22 22:51:00 -03:00
Colton Sellers 704a5cb00e Pycharm Docker Debugging Fix (#5069)
* Move PyCharm Debugger to port 6000 and expose it

* Change PyCharm default configurations to port 6000
10154
2020-12-22 15:22:46 -03:00
Martin-Molinero 490ad08c89 Optimization handling of failed backtest init (#5068)
- Optimizer will increment failed count and notify the strategy of
  failed backtest initialization
10140
2020-12-21 19:27:27 -03:00
Martin-Molinero a60cd95611 Optimizer will clean lean before last update (#5063)
- LeanOptimizer will clean up any lean instance before calling the last
  udpate, so that runtime stats are correct.
2020-12-21 15:17:44 -03:00
Colton Sellers eed8e9c763 Improve IBBrokerage Symbol Mapping Error Message (#5051)
* Improve IBBrokerage Error Message

* Add exception message to catch statement

* Address review

* Address review edits
2020-12-21 13:04:05 -03:00
Marco Grassi 365f53dfc7 Fix the missed rename of OptimizationStatus.Ended to Completed (#5060) 10115 2020-12-19 19:06:09 -03:00
Martin-Molinero 48a86c2626 Rename OptimizationStatus from Ended to Completed (#5059) 2020-12-18 16:53:29 -08:00
Martin-Molinero 2de9c21b6d Optimization tweaks (#5056)
* Add progress for runtimeStats

- Add optimization progress runtimestats
- Add ServerStatistics for the last backtesting package

* Add StaticOptimizationParameter

- Add StaticOptimizationParameter. Updating unit tests
2020-12-18 16:01:44 -08:00
Martin-Molinero 649aafc952 Adding Api.ReadBacktest optional getCharts (#5054)
* Adding Api.ReadBacktest optional getCharts

- Optionally allow users not to fetch backtest charts when reading a
  backtest, it can be slow

* Fix null reference for deleted/cancelled backtests

* Get Leaky bucket config settings once
10091
2020-12-18 14:17:40 -03:00
Gerardo Salazar 25fa4c6fb6 Adds holidays to ES futures (#5045)
* Adds holidays to ES futures

* Adds CME equity product market hours and holidays (ES, NQ, YM)
10072
2020-12-17 21:12:20 -03:00
Martin-Molinero d1b35f7974 Optimization status update (#5050) 10065 2020-12-17 17:09:01 -03:00
Colton Sellers 4006ba01e4 Reduce Travis Log (#5039)
* Reduce Travis setup verbosity

* Introduce ConsoleErrorLogHandler

* Change Console.WriteLine to Log statements

* Quiet wget

* Route build stubs stdout to null

* Fix Quantbook history test

* Silence stub packages directly

* Use parameterized log-handler for testing

* Rename AssemblyInitialize Setup

* Fix AlgorithmRunner file logging

* Drop all overriden LogHandlers in tests

* Change to OneTimeSetup to maintain LogHandlers

* Permit any ILogHandler to be defined in params

* Fix for AlgorithmRunner Handlers V2
10054
2020-12-17 12:59:13 -03:00
Martin-Molinero 6d824b40a6 Add handling for custom host name (#5043)
* Add handling for custom host name

* Credit cost as decimal
10052
2020-12-16 21:54:00 -03:00
Colton Sellers 8e410fcaf1 Update old Hourly/Daily data for ApiDataProvider (#5034)
* Update old Hourly/Daily data for ApiDataProvider

* Add unit test for IsOutOfDate

* Address review

* Fix reference to static function in test
10049
2020-12-16 19:04:06 -03:00
Adalyat Nazirov d136428556 ignore *.DotSettings files (#5035)
This layer is designated for common settings that enforce your team preferences for the current solution.
Since we don't have specific resharper settings we want to share within the team we ignore this file
10046
2020-12-16 12:38:01 -03:00
Gerardo Salazar 40d81965be Adds debug logging for MapSymbol(...) method in IB Brokerage (#5040) 10040 2020-12-15 17:44:00 -08:00
Aaron Janeiro Stone c650eb6c1c Adds DeM indicator (#5002)
* Adds DeM indicator

* Added reference to param movingaverage type

* Fixed variable declarations

* Added nameless initialize

* Missing DeM "type" args added

* Missing DeM "type" args added

* refactor

* Undid _previousInput → protected

* Demarker symbol: DeM →DEM

* Symbol change: DeM → DEM

* Updated symbols

TestDivByZero originally had dem as cmf.

* Symbol: DeM →DEM

Co-authored-by: Alexandre Catarino <AlexCatarino@users.noreply.github.com>
10018
2020-12-15 08:29:55 -03:00
Charles Naccio aa2f9f927a Fixed QuantBook import path for CSharp example (#5028)
Now requires a relative path for loading QuantBook.csx
10016
2020-12-14 21:22:22 -03:00
Charles Naccio c698a65a84 Replaced obsolete Gitter badge with Slack (#5031) 10013 2020-12-14 12:55:35 -03:00
Charles Naccio 181283a4cd Noted Polygon downloaded in Readme (#5025) 2020-12-11 16:55:58 -08:00
Martin-Molinero b247724a34 Improve Optimizer runtime statistics (#5024)
- Adding optimization Id to backtests packets
- SeriesSampler will allow truncating the samples
- Removing OptimizationEstimate, simplifying getting estimate and
  runtime stats separatly
2020-12-11 16:39:13 -08:00
Gerardo Salazar dde3576161 Fixes intraday delistings not occurring before contract expiry for Futures and FOPs (#5007)
* Fixes intraday delistings not occurring for Futures and FOPs

  * Previously, we would wait until the next market open to
    liquidate futures and futures options contracts. Since these
    contracts can not be traded at the next market open and require
    intraday delisting, changes were made to liquidate at the first
    available place where we know the market is open. This means
    we now liquidate futures and FOPs intraday as a market order.

  * Maintains backwards compatability with equities and equity options
    delisting behavior

* Addresses review: adds additional protections for ProcessDelistedSymbols

  * We choose to adjust the delisting date to the next market open only
    if the market is not open at the current time, otherwise the time
    would have been adjusted to the market open of the next trading day

* Addresses review: reverts changes and fixes error message in regression algo
10008
2020-12-11 20:46:56 -03:00
Gerardo Salazar e8734a0797 Adds/Fixes Futures Options History Research Support (#5013)
* Adds Futures Options History Research Support

* Address review: make canonical future throw when calling GetOptionHistory

* Improve error message, recommending users to user FutureChainProvider
2020-12-11 20:46:41 -03:00
Aaron Janeiro Stone 7f5d69bbec Adds the Awesome Oscillator (#5005)
* Adds the awesome oscillator.

* added missing type hint for AO

* cleaned initializations

* refactor in call for AO(fast,slow,type)

* added missing type parameter for AO

* Changes AO sub-indicators to public.

Co-authored-by: Alexandre Catarino <AlexCatarino@users.noreply.github.com>
10007
2020-12-11 20:46:07 -03:00
Colton Sellers f6be7a41a5 Bug python runtime issue with local report generation (#5014)
* Fixed Python runtime issue that was occurring when trying to generate reports locally on OSX/mono, but assume the issue impacts all configurations.

* Move Python.Runtime config to common

* Remove duplicate files

* Update readme

* Typo

* Change destination in build directory

Co-authored-by: Charles Naccio <cnaccio@gmail.com>
10006
2020-12-11 20:45:26 -03:00
Stefano Raggi 7f30c0cd00 Downgrade IB error codes from Warning to Information (#5015) 10003 2020-12-11 18:53:25 -03:00
Colton Sellers 6694fe01f8 Api Chart Hotfix (#5023)
* Api Chart Hotfix

* Use IsNullOrEmpty
10001
2020-12-11 18:43:18 -03:00
Aaron Janeiro Stone 32ab4fdea1 Adds ChaikinMoneyFlow indicator (#4986)
* Added CMF indicator

CMF is a volume-weighted average of accumulation and distribution over a period.

* Added initializer for CMF

Registration for ChaikinMoneyFlow implemented.

* Added CMF tests.

* Added CMF tests.

* spy_cmf.txt changed to external indicator data.

* Implement suggestions of @AlexCatarino

* added sum terms as subindicators.

* added sum terms as subindicators.

* Removal of vestigial rolling window

* Minor nit changes

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
9998
2020-12-11 18:04:17 -03:00
Colton Sellers fc81f606e4 Reserve Names for Pandas Mapper (#4978)
* Fix for #4886 and unit test

* Fix test function

* Address review

* Clarify comments
9997
2020-12-11 16:39:13 -03:00
Stefano Raggi ec74abd4d0 Fix Bitfinex brokerage currency mapping (#5011) 9996 2020-12-11 16:12:57 -03:00
Colton Sellers bd3ead3480 ApiDataProvider Zip Download Fixes (#5020)
* Stop non zip responses from being saved as a zip

* Capture and log message

* Log as Error
9995
2020-12-11 16:01:57 -03:00
Colton Sellers 45849962a3 Readme expansion and additional VS build tasks (#5018) 9994 2020-12-11 14:49:29 -03:00
Gerardo Salazar 8279cf7eac Improve exception message for indicators using Update(DateTime, decimal) (#5019) 9993 2020-12-11 14:36:42 -03:00
Colton Sellers 4c4a699cb0 Stop Emitting Insights on Delisted Securities (#4997)
* Verify insights are valid before emitting

* nit

* Address review

* Address review and unit tests

* nit - remove extra lines

* Address review

* Initialize insight fields
9972
2020-12-10 11:44:37 -03:00
Colton Sellers 31a2c31c0a Api Update November 2020 (#4981)
* WIP Backtest adjustments

* Workaround awaiting changes

* Adjustments to API Changes

* Nit fix

* Custom Newtonsoft Deserializer for AlphaRuntimeStatistics

* Workaround Travis build error

* Drop AlphaRuntimeStatistics converter; use Decimal converter

* Use StringDecimalJsonConverter

* Undo set properties

* Add more members to de-serializer class
2020-12-09 16:51:58 -03:00
Jared 877a123276 Update readme.md 9946 2020-12-08 12:26:21 -08:00
Gerardo Salazar 4134b05bfd Fixes options order crash in ReportGenerator/PortfolioLooper (#4992) 9938 2020-12-07 12:39:53 -03:00
Gerardo Salazar 43c6d5cc5a Adds extra simplified history request method in PortfoliioLooper (#5003) 9934 2020-12-06 15:13:32 -08:00
Martin-Molinero f39acceadc Load fine fundamental from data cache folder (#4995)
* Load fine fundamental from data cache folder

* Add daily backwards lookup for live fine
9931
2020-12-04 18:28:24 -08:00
Jasper van Merle 921ddced04 Fix invalid xml on SafeMultiply100 documentation (#5000) 9930 2020-12-04 18:22:12 -08:00
Gerardo Salazar ff8563244f Fixes Random Length Lumber contract multiplier/min price variation (#4993) 9922 2020-12-04 12:33:19 -03:00
Colton Sellers 041f1d9db5 Limit Futures Resolutions in BaseData (#4979)
* Limit futures support resolutions

* Fix broken tests

* Address review
9918
2020-12-03 21:50:17 -03:00