Commit Graph

235 Commits

Author SHA1 Message Date
Jared d09a9caf8b Merge pull request #3434 from QuantConnect/performance-3403-finefundamental-source-resolution-v2
Improve FineFundamental backtesting source resolution performance
2019-07-26 10:19:17 -07:00
Martin Molinero 0ee2102bb1 Fix or ignore failing unit tests 2019-07-26 12:46:02 -03:00
Martin Molinero b6e9498b9e Improve FineFundamental backtesting performance
- Reduce the amount of `Path.Combine()` usages -> it has a peformance
overhead
- Improving `FineFundamentalSubscriptionFactory` GetSource algorithm,
now it will not check if each file exists while finding the appropriate,
since we already iterated the directory before
- `DefaultDataProvider` will not check if file exists since `new
FileStream` performance the same operation internally
2019-07-25 22:35:28 -03:00
Stefano Raggi e9739064e6 Fix LiveEquityDataSynchronizingEnumerator for input data after the current time
Previously the enumerator would get stuck and stop emitting data if one of the underlying enumerators returned a data point with the time greater than the current time. The existing unit test would only emit the first data point for the two underlying streams.

The enumerator has been updated to support data points in the future and the unit test has been extended to assert both data point counts and values.
2019-07-09 16:49:50 +02:00
Martin Molinero e8660d9f52 Address reviews 2019-06-17 23:40:56 -03:00
Martin Molinero 760e32cf65 Add unit test for Coarse Scheduled Selection
- New unit test fails in master
- Adjust lower invalid time limit to 5 AM
2019-06-17 23:40:56 -03:00
Martin Molinero 65201cb808 Adding StepTimeProvider for live
- Adding new `StepTimeProvider` that will advance time based on a
desired custom evaluator.
- Live trading `Options`, `Futures` and `Coarse` data will use a
`FrontierAwareEnumerator` + `StepTimeProvider`. This will allow to hold
the selection data until its the desired time
- `Universe.CanRemoveMember` will round the members time in the universe
based on the `UniverseSettings.MinimumTimeInUniverse`
2019-06-17 23:40:55 -03:00
Jared 8cebf10483 Merge pull request #3315 from Martin-Molinero/bug-3273-quandl-unit-test-hangs
Retry file operation in Quandl unit test
2019-06-17 09:18:54 -07:00
Martin Molinero f91fe853e1 Retry unit test file operation 2019-06-17 12:03:10 -03:00
Stefano Raggi 5143645fe6 Fix LiveTradingDataFeed handling of Auxiliary data at Tick resolution 2019-06-14 23:18:17 +02:00
Martin Molinero 7aafdef827 MapFile and FactorFile data feed resolution
- Moving `MapFile` and `FactorFile` resolution to the data feed stack so
that they do not add a performance overhead to the algorithm thread.
- Create logging string messaged only if required.
- Calculate `FactorFileRow.PriceScaleFactor` the least amount of times
2019-06-12 17:48:47 -03:00
Martin Molinero c38e9bff2d Add try catch in Quandl test
- Adding try catch statement in timer callback for Quandl unit test
2019-06-06 14:01:09 -03:00
Martin Molinero d360ec36ac Address reviews 2019-05-31 18:26:18 -03:00
Martin Molinero 57fbf588fe Download RemoteFile once for backtests
- For backtests download RemoteFile just once
- Live subscriptions and history requests will continue to download the
`RemoteFile` on each request.
- Adding unit tests
2019-05-29 18:38:07 -03:00
Jared 8a95a35d95 Merge pull request #3191 from StefanoRaggi/bug-3190-live-suspicious-tick-filtering
Add Suspicious Tick Filtering in LiveTradingDataFeed
2019-05-29 07:10:07 -07:00
Stefano Raggi ce45493d38 Filter suspicious ticks for tick consolidators in TimeSliceFactory.Create
With subscriptions at non-Tick resolution, suspicious ticks are filtered at the live data feed level for bar aggregations, while at Tick resolution they are never filtered (intentionally).
This change prevents ticks from being added to the consolidator update data, used by the AlgorithmManager to update tick consolidators (and indicators).
2019-05-28 18:29:35 +02:00
Stefano Raggi 1119d79f0e Add Suspicious Tick Filtering in LiveTradingDataFeed 2019-05-28 18:29:35 +02:00
Martin Molinero bb6671b811 Fix tests after RemoteFileSubscriptionStreamReader changes 2019-05-28 13:24:52 -03:00
Jared ac3374f47b Merge pull request #3218 from Martin-Molinero/bug-3156-rest-source-reader-infite-polling
Fix infinite live rest custom data polling
2019-05-22 17:56:42 -07:00
Martin Molinero d4a4a992a5 Address reviews 2019-05-22 16:31:17 -03:00
Jack Simonson 543abd77c5 Delete DailyFx class
Deleted DailyFx class and associated references in algorithms and tests
2019-05-22 09:36:19 -07:00
Martin Molinero 7becc869af Fix infinite live custom data polling
- Adding `IStreamReader.RateLimit { get; }` specifying if a stream
reader `ReadLine()` calls should be rate limited by the source readers.
- Adding two failling unit tests in `master`
2019-05-21 16:15:38 -03:00
Martin Molinero 173e5c27cb Reverting unrequired changes 2019-05-16 15:06:27 -03:00
Martin Molinero 72a0d8d2bb Fix custom mocked data
- `CustomMockedFileBaseData` was always incrementing data time in minutes
even if configuration was != Resolution, now it will increment based on
the configuration.increment
2019-05-16 14:52:16 -03:00
Stefano Raggi f03d0389ee Fix failing LiveTradingDataFeed unit tests
- In some tests SymbolCache.GetSymbol was being called before AddData, throwing an exception when launched as single tests.
- HandlesManyCustomDataSubscriptions was failing both locally and in Travis (only occasionally). This behavior started since #3040 was merged (LiveSynchronizer is now using a 500ms timeout for the reset event) and the asserts have been updated to reflect this.
2019-05-14 18:44:57 +02:00
Stefano Raggi 6e917f97e2 Resolve merge conflicts 2019-05-03 23:45:17 +02:00
Stefano Raggi c818313fb0 Add new LiveTradingDataFee unit test 2019-05-03 23:32:38 +02:00
Jared bcfd0fbae6 Merge pull request #3040 from QuantConnect/bug-live-synchronizer-high-cpu-usage
Reduce CPU Usage in Live Synchronizer
2019-05-03 13:39:23 -07:00
Martin Molinero 0f4327660a Add missing test for IDataCacheProvider.IsDataEphemeral 2019-05-02 11:44:51 -03:00
Stefano Raggi 24165c7b29 Fix time zone bug in FillForwardEnumerator and LiveFillForwardEnumerator (#3132)
* Fix time zone bug in FillForwardEnumerator

* Fix time zone bug in LiveFillForwardEnumerator
2019-04-30 17:22:59 -07:00
Stefano Raggi a5d12ed92d Fix test failing in Travis 2019-04-29 15:26:50 +02:00
Stefano Raggi 7d730f8db7 Improve timing of data available events for LiveSynchronizer 2019-04-29 15:26:50 +02:00
Stefano Raggi 513ef5d581 Fix DataManager live mode flag and failing unit tests 2019-04-29 15:26:50 +02:00
Stefano Raggi 9d930c170e Add new LiveSynchronizer + update live unit tests 2019-04-29 15:16:22 +02:00
Juan José D'Ambrosio 9fe9c59991 Fix asset classification reading bug
Add `AssetClassification` and  `CompanyProfile` properties to  the  FineFundamental object in the `FineFundamentalSubscriptionEnumeratorFactory`
2019-04-24 03:48:55 +00:00
Martin Molinero 771256fd2c Fix live coarse data subscription
- When subscribing to `Coarse` data the `LiveTradingDataFeed` will use
the normalized `CoarseFundamental Universe Symbol` for that market ->
not using the random GUID
- Adding unit tests which reproduce issue.
2019-04-17 17:18:33 -03:00
Martin Molinero 9cabd32d19 Add AddAlphaModel method 2019-04-04 13:36:07 -03:00
Martin Molinero 19f1806ddc Address review: readd Framework project 2019-04-03 21:55:43 -03:00
Stefano Raggi 875666f42d Fix date bug in BaseDataCollectionSubscriptionEnumeratorFactory
This bug was causing coarse data to be shifted ahead one day and was introduced in PR #2996
2019-04-02 20:43:23 +02:00
Stefano Raggi 08895c2c8a Reduce CPU usage in live equity enumerator stack 2019-03-26 21:10:28 +01:00
Martin Molinero baf0f207ea Adding unit tests 2019-03-01 12:35:46 -03:00
Martin Molinero ed5f7ab58c Moving price scale factoring to new enumerator
- Adding new `PriceScaleFactorEnumerator` that will scale raw prices
based on a provided `SubscriptionDataConfig` and update the
`SubscriptionDataConfig.PriceScaleFactor`. Adding unit tests.
- `BaseData` factories (`TradeBar.cs`, `QuoteBar.cs`, `Tick.cs`) will
no longer scale factor prices, they will generate data points in raw
mode.
- `SubscriptionDataReader` will no longer update the
`SuscriptionDataConfig.PriceScaleFactor`
- Fix `BrokerageTransactionHandlerTests` unit test that was having a
race condition.
2019-02-27 15:11:34 -03:00
Stefano Raggi 4053378690 Add unit test for universe selection security removal 2019-01-31 19:51:09 +01:00
Martin Molinero 0933da9303 Refactor previous commits
- Removing `AccountCurrency` from `Cash` and `Brokerage` classes.
`ICurrencyConverter` will now provide the `AccountCurrency`
- Adding new static `OrderFee.Zero` which will return a 0 order fee in
`NullCurrency`
- Adding static `Currencies.USD` value, replacing all "USD".
- Addin new static `Currencies.NullCurrency`
- Updating Bitfinex `FeeModel` so it return fees in quote currency.
Adding unit tests
2018-12-13 11:30:40 -03:00
Martin Molinero 75ffa300f1 Adding new IAlgorithm.AccountCurrency
- Adding new `IAlgorithm.AccountCurrency { get; }` that will point to the
`Portfolio.CashBook.AccountCurrency`. Setter will be added in a
following PR.
- Base `Brokerage` class will now have a `AccountCurrency { get }`
pointing to the `IAccountCurrencyProvider`. Will be used by the different
brokerages implementations.
2018-12-10 11:59:02 -03:00
Martin Molinero 90a80a8ef9 Increasing timer time step
- Increasing the timer time step for the
EmitsDailyQuandlFutureDataOverWeekends unit test.
- Now to avoid re entrancy I'm directly disabling it.
2018-12-04 09:48:27 -03:00
Jared 54fbf36be8 Merge pull request #2671 from Martin-Molinero/refactor-2429-corporate-events-own-enumerator
Move corporate events to new enumerators
2018-12-03 10:45:44 -08:00
Stefano Raggi 704ca10734 Add IApi to HistoryProviderInitializeParameters 2018-11-26 17:56:17 +01:00
Jared 2b8fa27001 Merge pull request #2697 from Martin-Molinero/refactor-2636-remove-security-from-subscription
Remove Security from Subscription
2018-11-20 14:16:07 -08:00
Martin Molinero dea0fe2674 Implementing composition over inheritance
- Mappings, splits, delisting and dividends will be
`ITradableDateEventProvider` that will be handled by
the `AuxiliaryDataEnumerator`.
2018-11-20 16:17:44 -03:00