Commit Graph

978 Commits

Author SHA1 Message Date
Jared 7aef92ed44 Merge pull request #715 from quant1729/master-ffresolution-race-fix
Fixing fill forward resolution race bug in backtesting and live. Test.
2017-02-02 11:08:59 -05:00
quant1729 c416df6241 Refactored option assignment/exercise:
1. Made sure we treat properly option expiration dates before Feb 2015 and after. Added tests.
2. Refactored expiration delisting, assignments/option exercise to happen in the end of the date, not MOC orders in the beginning of the day. Regression test.
3. Refactored option exercise model to generate proper fills on assignments/option. Those fills are reflected correctly in margins, in stats and correspond to IB model. Still need to run IB real-life live tests.
4. Refactored option symbol related functions into separate module (OptionSymbol.cs)
5. Made sure OnAssignmentEvent arrived to the user algo in regression test. Do we need OnExercise event? Not sure.
6. Tested end-to-end Ray's current code (covered call strat) to see short option legs expire worthless, and stats updated.
2017-02-02 19:35:37 +08:00
quant1729 b91638bb17 Fixing fill forward resolution race bug in backtesting and live. Test. 2017-01-30 16:02:21 +08:00
Stefano Raggi a9668675e9 Add WeeklyUniverseSelectionRegressionAlgorithm
This algorithm is a regression test for the universe selection bug fix.
2017-01-28 19:53:44 +01:00
quant1729 40efc2cdb6 Updated multi-asset class algo for running backtests on the cloud. Tested it, but appreciate if someone can run it as well. 2017-01-25 01:13:34 +08:00
quant1729 7bf0f3f90e Fixed bug: inconsistent state of SecurityManager and option chains due to work of limiter. Added regression test. 2017-01-09 17:45:35 +08:00
Stefano Raggi a0dac817ef Revert commit cb8f451 2017-01-06 15:41:52 +01:00
quant1729 631b91ab08 Fake commit triggers builder 2017-01-05 23:51:19 +08:00
Stefano Raggi cb8f451ebb Disable margin calls by default in live mode 2017-01-05 15:09:32 +01:00
quant1729 145ba7bd83 Updated code as per PR 2017-01-02 19:47:23 +01:00
quant1729 c4cbef95e4 Removed AbsoluteStrikes method from option filter universe. Updated option filter universe to support monday and wednesday weeklys. Tests. 2016-12-29 22:10:55 +01:00
quant1729 562bd7ee6d Multi asset class algo now looks farther into options chain 2016-12-29 16:05:49 +01:00
quant1729 36a83dc44c Added sample option filter universe algorithm code. Tests. 2016-12-29 13:59:45 +01:00
quant1729 cf8163fc3a Refactored option/future universe filters for performance improvements and versatility 2016-12-29 11:44:15 +01:00
quant1729 54d373cbfb Fixed too big option universe in history example algo 2016-12-27 16:02:08 +01:00
quant1729 705024cd89 Merge branch 'futures'
Conflicts:
	Common/QuantConnect.csproj
