Commit Graph

686 Commits

Author SHA1 Message Date
AlexCatarino d7f2411fcd Upgrades pythonnet version
In this version, we have fixed a bug that led to System.AccessViolationException when we add timezone information in the datetime.datetime object.
2017-09-12 17:33:52 +01:00
AlexCatarino ea83e68674 Use UTC for Bitcoin custom data
Since Bitcoin custom data is UTC, it is set with AddData and we can use DateTime.UtcNow for EndTime.
2017-09-07 20:56:44 +01:00
AlexCatarino 4eb02f6a0c Fixes example of live custom data
In this example, the custom data Time was set to Datetime.Now and it was not passing the FrontierAwareEnumerator. Now, EndTime is set to the current time of the default exchange.
2017-09-07 18:22:31 +01:00
jameschch@outlook.com 564e0c3d95 Removes obsolete references to bitfinex 2017-09-01 15:16:46 +01:00
jameschch@outlook.com 6c06413fe4 Moves existing bitfinex to crypto and updates crypto tests 2017-08-30 13:46:30 +01:00
Juan José D'Ambrosio f2bcad3451 FXCM Forex Real volume and Transactions ToolBox Project (#1025)
Create ForexVolume.cs

ForexVolumeDownloader added

* testing

Retrieving all resolution data.

* Writer WIP

Writing volume data with LeanDataWriter

* hour and minute data correctly saved

* algorithm added

* all working!

Downloader slices big requests working!

Cleaning made, documentation added.

* vwma qcalgorithm

VWMA QCalgorithm done.

* small fix

* Small changes.
Typo fix

* Duplicated dates issue fixed

* QC sid added.
feed changed.

* code cleaning

* data correctness test implemented

* First review changes.

* Review changes

* LeanData.cs reseted

* Forex volume writer hour and daily data tests passed.

* Cleaning tests WIP

* All test pass.

* Tests refactoring done.
All tests pass.

* config.json reverted

* FxcmDD reverted

* program.cs clean
namespace fixed

* Resolution and Symbol argument check added.

* Start date fix.

* end date request fixed

* Update Program.cs

market fixed

Update Program.cs

* New path implemented and working.
Reading tests deleted.

* Update Program.cs

* ForexVolume renamed to FxcmForexVolume

Rename classes and files to FxcmVolume
2017-08-28 16:25:52 -04:00
Jared Broad 8281911bd0 Revert "Upgrades pythonnet version"
This reverts commit 310e5c4211.
2017-08-22 16:11:54 -04:00
AlexCatarino 310e5c4211 Upgrades pythonnet version
In this version, we have fixed a bug that led to System.AccessViolationException when we add timezone information in the datetime.datetime object.
2017-08-21 21:59:59 +01:00
Andrew e116709b24 Specify <LangVersion> of 6 in all csproj files 2017-08-07 15:27:26 -04:00
Xiang Li 8e745ffd60 Update CallingRFromCSharp.cs 2017-07-27 17:27:41 -04:00
Xiang Li 5ec6a3b0a4 Update and rename CallingRFromCSharp to CallingRFromCSharp.cs 2017-07-27 17:12:44 -04:00
Xiang Li 12966e4311 Update CallingRFromCSharp 2017-07-27 16:29:43 -04:00
Xiang Li 3b1df3bff6 Rename 2017-07-27 16:12:13 -04:00
Xiang Li fcf5027a35 Create CallRFromCSharp 2017-07-27 16:05:08 -04:00
Xiang Li c3d5940359 Delete CallingRFromCSharp 2017-07-27 15:52:08 -04:00
Xiang Li e428cbdb9a Modify AlgoTemplate file. 2017-07-27 15:37:04 -04:00
LiXiang618 b017017ab1 Support R.Net and R-base in C#
Install R-base.
Write CallingRFromCSharp.cs file telling the usage of some APIs.
2017-07-26 15:08:17 -04:00
Stefano Raggi 9b3909b6e8 Fix a couple of bugs in BasicTemplateOptionsAlgorithm
The algorithm had two issues:
1. the LINQ query for contract selection was not including the option right (Put or Call)
2. the algorithm was submitting two extra orders at the end of the day (when market closed)

