Commit Graph

109 Commits

Author SHA1 Message Date
Martin Molinero 0ee2102bb1 Fix or ignore failing unit tests 2019-07-26 12:46:02 -03:00
AlexCatarino 1495345b88 Removes Alternative Data Files
Use `.keep` file as a place holder to keep folder structure.
2019-07-11 00:12:01 +01:00
AlexCatarino bb5cec3a49 Address Review and Fix Unit Tests 2019-06-21 13:14:47 +01:00
AlexCatarino 7b81f1a64d Implements Estimize Equity Endpoints Alternative Data
- Release: Financial releases for the specified company
- Estimate: Financial estimates for the specified company
- Consensus: Consensus of the specified release

For each equity endpoint, we create a `BaseData`, a Downloader and add unit tests.
2019-06-21 13:14:47 +01:00
Jared 40da80357b Merge pull request #3314 from QuantConnect/bug-3287-universe-selection-schedule
Adding PredicateTimeProvider for live mode
2019-06-19 10:58:26 -07:00
Gerardo Salazar f93c7d8b53 Add unit tests to cover changes 2019-06-19 10:08:27 -07: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
Gerardo Salazar 3c04d922c2 Address reviews 2019-06-17 16:45:53 -07:00
Gerardo Salazar 2ad1f19f85 Implements Sec Custom Data, ToolBox Application, and Sample Algorithm 2019-06-17 16:45:53 -07:00
Martin Molinero 1581801f9b Address reviews 2019-06-11 12:01:57 -03:00
Martin Molinero bb6671b811 Fix tests after RemoteFileSubscriptionStreamReader changes 2019-05-28 13:24:52 -03:00
Jared cd80c70775 Merge pull request #2868 from gsalaz98/feature-2859-rdg-delistings-mappings-splits-dividends-generator
RandomDataGenerator Mapping, Delisting, Splits, and Dividends Generator
2019-05-14 15:46:24 -07:00
AlexCatarino 0202df35f4 Replaces Enum CalendarType for Static Class with the Same Name
Replaces Enum `CalendarType` for static class with the same name. This class defines two properties (`Weekly` and `Monthly`) that can be used to define the previous calendar date (Monday or 1st of current month) which will correspont to the `Time` of a `IBaseData` object.

Refactor `PeriodCountConsolidatorBase` to define use `GetRoundedBarTime` based on a period specification that depends on the constructor overload: `integer`, `TimeSpan` or `Func<DateTime, CalendarInfo>`. The last one can be set with the `CalendarType` properties.
2019-04-08 22:10:04 +01:00
AlexCatarino 5314e7426d Implements Calendar (Weekly/Monthly) Consolidator
Implements consolidators that group bars by a calendar unit (week or month).
2019-04-08 22:10:04 +01:00
Gerardo Salazar 55f8376c53 Create mapping, IPO, delisting, splits, and dividends random generation
Created random-seed argument for rdg in order to let the user get deterministic output

Update documentation in 'FactorFileRow.cs' to accurately reflect factor
file structure

Update CSV generation for FactorFile so that it uses FactorFileRow's CSV
generator

Add FinancialCalendar to make it easier to implement logic regarding
financial quarters

Add mapping events to RandomDataGenerator

Update MapFileRow ToCsv method to correctly emit the ticker as lowercase

Fix bug in FactorFile where we would get the same initial data point twice
when we converted it to CSV

Create new method to convert a MapFile to CSV

Create new method to write MapFile to disk as CSV

Add unit test to test for successful CSV generation in MapFile

Add new files to project

Add FinancialCalendar unit tests

