Commit Graph

318 Commits

Author SHA1 Message Date
AlexCatarino 68fd8a4120 New Python Support Framework
Initial commit
2017-01-10 16:12:19 -02:00
Stefano Raggi a0dac817ef Revert commit cb8f451 2017-01-06 15:41:52 +01:00
Stefano Raggi cb8f451ebb Disable margin calls by default in live mode 2017-01-05 15:09:32 +01:00
quant1729 2df14b7d0d Merge branch 'futures' into master-merge-new-updates
Conflicts:
	Engine/Engine.cs
	Launcher/Program.cs
2016-12-02 12:43:46 +01:00
Andrew Hart d81b436b30 Added BrokerageModelSecurityInitializerTests
Renamed ISeedSecurity GetLastData to GetSeedData

Renamed QCAlgorithm.History.GetSingleBarHistory to GetLastKnowPrice

Minor Style refactor
2016-12-01 11:55:48 -05:00
quant1729 3819561a82 Merge branch 'futures' into master-futures-merged
Conflicts:
	Common/QuantConnect.csproj
	Tests/RegressionTests.cs
2016-12-01 17:32:40 +01:00
Andrew Hart 54df455813 Added ISecuritySeeder to seed security prices when securities are created
FuncSecuritySeeder implements this new interface and is used in BrokerageModelSecurityInitializer to seed new securities with a price when they are created. FuncSecuritySeeder uses a new method,  GetSingleBarHistory, in QCAlgorithm.History to get the last price from the history provider.
2016-12-01 08:37:04 -05:00
quant1729 92a3be5ea5 Merge branch 'futures-quotebar-easy' into futures
Conflicts:
	Common/Securities/SecurityManager.cs