A helper method was also added in QCAlgorithm to determine if the market is open for a given symbol at the current time.
2017-07-22 21:26:03 +02:00
Stefano Raggi f704747696 Downgrade NodaTime to version 1.3.4 due to breaking changes in 2.x 2017-07-08 03:09:35 +02:00
Stefano Raggi 0344387fa9 Fix invalid MathNet.Numerics reference in Algorithm.CSharp 2017-07-08 02:41:25 +02:00
Stefano Raggi e4005fa78c Upgrade NodaTime to version 2.0.3 2017-07-08 01:12:43 +02:00
Stefano Raggi 4f483abcd9 Upgrade libraries Accord.NET, CloneExtensions, MathNet, QLNet 2017-07-08 00:31:40 +02:00
Stefano Raggi d88d82af12 Upgrade Json.NET to version 10.0.3 2017-07-07 23:21:47 +02:00
Stefano Raggi e463ccf088 Upgrade all projects to target .NET Framework 4.5.2
In the advanced build settings, Language version was also upgraded from C# 5.0 to C# 6.0. The minimum Visual Studio version required will now be VS2015.
2017-07-07 22:49:17 +02:00
Stefano Raggi 93e255d44a Update HistoryAlgorithm regression test
On June 30, 2017, GOOG and YAHOO databases have been deleted from the Quandl site, so now History requests for these symbols are returning empty lists and regression test is failing.

The HistoryAlgorithm has been updated to use the CHRIS/CME_SP1 ticker instead of YAHOO/INDEX_SPY.
2017-07-01 16:24:36 +02:00
Jared 678b05bb4f Merge pull request #980 from smartquant/daily_futures_settings
Fix for using daily or hourly resolution market data for futures.
2017-06-30 11:09:48 -04:00
smartquant 112bd3db47 Created regression test for futures strategy using daily data 2017-06-27 12:13:49 +02:00
Jared 24fcd239a7 Merge pull request #982 from QuantConnect/issue-330/decimal-quantity
Order and Holding Decimalization Support
2017-06-26 09:51:51 -04:00
AlexCatarino 37b22d4693 Updates pythonnet nuget version
In this version, we have just included a dll for macOS
2017-06-23 13:22:24 +01:00
Stefano Raggi 4a12c28823 More decimal quantity fixes
- Reverted some changes to algorithms
- Changed UpdateOrderCommand.Quantity from int to decimal
- Fixed DefaultMarginCallModel for decimals and LotSize
2017-06-22 20:45:57 +02:00
Stefano Raggi 977a1b80fa Revert change to CustomDataRegressionAlgorithm 2017-06-20 20:54:38 +02:00
Stefano Raggi 6bfea3d216 Post merge fixes
- Update quantity to decimal in OptionExerciseOrder
- Update FractionalQuantityRegressionAlgorithm to use QuoteBarConsolidator
- Update FractionalQuantityRegressionAlgorithm stats
- Truncate order quantity to int in IB exerciseOptions
- Truncate order quantity to int in FuzzyInferenceAlgorithm
2017-06-20 01:00:36 +02:00
Stefano Raggi 9139ca7c40 Merge master into issue-330/decimal-quantity 2017-06-19 23:50:26 +02:00
AlexCatarino 6ca9d7cf14 Updates pythonnet package
This update implemented implicit conversion.
From now on, python algorithms will be able to use string object instead of Symbol object when a method overload requires Symbol.
2017-06-15 18:32:29 +01:00
Stefano Raggi b4c1b5a7a3 Update backtest dates in BasicTemplateFuturesConsolidationAlgorithm
Changed dates to use data files available in GitHub
2017-06-08 18:42:26 +02:00
Stefano Raggi eac552169d Add regression algorithms for splits with hourly data 2017-06-06 18:35:44 +02:00
AlexCatarino f6aa31643c Updates pythonnet package
This new pythonnet package makes available the latest version from pythonnet master branch and includes modifications to enable charting in Lean for python.

