Commit Graph

22 Commits

Author SHA1 Message Date
Vinh Hung Nguyen c8a646c0f0 Feature 7182 missing python version crypto future algorithms (#7206)
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Solve Report Generation Conversion Rate Error bug (#7183)

* Solve bug

Remove if sentence that checked if Portfolio contained securities that
needed a conversion, like Forex, Crypto or Cfd. It didn't take into
account CryptoFutures so when the backtest result used that kind of
security types it never found a conversion for them. Making a git blame
for Report.PortfolioLooper constructor it was found the if sentence was
not needed so it was removed and then different reports were made for
algorithms that used security types different than Forex,Crypto,Cfd and
CryptoFutures to check everything was still working as expected.

* Solve bug

Remove if sentence that checked if Portfolio contained securities that
needed a conversion, like Forex, Crypto or Cfd. It didn't take into
account CryptoFutures so when the backtest result used that kind of
security types it never found a conversion for them. Making a git blame
for Report.PortfolioLooper constructor it was found the if sentence was
not needed so it was removed and then different reports were made for
algorithms that used security types different than Forex,Crypto,Cfd and
CryptoFutures to check everything was still working as expected.

* Missing Python Version of Crypto Future Algorithms - Issue 7128

* Address reviews

---------

Co-authored-by: hungv <hungv@compatibl.com>
Co-authored-by: Martin-Molinero <martin@quantconnect.com>
2023-04-24 11:27:38 -03:00
Martin-Molinero bb0c27fefd Period timespan consolidation improvements (#6408)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Period timespan consolidation improvements

- If user is trying to consolidate a period providing data of a bigger
  period we will now throw an exception. Adding tests
- If both consolidated and given data share the same period, gently
  adjust the consolidator into a data count of 1. Adding tests
- Fixing bug in QuoteBarConsolidator period double accounting. Adding unit tests

* Add Period and Count regression algorithm
2022-06-20 15:14:44 -03:00
Martin-Molinero 03f56481d4 Refactor python algorithm import (#5657)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Python research import improvements

- Improve start.py for research env
- Remove unrequired imports

* Centralize algorithm imports

* Add regression test GH action

* Unit test python import clean up

* Join research and main imports

* More python import clean up

* Fix failing skipped regression algorithm
2021-06-15 19:06:06 -03:00
Martin Molinero 936af7df7b Refactor BuyingPowerModel
- Remove unrequired `GetBuyingPower`
- Making `BuyingPowerModel.GetMaintenanceMarginRequirement` protected
instead of public
- Adding `GetMaximumOrderQuantityForDeltaBuyingPower` to replace
public `GetMaintenanceMarginRequirement` and improve API experience for
consumers like the `DefaultMarginCallModel`
- Adding new unit tests
2020-02-04 18:41:15 -03:00
Jack Simonson 0d963ccdd5 Changed Quanld source to correctly retrieve csv data, along with simple cleanup of import statements and use of Decimal 2019-03-04 09:47:33 -08:00
Michael Handschuh fdc866fda0 Reverting 'Merge pull request #2483 python-history-provider'
We didn't experience the expected performance improvements. Locally under
unit test there was aboout an order of magnitude throughput increase, but
when run against the history benchmark, this new approach was 60% slower.
We're reverting this for now to perform further analysis and better
understand the performance profiling of the python history stack.
2018-09-18 18:37:23 -04:00
AlexCatarino 3e4a71cd50 Creates QCAlgorithm.py: a bridge between C# QCAlgorithm and python algorithms 2018-09-17 19:05:48 +01:00
AlexCatarino 93a88eda95 Updates FractionalQuantityRegressionAlgorithm to use SetBuyingPowerModel 2018-08-21 16:49:07 +01:00
Stefano Raggi 3e3b6eea20 Fix Python version of FractionalQuantityRegressionAlgorithm 2018-07-11 17:18:13 +02:00
Jing Wu 084cd294b0 Remove semicolon in python algrotihms 2018-07-06 11:05:16 -04:00
Juan José D'Ambrosio e4f4943ec6 Update FractionalQuantityRegressionAlgorithm.py 2018-03-23 09:38:39 -03:00
Michael Handschuh 18a559943e Upgrade LEAN Python to 3.6 from 2.7
- Adds log to display the python version the algorithm is using.
- Fixes python algorithms that were failing because of small subtleties
like leading zeroes.
- Updates pythonnet with a version compiled with python 3.6 flags

- Changes in DockerfileFoundation: we now use miniconda to manage the python
environment.
- Took the opportunity to add NTLK (#1349), Tensorforce (#1369) and
PyTorch/Pyro (#1385).
- Changes readme in Algorithm.Python to show steps to install miniconda
2018-02-23 15:09:06 -05:00
Stefano Raggi a39e6a8e28 Revert "Merge pull request #1526 from AlexCatarino/python3"
This reverts commit 2e523992d0, reversing
changes made to fa48fc23ea.
2018-02-14 16:03:12 +01:00
AlexCatarino 84282503d0 Fixes python algorithm to be python 3 compliant 2018-02-13 13:00:50 +00:00
Stefano Raggi a5f02d646b Add comment for BuyingPowerModel in FractionalQuantityRegressionAlgorithm 2018-02-12 17:40:27 +01:00
Stefano Raggi 415542fcbc Set CashBuyingPowerModel as default for Crypto/GDAX 2018-02-12 17:38:12 +01:00
AlexCatarino 9459f47cba Updates pythonnet
In this update, methods overloads with decimal parameters accept python float.

- Fixes FractionalQuantityRegressionAlgorithm:
With the pythonnet update we can pass a python float where a decimal is required.
2017-12-29 17:25:48 +00:00
Stefano Raggi 51e7726431 Update FractionalQuantityRegressionAlgorithm
This algorithm has been updated because of the recent minimum order size change (in PR #1400).

Also, PR #1428 needsto be merged for the test to pass.
2017-12-21 11:31:10 +01:00
AlexCatarino 970ce7759c Fixes FractionalQuantityRegressionAlgorithm
With the pythonnet update we cannot pass a python float where a decimal is required.
2017-12-18 10:57:26 +00:00
AlexCatarino bd54a7a879 Fixes FractionalQuantityRegressionAlgorithm to pass regression tests 2017-10-24 19:31:49 +01:00
AlexCatarino adf32d5524 Fixes FractionalQuantityRegressionAlgorithm in python
Fixes FractionalQuantityRegressionAlgorithm in python to match C# equivalent: BTCUSD uses GDAX market.
2017-10-17 22:20:06 +01:00
AlexCatarino 9211b67286 Adds python algorithms for regression tests
CoarseFineFundamentalRegressionAlgorithm
CoarseFundamentalTop5Algorithm
DropboxUniverseSelectionAlgorithm
FractionalQuantityRegressionAlgorithm
2017-10-06 13:32:35 +01:00