443 Commits

Author SHA1 Message Date
snugs 9e660ffcbe Remove usages of Symbol implicits from non-algorithm projects 2015-11-18 18:15:31 -05:00
snugs f788e9595f Use string in AddData<T> 2015-11-18 17:05:33 -05:00
snugs 18edd22e68 Rename SymbolCache.Get to SymbolCache.GetSymbol 2015-11-18 12:55:49 -05:00
snugs b870c55328 Adds Symbol(string) function shortcut for SymbolCache.Get(string) 2015-11-12 13:55:44 -05:00
snugs 8f9a228e0c Remove usages of Symbol implicits from engine
Breaks SymbolCache into its own file
2015-11-12 13:55:43 -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 15a86a1dcf SetBenchmark use configured security type if exists 2015-11-03 14:31:35 -05:00
snugs 4521a9aea3 Improve disconnect handling logic
No need to kill the algorithm if there's no open exchanges, wait
at least 15 minutes before killing algo (same as before with IB)

This logic is now centralized via an IBrokerageMessageHandler

Includes two new BrokerageMessageType
    Disconnect
    Reconnect

These messages should be used when a disconnect happens and again when we're reconnected
to tell the message handler the current state
2015-10-29 20:18:22 -04:00
snugs 93fb8a1f59 Adds IBrokerageMessageHandler and DefaultBrokerageMessageHandler
Removed ISetupHandler.SetErrorHandler, this is replaced by

brokerage.Message += (sender, message) => algorithm.BrokerageMessageHandler.Handle(message)

allowing algorithm direct access to managing the brokerage messages
2015-10-29 20:14:31 -04:00
Stefano Raggi f506ad5036 Initial implementation of FxcmBrokerage 2015-10-23 17:29:53 -04:00
snugs df14e885ac Move OandaBrokerage model to Common
Also adds BrokerageName.OandaBrokerage and supports it from QCAlgorithm.SetBrokerageModel(...)
2015-10-23 16:00:07 -04:00
snugs 8014da3640 Adds Custom universe API methods 2015-10-21 13:05:17 -04:00
snugs f296d666ee Implements user defined universes
This places all security subscriptions within a universes
Subscriptions generated via calls to AddSecurity are place in a UserDefinedUniverse
UserDefinedUniverse will serve up a predetermined list of symbols on a requested interval
LiveTradingDataFeed - reworked custom enumerators to use RefreshEnumerator as wrapper for rate limitting
2015-10-21 13:05:17 -04:00
snugs 678cd38fc5 Add Time.MaxTimeSpan to mirror Time.EndOfTime for time spans 2015-10-21 13:05:13 -04:00
snugs 6f15f4139b Move all subscriptions into a universe 2015-10-21 13:05:11 -04:00
snugs 68676a3dab Change IUniverse -> abstract Universe class 2015-10-21 13:05:10 -04:00
snugs 0e2f1fc1c0 Fixes bone-head start/end bug :/ 2015-10-15 17:54:05 -04:00
snugs 1e4114dc1e Don't allow algo to set start/end dat in live mode
Start and end date in live mode should be set using current time values
2015-10-15 17:21:24 -04:00
snugs 18066b86a6 Various fixes for live coarse
Set Start/EndDate in live mode properly
Adds helper to create CoarseFundamental symbols
Dispose of removed subscriptions properly
Remove time slice rounding
Subscribe to the coarse symbols to get data into the exchange
2015-10-15 13:44:49 -04:00
snugs 8f325e9c39 Add qc- prefix to universe subscriptions 2015-10-07 12:54:31 -04:00
snugs 4eb29a23f5 Generalize IUniverse selection method 2015-10-07 12:54:30 -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 dec42959a8 Adds SubscriptionSettings and Configuration to IUniverse 2015-10-07 12:54:28 -04:00
snugs 0d2d6e1e04 Remove coarse->coarse SetUniverse overload 2015-10-07 12:54:27 -04:00
snugs a642e734fd Rename Fundamental namespace to UniverseSelection 2015-10-07 12:54:26 -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 32d81af072 Change coarse selector to return symbol
This is less restrictive and the engine really doesn't need the
actual coarse data, just needs to know what symbols to request
data for
2015-10-01 13:44:27 -04:00
snugs fbc6c4e4f2 Moved History and warmup API methods into QCAlgorithm.History.cs 2015-09-23 19:11:49 -04:00
snugs bf4a6e731a Remove duplicate in History API implementations 2015-09-23 19:11:48 -04:00
snugs 950c2968bd Remove commented out old history API 2015-09-23 19:11:48 -04:00
snugs 96f20443f5 Fixes bug not adding benchmark security 2015-09-23 14:06:07 -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 089d12b190 Fixes bug running warmup over timespan in live mode 2015-09-22 19:07:15 -04:00
snugs 63ceefc4ed Initial implementation of algorithm warmup 2015-09-22 15:14:46 -04:00
snugs d2c431913f Make one second minimum in bar count calcs 2015-09-22 15:14:41 -04:00
snugs a6c4a8dd22 Doc fix, also moved func next to other similar funcs 2015-09-22 15:14:41 -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
snugs f30259a08c Properly set algorithm.UtcTime for usage in Initialize 2015-09-20 21:21:50 -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 4ae1f4f5b6 Finalizes History API
Fixes bug in backtest history provider

	Requests for bar counts were always incorrect because the history provider
	was emitting bars whose end time is equal to the start time.
	Implemented a FilterEnumerator<T> privately so he can filter those out
	when using non-tick data
2015-09-15 15:40:54 -04:00
snugs 5b29b8f230 Update IHistoryProvider to use request object 2015-09-15 15:40:52 -04:00
snugs 3ad5540a8a Remove dependency on Security from SubscriptionDataReader
Add dynamic data flag to config
Remove dynamic data flag from Security
Rename dynamically loaded flag to IsCustomData
Remove Security from SubscriptionDataReader ctor
2015-09-15 15:40:12 -04:00
snugs 65f75708bb Initial implementation of IHistoryProvider 2015-09-15 15:40:09 -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 4bc2092d8c Adds OnData(SymbolChangedEvents) handler 2015-08-25 21:22:43 -04:00