Commit Graph

481 Commits

Author SHA1 Message Date
Jack Simonson 8551720095 changed class name per suggestion from Alex 2019-02-26 15:24:43 -08:00
Jack Simonson d130cf09ee Rewrote creation of volatility indicator 2019-02-25 08:47:13 -08:00
Jack Simonson 861ea320da New Alpha -- Price Gap Reversion Alpha 2019-02-21 11:38:07 -08:00
HalldorAndersen bb2e3e37a5 Update QuantConnect.Algorithm.Python.csproj 2019-02-20 19:05:22 -08:00
HalldorAndersen 7686ef3a89 Create TripleLeverageETFPairVolatilityDecayAlpha.py 2019-02-20 19:02:46 -08:00
HalldorAndersen bc2d1c1963 Added new alpha: Lunch Break Mean Reversion Alpha (#2931)
* Create MeanReversionLunchBreakAlpha.py
2019-02-20 18:58:53 -08:00
HalldorAndersen 42bd32b15c Added new alpha: Global Equity Mean Reversion using IBS Alpha (#2930)
* Create GlobalEquityMeanReversionIBSAlpha.py

* Update QuantConnect.Algorithm.Python.csproj

* Update QuantConnect.Algorithm.Python.csproj

* Update GlobalEquityMeanReversionIBSAlpha.py

* Update GlobalEquityMeanReversionIBSAlpha.py
2019-02-20 18:37:22 -08:00
Jared 0b5a302fb5 Trim and refactor 2019-02-10 18:27:54 -08:00
potifreire 1001029cb4 Create IntradayReversalCurrencyMarkets.py 2019-02-11 01:00:40 +00:00
Jared a2e0d6f3a4 Merge pull request #2897 from HalldorAndersen/patch-2
Added Pump and Dump alpha algorithm
2019-02-07 18:29:22 -08:00
Jared f3cf32c3d7 Trim spaces 2019-02-07 18:29:12 -08:00
HalldorAndersen 560f14c63a Added Pump and Dump alpha algorithm 2019-02-07 18:01:48 -08:00
Jack Simonson 92730275f1 Update ShareClassMeanReversionAlphaModel.py
Updates to logic calculating whether position has crossed SMA
2019-02-07 15:17:54 -08:00
Jack Simonson 7677965f2f Update ShareClassMeanReversionAlphaModel.py
Grouped insights
2019-02-05 16:57:11 -08:00
Jack Simonson 1b8b5373a3 Update ShareClassMeanReversionAlphaModel.py
Added custom boolean flag for investment position
2019-02-05 16:53:35 -08:00
Jack Simonson ae6f69ff5d Update ShareClassMeanReversionAlphaModel.py 2019-02-04 18:10:48 -08:00
Jack Simonson d4b515f30c Update ShareClassMeanReversionAlphaModel.py
Grouped insights
2019-02-04 18:06:44 -08:00
Jack Simonson a35aee4f2f Update ShareClassMeanReversionAlphaModel.py 2019-02-04 16:38:02 -08:00
Jack Simonson 67fa7b5c74 Update ShareClassMeanReversionAlphaModel.py
Added missing import line
2019-02-04 16:34:30 -08:00
Jack Simonson 80c1591ddb Create ShareClassMeanReversionAlphaModel.py
New Demo Alpha model
2019-02-04 16:19:49 -08:00
Jack Simonson ffcd960139 Merge branch 'master' of https://github.com/QuantConnect/Lean 2019-02-04 09:00:41 -08:00
Jared 2956a17944 Merge pull request #2866 from QuantConnect/regression-alpha-algorithm-updates
Regression alpha algorithm updates
2019-02-01 13:23:17 -08:00
Jack Simonson 245f9645d9 Final tweaks
Added line to prevent memory leaks
2019-02-01 08:45:48 -08:00
Jack Simonson f6c4a9509b Update LiveFeaturesAlgorithm.py
Datetime change to match C# format
2019-01-31 18:04:13 -08:00
Jack Simonson 4c3e423a2c Update LiveFeaturesAlgorithm.py
Final tweaks after testing
2019-01-31 17:26:24 -08:00
Jack Simonson 25766d0ec1 Update LiveFeaturesAlgorithm.py
Small addition
2019-01-31 17:12:30 -08:00
Jack Simonson d9c2fa7974 Create LiveFeaturesAlgorithm.py
Write Python version of LiveFeaturesAlgorithm.cs
2019-01-31 17:07:12 -08:00
Jack Simonson 3bb5b647a2 Update OrderTicketDemoAlgorithm.py
StopLimitOrders seems to be coded improperly. The buy order had the limit price below the stop price, and the sell order had the limit prive above the stop price. By reversing the two, we can guarantee a sell limit at 0.25% below the close price and a buy limit at 0.25% above the close price, with a stop price at -0.1% and 0.1% respectively.
2019-01-31 12:13:54 -08:00
Jack Simonson 27e562ee15 Futures consolidator algorithm changes, new basic template algorithm for options consolidators
Changed function of BasicTemplateFuturesConsolidatorAlgorithm.py to use OnSecuritiesChanged to add/remove consolidators. Wrote equivalent algorithm for options data
2019-01-31 11:22:59 -08:00
Jared 8203f32ccf Merge pull request #2862 from QuantConnect/feature-110-make-account-currency-configurable
Adding SetAccountCurrency for backtesting
2019-01-30 15:09:44 -08:00
Jack Simonson 13ed3bcaf1 Update CustomChartingAlgorithm.py
One more tweak to overlay the lines rather than separating the series
2019-01-30 14:31:24 -08:00
Jack Simonson 2e7c3fb6e4 Update CustomChartingAlgorithm.py 2019-01-30 13:54:26 -08:00
Stefano Raggi 93c2ebf6ca Fix floating point precision issue in RebalancingLeveragedETFAlpha
This change was required due to #2829
2019-01-28 17:01:22 +01:00
Martin Molinero 1b0bdd9b0b Adding SetAccountCurrency for backtesting
- Adding new `SetAccountCurrency()` for backtesting. Has to be called
before adding any `Security` or calling `SetCash()`, else will throw.
- Adding new Non account currency unit tests for `CashBuyingPower`,
`SecurityPortfolioModel`, `SecurityMarginModel`,
`SecurityPortfolioManager`, `Future/OptionMarginBuyingPowerModels`
- Adding new C# regression test using `SetAccountCurrency()`, one for
`CashBuyingPowerModel` and one for `SecurityMarginModel`
- Adding new Py and C# basic regression algorithms using
`SetAccountCurrency()`
- `Options` and `Futures` will use not use `AccountCurrency` as quote
Cash.
- `SecurityBenchmark` value will be in account currency
2019-01-25 14:54:43 -03:00
Martin Molinero aca0267bbb Updating documentation
- Removing `setup.py` and updating python documentation
- Updating ubuntu installation documentation to match
DockerfileLeanFundation
2019-01-22 21:38:01 -03:00
Martin Molinero d53a922cf0 PythonNet installation does not require copy pasting
- Requires a new PythonNet 1.0.5.15 package where the different `.dll` are in a
specific folder: `\win` `\linux` and `\osx`
- Removed not present `decimal.py` from `Algorithm.Python` project. It
was moved into `Common`.
- Replace `xbuild` for `msbuild` required for using the `System.Runtime.InteropServices`.
Also note the `xbuild` on travis prints:
> >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
2019-01-22 19:48:11 -03:00
Martin Molinero 567e59ba00 Copy decimal.py to Launcher output dir
- Moving `decimal.py` into `Common/decimal.py` as a content copy always
file
2019-01-21 17:26:52 -03:00
AlexCatarino ef59fa7ba2 Updates pythonnet package.
In the new package:
- C# decimal conversion will use C# double and python float due to the big performance impact of converting C# decimal to python decimal;
2019-01-18 23:18:35 +00:00
Gerardo Salazar 40def51d93 Add python to regression test languages. Remove code with no effects from CustomModelsAlgorithm.py 2019-01-16 17:56:09 -08:00
Gerardo Salazar ad06996a7e #2715: Fixes CustomModelsAlgorithm.py making wrong trades. 2019-01-16 13:54:27 -08:00
Martin Molinero d9195317e3 C# decimal to Python conversion
- This commit is related to PR 19 in QC/pythonnet
   - C# decimal will be cast to C# double and converted into python
   float
- Adding new `decimal.py` into the python algorithm project. This is
required for backwards compatibility with users performing operations
over expected decimal types (like `Price`)
- Updating two python regression test algorithms using custom python
execution models to be aware and ignore floating point precision errors
when handling order sizing.
2019-01-15 12:13:42 -03:00
Martin Molinero 124af7282e Improve HistoryRequestBenchmark algorithm
- The HistoryRequestBenchmark will now perform a daily and minute history
request at end of day.
- C# performance is at ~15k data points per second
- Python performance is at ~11k data points per second
2019-01-11 18:09:59 -03:00
AlexCatarino d846efdac6 Implements indexer in DataDictionary derived classes
Explictly implements the indexert `this[string]` to all classed that inherit from `DataDictionary` since pythonnet was not able to access the indexer from the parent class.

- Changes DividentAlgorithm.py to test the fix.
2019-01-09 17:48:31 +00:00
Martin Molinero af8e6bf85c Fix starting capital for non usd cash
- Moving `UniverseSelection.EnsureCurrencyDataFeeds` call into the
`IResultHandler` implementation through usage of the new `SetupHandlerHelper`
class, that will also set an initial conversion rate if none present.
- Adding regression test, that reproduces original issue
2018-12-19 16:15:28 -03:00
Jared 86807d3f04 Merge pull request #2298 from AlexCatarino/bug-2288-pythonnet-memory-leak
Updates pythonnet
2018-12-18 16:44:53 -08:00
Martin-Molinero 9f502ec15e Merge pull request #2757 from Martin-Molinero/bug-2756-disable-intrinio-regression-tests
Disabling Intrinio regression tests
2018-12-14 17:39:19 -03:00
Martin Molinero 759c15833a Disabling Intrinio regression tests
- Disabling C# and Py `BasicTemplateIntrinioEconomicData` regression
test. Free user credentials are invalid because Intrinio has now a 30 day trial for free users
2018-12-14 15:29:46 -03:00
Martin Molinero 0af7ba14f5 Address reviews
- `CashBook[NullCurrency] { get; }` will throw an exception
- Revert `Currencies.USD` changes in user facing algorithms
- Improve some documentation
- Revert some format changes
- Adding more asserts for regression test
- Adding new regression tests using a custom fee model which returns
`OrderFee.Zero`
- Adding a non-usd account currency test to the cash book tests
- Adding some unit tests for `NullCurrency` and `OrderFee.Zero`
2018-12-14 12:38:55 -03:00
Martin Molinero 0933da9303 Refactor previous commits
- Removing `AccountCurrency` from `Cash` and `Brokerage` classes.
`ICurrencyConverter` will now provide the `AccountCurrency`
- Adding new static `OrderFee.Zero` which will return a 0 order fee in
`NullCurrency`
- Adding static `Currencies.USD` value, replacing all "USD".
- Addin new static `Currencies.NullCurrency`
- Updating Bitfinex `FeeModel` so it return fees in quote currency.
Adding unit tests
2018-12-13 11:30:40 -03:00
AlexCatarino 823bb01438 Updates pythonnet
Includes memory leak fix (https://github.com/QuantConnect/pythonnet/commit/c6db86653e7fa4fa89e1f8404d72e346b67ed857 and https://github.com/QuantConnect/pythonnet/commit/bec9563d2958acc5adf3e8972b23609fe3914402)

- Fix python version to 3.6.6 (avoid updating to 3.7)
- Fix numpy version to 1.14.5 (tensorflow requirement)

- Adds py-earth python package (closes #2399).
2018-12-07 09:36:48 +00:00