Create new class to handle generation of dividends, splits, and maps
2019-04-02 21:25:10 -07:00
Stefano Raggi b026813145 Fix SubscriptionManager.AddConsolidator for Resolution.Tick
Since subscriptions are enumerated in non-deterministic order, tick consolidators for multi-tick-type security types (such as Crypto, Future and Option) could end up being added to the wrong subscription, e.g. QuoteBarTickConsolidator added to a tick subscription with TickType.Trade. This was causing the Consolidated event handler to never be called.
The Resolution.Tick case is now handled properly, checking the subscription tick type.
2019-02-28 14:50:34 +01:00
Stefano Raggi 4608544aaa Add extra asserts in Slice unit test 2019-01-23 14:49:36 +01:00
Stefano Raggi 5d90a3ef87 Fix generic Slice.Get to handle TradeBar and QuoteBar for the same symbol 2019-01-23 11:45:06 +01:00
Stefano Raggi 273d6e90da Fix parsing of crypto tick data with sub-millisecond timestamps
- also updated extension methods ToInt32 and ToInt64 to support input strings with decimals
2019-01-21 16:47:27 +01:00
Martin Molinero 46baedf858 Refactor FillModels
- Modifying `IFillModel` interface removing old methods and adding new
method `Fill Fill(FillModelParameters)`. This is a breaking change.
- Adding new `PythonWrapper` property for the `FillModel` base class.
This is required due to a limitation in PythonNet:
   - Given C# class T has `virtual` methods A and B. Where method A
   calls method B. And given custom python class L inherits class T.
   And overrides method B. When class L calls
   base method A (of class T). And when method A internally calls method B.
   It will call C# implementation, not the python override. This issue
   is solved going back to the `PythonWrapper`. Adding unit tests.
- Adding new `Parameters` property for the `FillModel` base class that will
be set by the call to `Fill()`. The `Parameters` property will be used by
the modified `XxxxFill()` implementations
- Adding new `Fill` result object for the `Fill(FillModelParameters)`
method
- Adding new check before removing a `SubscriptionDataConfig` due to the FillModels consuming the configuration collection when determining which Price to use. WIll now only remove the `SDC` if the symbol was removed from the selecting `universe`, this will avoid the case where the symbol is never deselected and the subscription ends, which happens at the end of all executions.
- Adding unit tests showcasing retro compatibility.
- Enabling C# `CustomModelsAlgorithm` as a regression test. Python
version returns a different result due to random number generation.
2018-11-29 15:38:46 -03:00
Stefano Raggi 177ae2def7 Add new methods to MultiPeriodField class
Also added MultiPeriodField unit tests
2018-10-31 20:45:54 +01:00
Martin Molinero 008c9ca873 Fixing unit tests 2018-09-28 15:44:05 -03:00
Martin Molinero 9d5351152d Adding new ISubscriptionDataConfigBuilder
- Adding new ISubscriptionDataConfigBuilder implemented by DataManager, exposed by
SubscriptionManager
- SecurityManager and SubscriptionManager will use new interface.
In a next PR, its intended for it to also be consumed by Universe.GetSubscriptionRequests().
- Moving LookupSubscriptionConfigDataTypes implementation into
DataManager
2018-09-27 18:09:08 -03:00
Martin Molinero d9f984a151 Remove unused AlgorithmSettings constructor parameter for SubscriptionManager 2018-09-26 14:08:48 -03:00
Stefano Raggi 683224435a Enable TLS 1.2 for Quandl API usage 2018-09-20 17:34:23 -04:00
Martin Molinero 1997197f47 Fix failing unit tests 2018-09-18 12:10:42 -03:00
Martin Molinero 41873b2315 Fixing unit tests 2018-08-31 16:06:41 -03:00
Michael Handschuh d04666f690 Round factors using quantquote precision
Adds rounding of price and scale factors when writing a factor file
row to csv. The precision provided is the same that is used by quant
quote in their raw files
2018-08-27 14:10:41 -04:00
Michael Handschuh 9e306e76c7 Add FactorFileRow.ToCsv(source) and fix Apply(Dividend) bug
The time check in FactorFileRow.Apply(Dividend) was not using the previous
trading date for comparison.

