Commit Graph

285 Commits

Author SHA1 Message Date
Michael Handschuh e7c37a84ff Adds support for OnData(QuoteBars/OptionChains) 2016-04-07 13:39:30 -04:00
Michael Handschuh 83d6fc6560 Allow multiple security data updates per time slice 2016-03-31 20:00:39 -04:00
Michael Handschuh 3a39647851 Log algorithm time on splits and dividends 2016-03-31 16:05:01 -04:00
Michael Handschuh aa7d6be125 Simplify custom data check in algo manager 2016-03-22 09:57:37 -04:00
Michael Handschuh a3d7d66554 Converts cache list kvp to list DataFeedPacket 2016-03-02 20:36:20 -05:00
snugs f1968d1217 Remove algo id from IResultHandler.SendStatusUpdate
IResultHandler has an Initialize method which accepts a job, so all instances should know
they job (algo id, proj id, user id) and so these methods shouldn't be requiring the field
2016-01-11 15:11:08 -05:00
snugs 5b19d7d925 Dont submit zero qty orders on delistings 2015-12-30 00:01:41 -05:00
snugs abb7923f37 Set default fill forward res to Second for hist reqs 2015-12-23 16:08:43 -05:00
snugs fc7d507faa Fixes benchmark symbol when not manually added 2015-12-21 16:41:32 -05:00
Stefano Raggi 13014c80ec Fixed bug in warmup history requests 2015-12-20 13:31:02 +01:00
snugs db2b0a8fe4 Replace DateTime.Now with DateTime.UtcNow
TimeSlice.Time is in utc, so we should always compare against ther UTC times
2015-12-18 12:12:40 -05:00
snugs ffd9d138cc Move try/catch to algo manager 2015-12-17 18:04:49 -05:00
snugs 4f73c7ecea Make Slice DataDictionary lazy eval 2015-12-07 12:02:16 -05:00
snugs 8674941770 Make IDataFeed : IEnumerable, remove IDataFeed.Bridge 2015-12-07 12:02:02 -05:00
QuantConnect baa64dec47 Bug fix custom data algorithms 2015-12-02 18:28:01 -05:00
snugs be950e756a Log full errors/stack traces
Many places in the code used Log.Error(err.Message) or equivalent which
strips out all the really useful information, such as the stack trace
and inner exceptions. Using Log.Error(exception) is the correct way to
log an error as it will correctly write all the message details, also,
by passing the full Exception object we can improve the logging in this
one place and all call sites will automatically benefit from the improvements
2015-12-02 12:35:33 -05:00
snugs 601c6b54cf Send CommandResultPacket to IResultHandler for dispatch 2015-11-23 20:11:51 -05:00
snugs 9e660ffcbe Remove usages of Symbol implicits from non-algorithm projects 2015-11-18 18:15:31 -05:00
snugs 7b6c82841f Initial implementation of SecurityIdentifier 2015-11-12 13:55:42 -05:00
Stefano Raggi 01afc560f4 Added Settlement models
- New ISettlementModel interface with implementations:  ImmediateSettlementModel + DelayedSettlementModel
- SecurityPortfolioManager: UnsettledCashBook + ScanForCashSettlement
- Added tests for settlement models
- Added GetSettlementModel to IBrokerageModel
- Added AccountType argument to SetBrokerageModel()
- Added SetBrokerageModel(IBrokerageModel) overload
- Made BrokerageModel setter private
2015-11-11 22:18:34 -05:00
snugs d696f09b28 Adds IAlgorithm.Status
AlgorithmManager._algorithmState was removed and replaced with
pass through to IAlgorithm.Status
2015-11-09 11:18:41 -05:00
snugs 7630eaf357 Remove AlgorithmStatus.Quit, merged into Stopped 2015-11-06 20:31:40 -05:00
QuantConnect 513859f18e Added LEAN version to the server statistics, added quit state to acceptable exit conditions 2015-11-06 14:31:11 -05:00
snugs 3285198cfe Implements ICommandQueueHandler
The command queue provides external messaging into the algorithm.
It yields ICommand instances which are runnable against the algorithm.
This allows a user to exercise some control/change over the algorithm's
behavior while it's still running.

