Commit Graph

201 Commits

Author SHA1 Message Date
Stefano Raggi 0fc2af8025 Handle existing brokerage holdings in Futures universe selection filters 2017-05-17 22:11:43 +02:00
Stefano Raggi dbdcc9b8b4 Fix NullReferenceException with Futures existing holdings 2017-05-16 15:17:50 +02:00
jaredbroad 57456e12f5 Update python runtime to be 10x longer to account for pythonnet 2017-04-30 21:19:01 -04:00
Stefano Raggi 374c8a1959 Fix SetOrderProcessor called too late
When using BrokerageHistoryProvider with InteractiveBrokers, GetOrderByBrokerageId calls on open orders were logging NullReferenceExceptions because SetOrderProcessor is called later, in BrokerageSetupHandler.Setup.
2017-04-14 23:43:36 +02:00
jaredbroad fe9a9cc44e Refactor TryCreateAlgorithmInstanceWithIsolator to take job and set ram limit 2017-02-17 09:34:34 -05:00
jaredbroad dc0aba38c6 Packet controls limit on live initialization instead of stock 1024mb 2017-02-16 18:16:07 -05:00
jaredbroad b22b85d186 Use controls limit in backtest initialization 2017-02-16 18:13:08 -05:00
Andrew Hart 077c2256b6 Increase loaderTimeLimit of Loader in BacktestingSetupHandler 2017-01-16 17:32:02 -05:00
quant1729 c721a15af5 Merge branch 'futures'
Conflicts:
	Common/QuantConnect.csproj
2017-01-12 16:22:24 +08:00
quant1729 6ba1ae899a Removed UnzipCached() method and its usages. Updated Zip() method. 2017-01-11 12:57:03 +08:00
quant1729 48721125dc Revert "Fixed bug with static zip archive caching. Added new caching data file provider. Refactored IDataFileProvider interface."
This reverts commit c59743dc42.
2017-01-11 11:27:28 +08:00
quant1729 c59743dc42 Fixed bug with static zip archive caching. Added new caching data file provider. Refactored IDataFileProvider interface. 2017-01-08 09:25:26 +08:00
Stefano Raggi 89357ef7aa Disable margin calls in live mode and refactor margin call models
This PR reverts and replaces PR #674 because it caused issue #678.
The margin call model has been refactored and now contains both methods for margin call order handling (generation and execution).

Disabling margin calls is now much simpler:
Portfolio.MarginCallModel = MarginCallModel.Null;

List of changes:
- Added a new IMarginCallModel interface
- Renamed MarginCallModel to DefaultMarginCallModel
- Refactored margin call models by moving the GenerateMarginCallOrder method from ISecurityMarginModel to IMarginCallModel
- Disabled margin calls by default for live trading in BrokerageSetupHandler initialization
2017-01-06 17:50:38 +01:00
Stefano Raggi a0dac817ef Revert commit cb8f451 2017-01-06 15:41:52 +01:00
Stefano Raggi adc50af3c8 Revert commit 517ba7d 2017-01-06 15:39:38 +01:00
Stefano Raggi 517ba7db90 Added IMarginCallModel interface
- Renamed MarginCallModel to DefaultMarginCallModel
- Private null implementation exposed as MarginCallModel.Null
2017-01-05 19:03:08 +01:00
Stefano Raggi cb8f451ebb Disable margin calls by default in live mode 2017-01-05 15:09:32 +01:00
quant1729 5a6176df30 Adjusted maximum runtime limits to account for derivatives 2016-12-27 17:01:39 +01:00
quant1729 f2f93ef85c Better cache for ZipArchive 2016-12-27 15:18:39 +01:00
quant1729 27dd334ca5 Debug commit: removing temporarily time limits for backtests 2016-12-22 18:08:20 +01:00
quant1729 705024cd89 Merge branch 'futures'
Conflicts:
	Common/QuantConnect.csproj
2016-12-20 15:53:24 +01:00
Stefano Raggi 4a2b6c36e4 Improve logging and error reporting for runtime errors 2016-12-17 13:14:30 +01:00
Andrew Hart c71a55f7a9 AvailableDataTypes is now part of SubscriptionManager 2016-11-23 13:42:55 -05:00
Andrew Hart 81fe2a94cb Data formats (Trade/Quote) are configurable for each security 2016-11-18 15:30:54 -05:00
quant1729 1141cd21e6 Merge branch 'futures' into master
Conflicts:
	Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
	Algorithm/QCAlgorithm.cs
	Brokerages/InteractiveBrokers/InteractiveBrokersBrokerage.cs
	Common/QuantConnect.csproj
	Common/Securities/Option/Option.cs
	Data/equity/usa/factor_files/aapl.csv
	Data/symbol-properties/symbol-properties-database.csv
	Engine/DataFeeds/Enumerators/Factories/BaseDataSubscriptionEnumeratorFactory.cs
	Engine/DataFeeds/Enumerators/Factories/OptionChainUniverseSubscriptionEnumeratorFactory.cs
	Engine/DataFeeds/SubscriptionDataReader.cs
	ToolBox/QuantConnect.ToolBox.csproj