The dockerfile to create images for the cloud is updated to reflect the package update and adds keras and tensorflow
2017-06-02 10:45:45 +01:00
AlexCatarino 4eb80e78e9 Upgrades pythonnet to version 1.0.2.1
Previous version was not matching methods with nullables accordingly
2017-05-26 01:16:54 +01:00
AlexCatarino 18d83fb8ec Updates python framework to support python datetime
Updates nuget package to support conversion from C# DateTime to python datetime.
Updates algorithms to reflect this change.
2017-05-23 13:40:26 +01:00
AnshulYADAV, Computer Artist (CoArsey) bc26980665 Fixes 6 warnings with code CS0108 (#910) 2017-05-12 09:30:10 -04:00
jaredbroad fd64b05db8 Apply sed to use UC4 by default (linux), windows should use UC4
sed -i -e 's/UCS2/UCS4/' Common/QuantConnect.csproj

sed -i -e 's/UCS2/UCS4/' Algorithm/QuantConnect.Algorithm.csproj

sed -i -e 's/UCS2/UCS4/' Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj

sed -i -e 's/UCS2/UCS4/' AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
2017-04-30 14:19:09 -04:00
jaredbroad f07748135e Merging updates from master 2017-04-29 17:38:06 -04:00
AlexCatarino b145521c72 Changes quantity calculation in algorithm examples
In some examples, we have been using Portfolio.Cash to calculate the quantity of shares in orders. This is a bad advice for users, since Portfolio.Cash does not account loses in other positions and its use can lead to invalid orders due to insufficient capital. Instead, users should use Portfolio.MarginRemaining.

FuzzyInferenceAlgorithm and LiveFeaturesAlgorithm had minor changes to perform backtests with available data
2017-04-28 18:08:53 +01:00
Andrew b574707e23 Changed start and end dates of the BasicTemplateFuturesAlgorithm.cs 2017-04-26 12:41:40 -04:00
AlexCatarino 40e570b2cb Updates QuantConnect.Pythonnet package
New version include instructions to copy nPython.exe to bin directories
2017-04-11 17:05:29 +01:00
AlexCatarino 479fadea55 Updates QuantConnect.Pythonnet nuget package
In the new version, it was included nPython.exe that compiles python scripts.
2017-04-11 12:08:38 +01:00
Stefano Raggi a62fab742c Fix SetBrokerageModel when called after AddSecurity and friends
Currently, calling SetBrokerageModel after AddSecurity, AddForex, etc. has no effect, the security initializer has already been initialized and its models have been set to their default implementations.

For example, Forex backtests using OandaBrokerageModel will report fees calculated with the default fee model (Oanda fees are spread-based, so they should always be reported as zero).

In this PR, SetBrokerageModel now calls SecurityInitializer.Initialize on all securities added before SetBrokerageModel is called.

Fees will be calculated using the correct fee models and the order of the calls in algorithm Initialize is now irrelevant.
2017-04-07 15:40:24 +02:00
jaredbroad 0f40b0df05 Merge remote-tracking branch 'origin/master' into pythonnet 2017-03-26 10:14:03 -04:00
Victor Baybekov de21307a32 Update Json.Net to 9.0.1 2017-03-14 01:35:59 +03:00
AlexCatarino 17622db0c5 Adds Futures Momentum Algorithm
In this example, the algorithm buys a ES futures contract when an up trend is defined by a EMA Cross in SPY. When the contract expires, another one if bought.
2017-03-10 15:19:29 -03:00