Commit Graph

16 Commits

Author SHA1 Message Date
Martin Molinero 1dd742d1b8 Order sizing fix
- Improving OrderSizing.Value and Volume to include code in consumers
- OrderSizing.GetUnorderedQuantity() will adjust result by lot size
- ImmediateExecutionModels will use OrderSizing.GetUnorderedQuantity()
- OrderSizing.Value() will take into account ContractMultiplier
- Adding unit tests
2020-02-11 13:17:10 -03:00
Martin Molinero c77a7b9116 Add performance note 2019-06-04 19:05:36 -03:00
Martin Molinero ee4f8fee82 Overall performance improvements
- `TimeSliceFactory` will avoid creating empty collections
- `ExecutionModels` will check target collection count before trying to
enumerate
- Reduce calls to .`TotalPortfolioValue`
- `SecurityValues` will only be created when required
- `TimeKeeper` will use TimeZone unique Id as dictionary key. The
TimeZone hash is expensive.
- `AlgorithmManager` will avoid calling `DateTime.UtcNow`,
`ConvertFromUtc()` and `RoundDownInTimeZone()`
2019-06-03 15:09:02 -03:00
Martin Molinero cfa08a11fb Address reviews
- Removing `using QCAlgorithmFramework = QuantConnect.Algorithm.QCAlgorithm`
- Removing `QCAlgorithmFrameworkBridge`
- Removing `IsFrameworkAlgorithm`
- Making `EmitInsightBasedOnFill` private. Adding new
`IOrderEventProvider` exposing an `event` to which `QCAlgorithm` will
subscribe.
- `AccountType.Cash` algorithms will be allowed to manually trade and
emight insights manually or with alpha model.
2019-04-03 21:55:44 -03:00
Martin Molinero 19f1806ddc Address review: readd Framework project 2019-04-03 21:55:43 -03:00
Martin Molinero 32ac3146b4 Merge Framework and Classic Algorithms
- Merging Framework and Bridge algorithms into classic QCAlgorithm
class.
- Removing Framework project, VS17 and VS15
2019-04-03 21:54:32 -03:00
Martin Molinero c73b7bb62f Adding smarter methods for PortfolioTargetCollection 2018-07-27 10:48:55 -03:00
Stefano Raggi 7bc991a621 Update execution models to execute trades ordered by margin impact 2018-06-22 18:07:13 +02:00
Michael Handschuh fc9380bcd8 Add base class for execution models
Update existing models to derive from new base class
2018-05-11 01:50:45 -04:00
Michael Handschuh 534c95902c Use VWAP indicator from indicators project
The volume weighted average price execution model had its own implementation
of VWAP since the existing VWAP didn't perform the daily reset. The intraday
VWAP indicator has since been added to the indicators project so this is just
duplicate code.
2018-05-07 16:13:10 -04:00
Michael Handschuh d3bf5159ca Make execution models overrideable 2018-05-07 16:13:10 -04:00
AlexCatarino c820ad4c36 Adds python version of C# execution models
- Typoes were fixed in `ImmediateExecutionModel.cs`;
- Refactors `PriceIsFavorable` methods in `StandardDeviationExecutionModel` and `VolumeWeightedAveragePriceExecutionModel` C# models;
- Adds python version of C# execution models
2018-04-19 11:52:10 +01:00
Michael Handschuh 41a6e582f3 Convert framework model parameters to use arrays
Arrays make for easier consumption in python algorithms
2018-04-10 19:24:35 -04:00
Michael Handschuh 9221e954cd Remove securities after complete removal from universe
The execution models should maintain references to symbol data as long as
the security is a member of at least one universe. It's important to note
here that 'membership' in the universe is not the same as 'recently selected'
by the universe. A security remains a member even after it's been deselected
until it has zero holdings and zero open orders.

In the next commit we'll add an extra condition which will confirm that there
are also zero outstanding portfolio targets for the security.
2018-04-06 16:30:27 -04:00
Michael Handschuh 3b8c6124bc Improve readability of PriceIsFavorable
These methods were phrased in the negative sense. This change
reads how one would expect, if certain conditons are met, then
buy -- vs, if certain condition is not met, don't buy.
2018-04-06 16:30:26 -04:00
Michael Handschuh 92c5e64024 Adds VWAP and STD execution models
VWAP will submit market orders while the current price is more favorable than VWAP.
STD will submit market orders while the current price is a configured number of
standard deviations away from the mean in the favorable direction.
2018-04-06 16:30:26 -04:00