2016-11-07 16:18:11 +01:00
Stefano Raggi fbf4d7ca2e Fix benchmark subscription when also present in portfolio at startup
This change ensures the benchmark is added after the brokerage holdings, so the symbol is subscribed as a normal feed instead of an internal one.
2016-10-17 22:26:16 +02:00
quant1729 f89ea2183f Added real-time support for futures. Tested with IQFeed, IB. 2016-09-28 19:10:03 +02:00
quant1729 0396841d82 - Added support for sourcing and caching the full symbol list from IQFeed website.
- Added IQFeed options support to toolbox: option chain universe, option symbol list, subscriptions, live prices
- Added LiveTradingDataFeed to support options live screaming
- Added IB live options trading support: trading orders, holdings, live option exercising
- Modified ISymbolMapper interface to support derivatives (options, futures)
- Fixed minor bugs with (introduced ealier) symbol changes for options
Tested with IQFeed version 5.2.4.2. IB TWS offline version 957.
2016-09-14 21:56:12 +01:00
quant1729 2dce74e26d - Extended Option security and Option holding classes
- Updated IB fee model to support option exercise
- Added support for splits for options. Not tested on real data yet.
- Added option exercise functionality for long positions. Unit Tests. Not tested on real data yet.
- Added option assignment functionality for short positions. Assignment event. Unit Tests.
- Added basic option assignment simulator for backtesting brokerage. Simulates assignments for deep ITM short positions close to expiration. Unit Tests.
2016-08-31 18:00:00 +02:00
jameschch@outlook.com befbfc20ca merge latest upstream 2016-07-26 20:03:03 +01:00
Jared 59574d96e8 Merge pull request #495 from devalkeralia/BrokerageMessageHandler-fix
Brokerage Specific Default BrokerageMessagingHandler + FXCM BrokerageMessagingHandler Bug Fix
2016-07-22 12:07:14 -04:00
devalkeralia 9768e3b0b9 Added comments and minor fixes 2016-07-21 19:58:04 -04:00
devalkeralia f8fa37fa92 changed the Engine to use the new CreateBrokerageMessageHandler using the brokerage factory 2016-07-21 15:54:53 -04:00
AlexCatarino 648e4b1c7d User-frieldly warning misspecification of algorithm name
Defines a new resolver function to return null instead of throwing so that Loader can return a user-friedly error message.
2016-07-11 10:56:32 -03:00
jameschch@outlook.com 5335f08a92 Fix quantity cast to int 2016-07-03 18:23:13 +01:00
jaredbroad 2670b41be6 Bug fixes and event onload for when embed url is loaded 2016-04-11 20:06:25 -04:00
jaredbroad 632c21c99c New UX for LEAN, launched from Launcher using embedded HTML browser 2016-04-11 18:29:50 -04:00
David Hsieh 4f500c04aa Updated launcher to run new desktop configuration 'backtesting-desktop'. 2016-04-04 05:28:25 +10:00
Michael Handschuh 1d07e5d31a Move IBrokerageFactory.DefaultMarkets to IBrokerageModel 2016-02-04 13:27:53 -05:00
Stefano Raggi 98931c87fc Adds CFD support to BrokerageSetupHandler.Setup 2016-01-21 19:46:29 +01:00
Michael Handschuh 7fb2073fab Invoke ISecurityInitializer in Security.CreateSecurity
This removes the SetupHandler.UpdateModels(...) method which used the brokerage
model to set fill/fee/slippage/settlement models. This will also allow the
removal of flags indicating that the user has set certain Security properties
2016-01-19 13:13:00 -05:00
Michael Handschuh d9bb1a0a07 Dont overwrite models that have been explicitly set 2016-01-18 19:22:08 -05:00
Michael Handschuh efecbdfa6a Modifies IBrokeragModel interface
Replaced IBrokerageModel.GetTransactionModel with three new methods:
  1. GetFillModel(Security)
  2. GetFeeModel(Security)
  3. GetSlippageModel(Security)
2016-01-18 19:22:06 -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 7851a1dbc7 Use DefaultIfEmpty on Enumerable.Min calls 2015-12-28 15:40:42 -05:00
snugs 3a787c1fec Update models using IAlgorithm.BrokerageModel in universe selection 2015-12-28 14:44:39 -05:00
Stefano Raggi a29b78cc0a Fixed universe subscriptions with Forex 2015-12-28 13:38:52 -05:00
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 ad1ef64acd Don't zero cash balances for paper brokerages 2015-12-18 13:56:04 -05:00
snugs 8bb23c434d Adds security limits to job packets 2015-12-18 11:56:48 -05:00