Commit Graph

84 Commits

Author SHA1 Message Date
snugs f33cffe77f Moves asset count limit logic out of Algorithm namespace
Since we now support universe selection and by convention never remove a security
object, we can't rely on the counts of the security manager to perform limits on
data subscriptions, this logic was moved deeper into the engine, where we perform
UniverseSelection, which is the path taken to add new data subscriptions
2015-12-21 16:13:23 -05:00
snugs 8bb23c434d Adds security limits to job packets 2015-12-18 11:56:48 -05:00
snugs 07ea7958c6 Adds ISetupHandler.CreateBrokerage 2015-12-14 13:18:22 -05:00
snugs 809a1ec9bb Set algorithm default markets in setup handlers 2015-12-10 15:22:56 -05:00
snugs bc6ffbce0c Set algorithm parameters from job packet 2015-12-10 13:45:40 -05:00
snugs 75a81f581e Rename SecurityExchangeHoursProvider to MarketHoursDatabase 2015-11-30 16:50:09 -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 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
snugs 071d679f1e Send user emails on brokerage warnings 2015-10-29 14:03:53 -04:00
QuantConnect e80d6ae55b Extended execution time for init to support complex warm ups 2015-10-07 12:42:59 -04:00
snugs f30259a08c Properly set algorithm.UtcTime for usage in Initialize 2015-09-20 21:21:50 -04:00
snugs 730430b1bb Adds scheduling feature
Adds the ScheduleManager which allows an algorithm to add/remove scheduled events
Check out the ScheduledEventsAlgorithm for syntax
ScheduledEvents are at their core an IEnumerator<DateTime> that defines the event times coupled with a callback
IDateRule defines dates for events
ITimeRule defines time(s) on a given date for events
2015-08-10 10:56:14 -04:00
snugs e16c82a856 Adds IAlgorithm.PostInitialize
Resolve benchmark in PostInitialize method
2015-08-06 13:05:05 -04:00
snugs 6bd38ece77 Adds international/timezone support
Time sync:
	* Data feeds are required to time sync in UTC time
	* TimeSlice.Time is now in UTC

IAlgorithm
	* Time is now exclusively the algorithm's local time zone
	* Added UtcTime
	* SetDateTime( DateTime ) accepts a UTC time and is internally converted

SubscriptionDataConfig
	* Adds market and time zone as required ctor parameters

SecurityExchange
	* Now passes most calls directly through to SecurityExchangeHours class

SecurityExchangeHours
	* Holds market hours for each day of week (LocalMarketHours)
	* Talks in terms of local times in the SecurityExchangeHours.TimeZone time zone

Data/market-hours/
	* New data folder to hold market hour information
	* Includes market-hours-database.csv to hold market hours per market/symbol/security (see doc in file)
	* Includes holidays-usa.csv to hold holidays for 'usa' market
		+ The holiday files follow the pattern 'holidays-*.csv' where * is the market

TimeKeeper
	* Receives updates in UTC time
	* Passes that to LocalTimeKeeper's who lazily evaluate the time in their respective time zones
	* Eventually this can grow to be the sole source of time in the algorithm's scope

MISC:
	* Fixes exception thrown when exiting LiveTradingDataFeed
	* Fixes exception thrown when exiting FileSystemDataFeed
	* Fixes exception thrown when exiting StatusPing
	* Simplify FillForwardEnumerator logic with GetNextMarketOpen
	* Adds many time zones, see TimeZones.cs
2015-07-08 18:45:34 -04:00
QuantConnect 98dc0e37b7 Build script and language config for Iron python based algorithms 2015-07-05 21:00:01 -04:00
snugs 9c1b0f4616 Move order/order queue storage to transaction handler
Expose order and order processing ability via IOrderProvider/IOrderProcessor
2015-07-02 15:07:35 -04:00
snugs c8b4e6bdba Remove config 'local' value
This change includes addition of the 'tradier-save-tokens' config value used to write tradier access/refresh tokens to disk
2015-06-22 19:05:04 -04:00
snugs 4de2ec4070 Make Engine an instance
Updated all interfaces to accept dependencies via Initialize methods
2015-06-18 13:50:11 -04:00
QuantConnect 6b035d323c Converted Isolator to be an instance based class 2015-06-14 12:31:26 -04:00
QuantConnect fde0cbed3a Strip out block quote section header comments 2015-06-13 16:04:27 -04:00
QuantConnect 8bcb8236b7 Double runtime for subscribers 2015-05-31 22:34:52 -04:00
snugs 225eaf81c9 Initial impl of brokerage model 2015-05-23 15:44:00 -04:00
snugs 4eeb61911f Load debug information from setup handlers 2015-05-20 12:13:16 -04: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 568fc62b0f Adds dispose to BacktestingSetupHandler 2015-04-29 13:28:29 -04:00
snugs 5e419ada8f Some bug fixes/cleanup for IB live trading 2015-04-29 12:54:13 -04:00
snugs 1f15eb2c04 Initial implementation of Margin and Portfolio models
Changed system to use Margin Models, removing leverage wherever possible allowing for dynamic margin models.
Created first portfolio fill model for FOREX which treats it as a currency swap through the cashbook instead of a tradable asset.
Updated the Securities/SecurityPortfolioManager to use cashbook value + holdings removing FOREX virtual positions.
Created a new benchmark system for comparing quantconnect builds.
2015-04-13 20:51:43 -04:00
snugs 8f39ff0be9 Adds subscriptions for currency conversions after algo.Initialize()
These subscriptions are needed in order to have accurate conversion rates for computing portfolio value
2015-04-08 14:47:11 -04:00
QuantConnect 89d5c70270 Fix max orders switch up, made console setup handler allow infinite orders 2015-03-19 15:05:20 -05:00
QuantConnect 53f85f4ebd Reworked order limits for maximum per backtest-day for free accounts and unlimited for subscribers 2015-03-12 19:31:00 -05:00
Jared Broad 9df45356d5 Added setlimits API to algorithm to limit number of symbols differently for live and backtesting modes 2015-02-04 20:04:58 -03:00
Jared Broad 2d2b606389 Fix runtime backtest error, tidy up live logging, sent partial OrderEvents to IDE 2015-01-26 23:18:43 -03:00
snugs 17a2c01d63 Removed Brokerage as base class for other Brokerage instances 2015-01-23 16:22:36 -03:00
Jared Broad b3de520915 Initial commit 2015-01-12 12:03:33 -03:00