2016-12-20 15:53:24 +01:00
Stefano Raggi a6c167627b Add hard reference to Accord.Math 2016-12-17 15:23:37 +01:00
Stefano Raggi 8688ece2d4 Update Accord.NET library to version 3.3.0 2016-12-15 20:46:25 +01:00
quant1729 6044cfb795 Cosmetic update of the multi asset class algo 2016-12-15 10:10:02 +01:00
quant1729 7304bb7e43 Added multi asset class sample trading strategy 2016-12-13 16:07:48 +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 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
quant1729 b6cd0b0b8c Added support for derivatives history. Tested: IQFeed, IB. First cut. Added history sample algos. Added config.json. 2016-11-21 15:50:55 +01:00
Michael Handschuh 14422065bd Add regression test for MACDTrendAlgorithm
This will serve as a baseline for the scanning consolidator changes.
As part of these changes, we'll be removing the usage of the
IdentityConsolidator, which is used in the MACDTrendAlgorithm
2016-11-15 23:34:40 -05:00
quant1729 1305d96edd Open interest support: backtesting, converters, live data handlers (IQFeed/IB), live trading (IB). First cut. Regression Test. 2016-11-15 21:33:33 +01: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
quant1729 07bb7f60d5 Cosmetic changes in futures sample algo 2016-10-27 11:12:27 +02:00
quant1729 dd062d777b Added data normalization settings in option algos 2016-10-26 21:51:50 +02:00
quant1729 5803115548 Option splits and renames in backtesting. Added regression tests. 2016-10-26 21:20:03 +02:00
quant1729 8494c9e1cf Added support for futures backtesting 2016-10-13 15:36:05 +02:00
quant1729 512b4064c1 Added config.json for tests of options - paper w/ IQFeed, trading/data: IB/IB, and trading/data: IB/IQFeed. Futures trading should also work fine.
Added futures symbols map file to the project due to very slow IQFeed symbol update function (account changes?)
Changed BasicTemplateOptionsAlgorithm.cs to run a single option position (enter/exit)
2016-10-12 21:06:39 +02:00
Alexandre Catarino 47a75771c6 Implements the RegressionChannel indicator (#584)
* Adds Intercept and Slope members in LeastSquareMovingAverage

* Implements the RegressionChannel indicator

The Regression Channel indicator extends the LeastSquaresMovingAverage with the inclusion of two (upper and lower) channel lines that are distanced from the linear regression line by a user defined number of standard deviations.
Adds tests.

* Renames Regression Channel properties

Remove *Line from Regression Channel properties
Adds reference

* Adds RegressionChannelAlgorithm

Adds RegressionChannelAlgorithm
Minor changes on the indidicator
Adds tests for the channels

* Intercept and Slope becomes IndicatorBase instead of WindowIndicator

* Fix LSMA Next Value calculation
2016-10-10 11:48:09 -04:00
quant1729 bf6671fb12 Minor fix of BasicTemplateOptionStrategyAlgorithm.cs 2016-10-05 16:54:33 +02:00
quant1729 d85b2cf83d Added support for multiple exchanges in Market.cs and IB files
Fixed bug with margining
Added options and futures algos that I currently use for tests
2016-10-05 12:02:33 +02:00
Jared 4e3ed0fdd4 Merge pull request #546 from squideyes/master
Renko Bar w/Gap Support and Consolidator Updates + Tests
2016-10-03 12:00:14 -04:00
quant1729 7fdf839dd4 Added support for futures nomenclature (standard groups: energy, softs, financials, etc)
Added symbol properties for that nomenclature
Added IQFeed mapping for that nomenclature
Added basic futures algo class
2016-09-29 21:52:00 +02:00
jaredbroad 6a226302d5 Revert changes to basic template 2016-09-29 10:26:19 -04:00
jaredbroad bb35b2d9d9 Initial commit of TradierBrokerage IDataQueueHandler for local live trading 2016-09-29 02:55:57 -04:00
Louis S. Berman 34611f07db Merged WickoConsolidator with RenkoConsolidator and related classes, such as tests; got rid of defunct classes 2016-09-25 21:24:15 -04:00
Andrew Hart 3e3610714b FuzzyInterfaceAlgorithm copied from QuantConnect.com.
This commit copies the code used to implement the fuzzy interface algorithm written and shared by Marco Espirulina on QuantConnect.com.
2016-09-04 20:57:15 -04:00
Andrew Hart 6dc22821af Added reference to accord.net 3.0.2 2016-09-02 16:50:36 -04:00
Andrew Hart b5663a5d5c Merge conflicts resolved.
Resolving the merge conflicts in PR #527.

AForge.NET and the new fuzzy logic algorithm example can now be merged
into master.
2016-09-02 14:08:51 -04: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
Louis S. Berman 08bd519aa1 Added back the underscores to the private variables from L36 to L44 in WickoConsolidator.cs; also Also restored original RenkoConsolidatorAlgorithm.cs 2016-08-29 10:47:13 -04:00
Louis S. Berman d4ba462b46 All 13 WickoConsolidatorTests and the WickoConsolidatorAlgorithm work 2016-08-27 15:59:50 -04:00
Louis S. Berman 84a25cd2cb Merge remote-tracking branch 'refs/remotes/lean-upstream/master' 2016-08-27 07:52:58 -04:00