To show the pattern, I've implemented the Order, Liquidate, and Quit commands
2015-11-04 21:26:14 -05:00
snugs a634f6d8b8 Add type check before method invoker call 2015-11-03 19:32:05 -05:00
snugs b56b8bde38 Check data, not just timeslice.time in handover
The first emit from the live bridge can have more data than usual since
the first emit is dependent on when the Run method is actually called.
Inspect all data and make sure it's after the handover time
2015-11-03 19:20:32 -05:00
snugs cbc323dd43 Add padding to warmup handoff
Cases can arise such that the data feed's first iteration includes data
for about 50ms before the feed time sync loop is actually started, so give
a 100ms buffer on the handoff time check
2015-11-03 15:49:04 -05:00
snugs 6f15f4139b Move all subscriptions into a universe 2015-10-21 13:05:11 -04:00
snugs 4eb29a23f5 Generalize IUniverse selection method 2015-10-07 12:54:30 -04:00
snugs 468b4cdb92 Remove (mostly) unused UniverseSelectionType 2015-10-07 12:54:29 -04:00
snugs c31eb7fa65 Adds support for multiple universes
This is a scaffolding step in that live will only use the first in the list
Also, there's no API helpers for doing this and it's assumed it's only coarse
fundamental data, the next change removes the coarse fundamental assumptions
2015-10-07 12:54:29 -04:00
snugs a642e734fd Rename Fundamental namespace to UniverseSelection 2015-10-07 12:54:26 -04:00
snugs e919d99053 Updated universe selection to be more generic
Includes changing FundamentalType to UniverseSelectionType
IDataFeed.Fundamental -> IDataFeed.UniverseSelection
FundamentalEventArgs -> UniverseSelectionEventArgs

All in preparation for another type of selection, hand-picked
2015-10-07 12:54:25 -04:00
snugs 78dc208fc7 Make IBenchmark instead of using Func directly
This is in an effort to keep IAlgorithm usable across various languages
2015-10-07 12:46:56 -04:00
snugs 93b17d3b4e Fixes potential exception when no requests have fill forward 2015-09-23 19:11:50 -04:00
snugs cc2db6c0db Force warmup to use equal fill forward resolutions
This matches what the data feed does, we maintain equal ff resolutions for ease of use in the algorithm
2015-09-23 14:39:31 -04:00
snugs e8c38993b0 Properly set internal feed history request ff resolution
Also log requests after we modify the internal feed subscription requests
2015-09-23 14:02:22 -04:00
snugs 7f04b28dbf Fixes bug resolving resolution for warmup internal feeds 2015-09-23 13:50:09 -04:00
snugs 3b0c2f6c7c Rewrite warmup history requests for internal feeds 2015-09-22 22:49:06 -04:00
snugs d4f8006443 Revert "Enforce a 100k bar limit on warmup requests"
This reverts commit 5d30dedb46.

*This check was removed from lean as it is a cloud only concern.
2015-09-22 21:15:08 -04:00
snugs 5d30dedb46 Enforce a 100k bar limit on warmup requests 2015-09-22 20:17:44 -04:00
snugs 19f2fbe0ec Fixes bug in timespan warmup
Better status messaging when finished warmup as well
2015-09-22 19:28:07 -04:00
snugs acdc3632e6 Correctly set previous time for first iteration 2015-09-22 18:46:37 -04:00
snugs 63ceefc4ed Initial implementation of algorithm warmup 2015-09-22 15:14:46 -04:00
snugs 8c8d0f5e0f Moves application of universe selection to algo manager 2015-09-22 15:14:42 -04:00
snugs c67ff638f4 Renames Symbol.SID to Symbol.Permtick
Coming soon we'll have a full SID system, so renames to make backwards compatibility easier
2015-09-20 23:14:53 -04:00
Stefano Raggi fac6f46a9a New Statistics implementation
Added Trade and TradeBuilder classes
Added UtcTime and OrderFee property to OrderEvent class
Added AlgorithmPerformance class with a few metrics + tests
Added portfolio statistics + rolling statistics

Closes #30 via PR #164

Thanks @SteffanoRaggi!
2015-09-16 20:48:02 -04:00
snugs e1938baafe Clean up using directives 2015-09-01 22:17:35 -04:00
snugs df79ce30c2 Adds the Symbol type
This includes updating all usages of symbol as a security identifier to use the new type.
The type includes a unique field, SID, as well as the current ticker's value. This allows
for consistent addressability while also allowing the ticker to evolve over time with the
mapping changes.

Effort was made to maintain compile and runtime backwards compatibility.
2015-09-01 22:17:10 -04:00
snugs f405edc19d Cancel open orders on symbol changed events 2015-08-25 21:39:48 -04:00