2016-11-28 14:46:46 +01:00
quant1729 55299e60fb Added new constructors to IBMapper class
Added support for history requirements, exposed by vol models. AM processes requirements.
Added new volatility model - standard deviation of returns - default vol model. Compared its results with publicly available.
Refactored option pricing engine to support optimal approximation calculations.
Added basic greeks approximation in case they are not available in QL. Tests.
Updated BasicTemplateOptionHistoryAlgorithm to print greeks.
2016-11-25 15:11:01 +01:00
Andrew Hart e5377bdd82 Options/Futures ChainUniverse uses AvailableDataTypes to create subscriptions 2016-11-23 15:25:58 -05:00
Andrew Hart c71a55f7a9 AvailableDataTypes is now part of SubscriptionManager 2016-11-23 13:42:55 -05:00
Andrew Hart f78831d629 Forex now defaults to QuoteBar data feeds and is backwards compatible with TradeBars 2016-11-21 16:41:44 -05:00
Andrew Hart 21b3196991 Refactor AvailableDataFeeds to public field on IAlgorithm 2016-11-21 15:09:36 -05:00
Andrew Hart 81fe2a94cb Data formats (Trade/Quote) are configurable for each security 2016-11-18 15:30:54 -05:00
Michael Handschuh 591f6b2127 Use IBaseData in type constraints
Refactors existing consolidators, indicators, and helper methods to depend on
IBaseData instead of BaseData. These updates also defines an IBaseDataBar to
act as an abstraction point between TradeBar and QuoteBar.
2016-11-09 09:20:16 -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 b6a96c38c1 Fix benchmark subscription when same symbol added later
This change handles subscriptions when adding/removing the benchmark symbol from OnData or in universe selection.
2016-10-17 23:41:12 +02:00
quant1729 a1c35422ea Added trading calendar supporting option expirations, future expirations, holidays, weekends. First cut. Tests. 2016-10-08 16:34:05 +02:00
quant1729 f89ea2183f Added real-time support for futures. Tested with IQFeed, IB. 2016-09-28 19:10:03 +02:00
AlexCatarino 183cb917fe Makes IAlgorithm Debug/Error/LogMessages a ConcurrentQueue
IAlgorithm DebugMessage, ErrorMessage and LogMessage are now ConcurrentQueue<string> instead of List<string> because List.Add is not thread safe.
Copying a list (using ToList()) at LiveTradingResultHandler while adding an element to it at QCAlgorithm caused a runtime error.
2016-09-27 14:02:28 -03:00
quant1729 dd72878d2c Implementing futures support. Future, FutureCache, Futures Chain, Futures Universe classes and more 2016-09-26 13:56:02 +02:00
Andrew Hart a8621ba99c Default security markets are specified in BrokerageModel.DefaultMarkets
The default value for the market parameter in AddForex, AddOption, AddEquity and AddCfd is null.  This allows unspecified markets to be set from the BrokerageModel.DefaultMarkets in the AddSecurity method for new securities added with these methods.  SetBrokerageModel updates BrokerageModel.DefaultMarkets and therefore the market used for all new securities.
2016-09-22 14:50:48 -04:00
AlexCatarino 82d81108ad Implements price variation models
Implements IPriceVariationModel interface which takes the security object and returns a decimal variation
Implemets SecurityVariationModel class: default implementation of IPriceVariationModel that returns a fixed value (read from symbol-properties-database) for decimal variation
Implemets EquityVariationModel class: implementaion of IPriceVariationModel that returns a decimal variation as a function of equity price
Implemets AdjustedPriceVariationModel class: implementaion of IPriceVariationModel that returns zero
Adds unit test
2016-09-20 15:36:04 -03: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
jaredbroad 1642aed05a Refactor PreOrderChecksImpl() and add lot size check for 0-quantity orders 2016-07-13 16:00:37 -04:00
Michael Handschuh 5fe577f331 Adds Option.Underlying, set via PostInitialize
Individual option securities will have this value set by the Universe on security creation
2016-04-07 14:33:55 -04:00
Michael Handschuh 7b183eded3 Add equity security for options in PostInitialize 2016-04-07 14:18:25 -04:00
Michael Handschuh e392183bb4 Adds QCAlgorithm.AddOption 2016-04-07 14:12:47 -04:00
Michael Handschuh e7c37a84ff Adds support for OnData(QuoteBars/OptionChains) 2016-04-07 13:39:30 -04:00
Michael Handschuh 12d8df887a Remove duplicate universe storage in QCAlgorithm 2016-03-16 19:39:35 -04:00
Michael Handschuh 262900a5dd Fixes bug in forex symbol properties quote currency 2016-03-02 23:27:12 -05:00
Michael Handschuh ba22908dc5 Adds AddEquity/Forex/Cfd methods 2016-03-01 14:06:36 -05:00
Stefano Raggi 4d9ddc7f72 Moved QCAlgorithm pattern helpers to CandlestickPatterns class 2016-02-24 00:56:54 +01:00
Michael Handschuh 1d07e5d31a Move IBrokerageFactory.DefaultMarkets to IBrokerageModel 2016-02-04 13:27:53 -05:00
Stefano Raggi f7f4e961e4 Update SecurityManager.CreateSecurity overload to take a SymbolProperties argument 2016-02-01 23:33:55 +01:00
Stefano Raggi 6a381a990e Adds SymbolPropertiesDatabase argument to SecurityManager.CreateSecurity 2016-01-23 00:03:50 +01:00
Stefano Raggi f5d2eb0b8a Adds symbol properties database loading in QCAlgorithm 2016-01-22 23:49:41 +01:00
Michael Handschuh 4783a1ace9 Calls to SetBrokerageModel create new SecurityInitializer
... unless SetSecurityInitializer has been called (explcitily set by user),
in which case we'll respect what the user passed in.
2016-01-19 15:33:29 -05:00
Michael Handschuh 473a3a6dc5 Extact IBrokerageModel factory method from enum 2016-01-19 15:24:28 -05:00
Michael Handschuh d4131317cc Adds SetSecurityInitializer helpers in QCAlgorithm 2016-01-19 15:18:08 -05:00
Michael Handschuh fc0bc11909 Move IAlgorithm.AccountType->IBrokerageModel.AccountType 2016-01-19 15:12:15 -05: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 55586ef819 Adds SecurityInitializer to IAlgorithm 2016-01-19 12:42:36 -05:00
snugs 589a84224d Fixes bug market benchmark as internal feed
Updated the AddToUserDefinedUniverse method to handle adding to the Securities
collection to prevent this from happening again.
2015-12-28 11:05:26 -05:00
snugs fc7d507faa Fixes benchmark symbol when not manually added 2015-12-21 16:41:32 -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 2b0fd189ed Renames IAlgorithm.Universes->UniverseManager 2015-12-17 17:32:13 -05:00
snugs 380149fe9a Change benchmark resolution if universes are present 2015-12-17 17:22:51 -05:00
snugs a77950ce56 Adds UniverseDefinitions, DollarVolumeUniverseDefinitions 2015-12-17 17:17:56 -05:00