Commit Graph

62 Commits

Author SHA1 Message Date
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
Michael Handschuh 3922dbc886 #2824: Use TickAggregator, add FilteredIdentityDataConsolidator
The existing IdentityDataConsolidator consumes all ticks, completely ignoring
the tick type. I doubt this is ever the desired behavior, but given my
reluctance to break existing regression and unit tests as well as perhaps
user algorithms, I've added a layer on top to provide the proper filtering.
Removed the stub type which mirrored the TickAggregator and also expanded
the TickAggregator implementations to provide full coverage of the possible
ticktype/resolution cases: OpenInterestTickAggregator and IdentityTickAggregator
2019-01-15 14:50:45 -05:00
AlexCatarino feeaf99fb5 Adds check for Pyrhon -> Func conversion 2018-04-17 23:03:28 +01:00
AlexCatarino b0265ba7f5 Adds support to python selectors in Renko Consolidators 2018-04-16 14:39:25 +01:00
AlexCatarino 35e8e0891e Fixes RenkoConsolidator for python
- Missing `event` keyword prevented pythonnet to recognize `DataConsolidated` as a event handler.
- Adds python version of `RenkoConsolidatorAlgorithm`.
2018-04-16 13:39:16 +01:00
Michael Handschuh 99491a9ec7 Add IDataConsolidator.Dispose to remove event handlers
All consolidators now clear the event handlers list when being disposed.
In addition, SubscriptionManager.RemoveConsolidator will now dispose of
the consolidator before returning. This ensures the consolidator and any
downstream indicators that were attached to it can be properly cleaned
by garbage collection.
2018-04-03 14:59:10 -04:00
Stefano Raggi ac6fa2902c Update TickConsolidator to process only TickType.Trade ticks 2018-04-02 21:41:03 +02: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 a93b39625a Wrote a test to show QuoteBar not properly updating it's EndTime.
Fixed it.
2018-02-14 15:34:09 +09:00
Stefano Raggi f09826c510 Fix RenkoConsolidator not accepting Tick data 2017-08-08 13:21:12 +02:00
Stefano Raggi 508e63af4d Update Bar types Volume and Bid/AskSize from long to decimal
This PR is another required step towards crypto-currency support.
2017-06-26 21:14:55 +02:00
AnshulYADAV, Computer Artist (CoArsey) 350e58567f Fixes 18 warnings with code CS1572 (#908)
* Fixes 5 warnings with code CD1572

* Adds the Xml Comment parameter and implements the missing selector parameter

* Fixes rest of the 13 warnings with code CS1572
2017-05-12 09:28:46 -04:00
AlexCatarino a32a883c29 Tick consolidator minor fix
WorkingBar resolution was not set explicitly and that made it incoherent with the Consolidator, since the default is minute. It causes IDataConsolidator.Scan to emit a bar that was already emited
2017-02-14 13:57:38 -02:00
Andrew Hart 489875de4f Set value of QuoteBar in QuoteBarConsolidator 2017-01-17 15:05:21 -05:00
quant1729 41bfdbcc9d Updated code according to the discussion in PR 2016-12-30 18:13:07 +01:00
quant1729 2df14b7d0d Merge branch 'futures' into master-merge-new-updates
Conflicts:
	Engine/Engine.cs
	Launcher/Program.cs
2016-12-02 12:43:46 +01:00
quant1729 3819561a82 Merge branch 'futures' into master-futures-merged
Conflicts:
	Common/QuantConnect.csproj
	Tests/RegressionTests.cs
2016-12-01 17:32:40 +01:00
Stefano Raggi b0c9c41bba Fix time-based consolidator bug with fill-forward data 2016-11-30 09:04:57 +01:00
quant1729 1305d96edd Open interest support: backtesting, converters, live data handlers (IQFeed/IB), live trading (IB). First cut. Regression Test. 2016-11-15 21:33:33 +01:00
Michael Handschuh 591f6b2127 Use IBaseData in type constraints
Refactors existing consolidators, indicators, and helper methods to depend on
IBaseData instead of BaseData. These updates also defines an IBaseDataBar to
act as an abstraction point between TradeBar and QuoteBar.
2016-11-09 09:20:16 -05:00
Louis S. Berman 34611f07db Merged WickoConsolidator with RenkoConsolidator and related classes, such as tests; got rid of defunct classes 2016-09-25 21:24:15 -04:00
Louis S. Berman 08bd519aa1 Added back the underscores to the private variables from L36 to L44 in WickoConsolidator.cs; also Also restored original RenkoConsolidatorAlgorithm.cs 2016-08-29 10:47:13 -04:00
Louis S. Berman 6d77d3c493 More field naming fixups; hopefully this round finally matches QC conventions 2016-08-28 09:03:30 -04:00
Louis S. Berman 1bb74def66 Removed WickoConsolidator<space>.cs file from commit 2016-08-27 17:13:56 -04:00
Louis S. Berman 7dd1519f0e Updated private variables in WickoConsolidator to have leading underscoes 2016-08-27 17:10:07 -04:00
Louis S. Berman d4ba462b46 All 13 WickoConsolidatorTests and the WickoConsolidatorAlgorithm work 2016-08-27 15:59:50 -04:00
Louis S. Berman a8349042ae Fixed the time start issue 2016-08-23 22:25:59 -04:00
Louis S. Berman bd39813bc9 Ready to create tests for WickoConsolidator 2016-08-22 18:27:06 -04:00
Louis S. Berman 42ce62b238 Starting to add wicko consolidator 2016-08-22 17:58:01 -04:00
AlexCatarino 94563a1896 Fixes indicators lagging when combined with consolidators. 2016-07-28 12:07:44 -03:00
Michael Handschuh 8314b87380 Fixes last bid/ask size in QuoteBarConsolidator 2016-02-23 10:35:03 -05:00
Michael Handschuh 089182afa3 Adds IDataConsolidator.Scan(currentLocalTime)
This allows the consolidator to know the current time without receiving a new piece of data
2016-02-19 12:19:04 -05:00
Michael Handschuh 63c7745c81 Adds QuoteBarConsolidator 2016-02-19 12:19:03 -05:00
Michael Handschuh ad39636542 Adds TickQuoteBarConsolidator 2016-02-19 10:44:07 -05:00
Michael Handschuh 8e24215fbb Adds PeriodCountConsolidatorBase.ShouldProcess
Allows pieces of data to be ignored from the consolidation process
2016-02-19 10:42:50 -05:00
Michael Handschuh 26bede056d Make generic base consolidator in prep for quote bars 2016-02-18 11:33:33 -05:00
Michael Handschuh 57ae4b6d9c Adds IDataConsolidator.WorkingBar 2016-02-18 02:24:44 -05:00
snugs 7c53a73310 Override BaseData.EndTime in RenkoBar
RenkoBar was implemented before BaseData.EndTime, and it appears
to have been an oversight not implementing it properly in RenkoBar.
2015-11-12 13:46:47 -05:00
snugs 1131d534b6 Change identity consolidator to not accept duplicate timestamps
For tradebar data, duplicate time stamps means this is filled forward on a higher resolution,
for example, daily being filled forward onto minute bars.
For tick data, we don't do fill forward, so we don't apply this logic
2015-09-23 14:37:30 -04:00
snugs e1938baafe Clean up using directives 2015-09-01 22:17:35 -04:00
snugs 1a8feaeb60 Remove IsTradeBar/HasVolume from API methods 2015-08-12 14:54:17 -04:00
snugs 9502138167 Simplify DynamicDataConsolidator constructors/impl 2015-08-12 14:36:20 -04:00
Stefano Raggi 3e2b5b2ea0 Fixed bug when aggregating ticks + fixed issues #90 and #91 2015-06-03 02:30:23 +02:00
snugs 89b6e98af8 Fixes warnings mostly relating to xml comments
Also cleans up some block comments

Via PR#72 - thanks @ammachado!
2015-05-13 10:56:47 -04:00
snugs 81e0f3ac88 Improve DataConsolidator type mismatch message 2015-05-04 15:16:49 -04:00
snugs 3959bb5218 Adds a period to the TradeBar 2015-04-30 18:46:36 -04:00
Michael ac5075ab50 Merge pull request #59 from willniu/master
The logic regarding the initial trade bar in TradeBarConsolidatorBase.cs:Update

@willniu
2015-03-31 14:58:57 -04:00
willniu ca9d7f663d TradeBarConsolidatorBase.cs: Updated comments in and its test name for the new behaviour. 2015-03-29 12:39:39 +11:00