Added a 'source' parameter to FactorFileRow.ToCsv() for tracking each row's
data source.
2018-08-27 13:53:04 -04:00
Michael Handschuh 8861f251f8 Adds MapFile.FirstTicker
The first ticker and first date are most commonly used to properly create
security identifiers. Currently resolution of the first ticker is strewn
about in various places and often times it doesn't take into account the
case of an empty map file, where the first (and last) ticker are assumed
to be the permtick after removing the '.<number>' specifier at the end.
It's important to also not remove '.<letter>' -- as some securities are
named as such.
2018-08-27 13:53:04 -04:00
Michael Handschuh f1960d2243 Add FactorFile.MostRecentFactorChange, bugfix for empty files
Empty factor files (whether a single 2050 line or no lines), by definition don't
have any splits or dividends.

FactorFile.MostRecentFactorChange yields the maximum date that isn't the 2050 date
2018-08-27 13:53:04 -04:00
Michael Handschuh 57affafdc2 Implement 'live' factor files
Adds reference price to dividend/split
Adds GetSplitsAndDividends to FactorFile
Adds Apply methods to FactorFile/FactorFileRow
Updates factor files to include reference prices
2018-08-14 17:58:44 -04:00
Michael 661c31c3ef Merge pull request #2085 from StefanoRaggi/bug-2084-split-delisting-json-deserialization
Fix JSON deserialization for Split and Delisting
2018-06-07 12:11:21 -04:00
Stefano Raggi 0c2276c800 Fix JSON deserialization for Split and Delisting 2018-06-07 12:05:44 +02:00
Stefano Raggi 18de62b091 Make SubscriptionManager thread safe 2018-06-06 13:50:21 +02:00
Stefano Raggi 2ff5650b4a Add price and split factors to CoarseFundamental class 2018-06-01 12:19:06 +02:00
Stefano Raggi 311703dba4 Fix RuntimeBinderException when enumerating Slice with tick data
Closes #1949
2018-05-02 17:34:40 +02:00
Stefano Raggi 044ebbf11b Added TickType.Quote tick to TickConsolidator test 2018-04-02 21:58:31 +02:00
Stefano Raggi ac6fa2902c Update TickConsolidator to process only TickType.Trade ticks 2018-04-02 21:41:03 +02:00
Ian Worthington 94002fd48e Added Assert.IsNull(quoteBar) check. 2018-02-20 12:06:35 +09:00
Ian Worthington 454b3b0d32 Changed logic in QuoteBarConsolidator to match that of TradeBarConsolidator for the period.
Removed check for EndTime on the Count consolidator. Count consolidators need a separate review.
2018-02-20 11:56:53 +09:00
Ian Worthington f6a64a9355 More EndTime tests, fix for TickQuoteBarConsolidator 2018-02-14 17:02:15 +09:00
Ian Worthington 07fb42f823 Wrote test for TradeBarConsolidation to make sure EndTime works as expected in the count case.
Minor adjustment to the QuoteBar test.
2018-02-14 16:17:23 +09:00
Ian Worthington a93b39625a Wrote a test to show QuoteBar not properly updating it's EndTime.
Fixed it.
2018-02-14 15:34:09 +09:00
Jared Broad 5c92da6e19 Fix unit tests 2017-10-26 21:39:17 -04:00
Stefano Raggi e206de1cef Add SubscriptionManagerTests for SecurityType.Crypto 2017-09-06 23:09:18 +02:00
jameschch@outlook.com 3754b33026 Adds crypto unit tests 2017-08-30 15:40:35 +01:00
Stefano Raggi 492bc70229 Fix Options and Futures subscriptions at Tick resolution
Previously Tick resolution subscriptions only received ticks with TickType.Trade, now TickType.Quote and TickType.OpenInterest are received as well.

This PR replaces PR #1065
2017-08-22 02:20:36 +02:00
Stefano Raggi 8684ff6513 Fix price scaling in Futures data with Tick resolution 2017-08-11 15:15:14 +02:00
Andrew b9b54616ca Futures quotebar parsing test updated to reflect new futures parsing logic 2017-04-25 16:17:22 -04:00