Commit Graph

30 Commits

Author SHA1 Message Date
Stefano Raggi f7e06510d4 Fix missing front month contract in energy futures backtesting
Energy futures (CL, HO, RB, NG) expire in the month before the contract month.

To handle these properly, the following changes have been implemented:
- the AlgoSeekFuturesReader has been updated to create the future symbol with the correct expiry date
- the zip entry names in futures data files now contain the full expiry date (in addition to the contract month)
- the sample data files have been updated to use the new zip entry names
- new unit tests have been added and existing ones updated
2019-04-29 09:40:59 +02:00
Michael Handschuh 2fa9b0b6f7 Make regression algorithms self-contained
Some algorithms had dependencies outside of the file that needed
to be copied into each project. The alternative here is to move
the Bitcoin and QuandlFuture type into Common\Data or similar
2018-07-06 02:05:03 -04:00
Juan José D'Ambrosio 4ace8cb255 Lean Visualizer C# toolbox project and Python Wrapper working 2018-04-27 11:49:52 -03:00
Andrew 18e2857e78 Don't include tick type in the filename
Update LeanDataTests to reflect correct crypto hour/daily filenames
2017-11-10 16:27:00 -05:00
Andrew 02278ef519 Add btcusd daily data in updated format
Now lean expects both trades and quotes as seperate files. This commit adds the data in the updated format
2017-10-27 16:22:28 -04:00
Andrew 9d90ff1cb1 Hourly and daily crypto files need their tick type specified in their zip archive filename 2017-10-26 15:13:48 -04:00
Andrew 8264cc4a9f LeanDataTests passing for crypto securities
The Crypto security can be modeled with both trades and quotes easily, therefore it is necessary to make sure that the LeanData, LeanDataWriter and associated BaseData.Reader() methods can read/write both Trades and Quotes.
2017-10-25 16:52:31 -04:00
Andrew 406eef196b Specify crypto only switch statement in LeanData.GenerateLine
Because cryptocurrencies can be either Trades or Quotes, the Crypto security type needs it's own switch statement in LeanData.GenerateLine. This produces non-scaled TradeBars or QuoteBarrs.
2017-10-25 16:50:48 -04:00
Jared Broad fb7d1994ff Tidy and add tags 2017-09-20 17:14:44 -04:00
Andrew 35cdd07897 Update zip entry path of equity Tick files 2017-07-10 11:55:54 -04:00
Juan José D'Ambrosio 703d75a96c Update LeanDataTests.cs
Using [international standard date notation](https://www.cl.cam.ac.uk/~mgk25/iso-time.html) in the `CorrectPaths_CanBeParsedCorrectly` test method to avoid [test fail](http://imgur.com/a/78MlM) because error in parsing the string dates with an specific culture format.
2017-05-11 05:54:31 -03:00
Andrew 9fcf90fe60 Remove optional boolean in LeanData.ToCsv() 2017-05-08 13:18:54 -04:00
Andrew 22175bb7f0 QuoteBar.Reader does not apply scaling factor to forex and cfd 2017-03-27 12:01:24 -04:00
Andrew eb9d78470c LeanData.TryParsePath now returns a symbol
Instead of returning a heavier Security object, LeanData.TryParsePath will return a symbol, datetime and resolution.
2017-03-09 14:44:17 -05:00
Andrew 8e3a0715fc Added LeanData.TryParsePath() and associated tests
This method takes a path and will return a Security and DateTime.  This is useful in the ApiDataProvider that uses the api to retrieve files that are not present on disc.  The IDataProvider only ha a path to the file.  Using this method, the ApiDataProvider can extract the useful information from the path to communicate with the api.
2017-03-09 11:34:36 -05:00
Andrew 86de1fb763 Added tests for LeanData.GetCommonTickTypeForCommonDataTypes 2017-02-15 11:57:39 -05:00
Andrew Hart b49319bfdb Added IsCommonLeanDataType
This method is helpful in determining if a Type is a common data type, which are TradeBar, QuoteBar and OpenInterest.
2017-01-06 12:09:15 -05:00
Andrew Hart 46b74f6bae Refactored GetDataType into LeanData
This method is used by both Future and OptionsChainUniverse.  This method is useful, espeically in the SecurityManager.  It will eventually be used there.
2017-01-06 11:48:25 -05:00
Michael Handschuh f158e1492f Updates local file reader to check for zip entry name
Includes updates to Tick/TradeBar/QuoteBar GetSource methods to specify zip entry name for options
2016-03-17 10:51:53 -04:00
Juan Manuel Alvarez b3494afc47 Constants renamed to Globals.
Globals values can be reloaded from configuration.
2016-03-12 01:07:31 -03:00
Michael Handschuh c9e870b934 Update LeanDataTests for option zip entry names 2016-03-03 16:55:55 -05:00
Michael Handschuh 86004cb55a Adds TickType to config - use in GetSource 2016-02-24 09:31:34 -05:00
Michael Handschuh 89c50f7e6f Adds test verify GetSource is same as LeanData methods 2016-02-23 20:48:03 -05:00
Michael Handschuh ebef3f4143 Adds Config to LeanDataLineTestParameters 2016-02-23 20:42:30 -05:00
Michael Handschuh 3f02477fdb Fixes bug/adds test for GenerateZipFilePath 2016-02-23 20:38:49 -05:00
Michael Handschuh b23d5541ec Remove duplicate data from options data line
This data is specified in the zip entry name
2016-02-23 15:37:14 -05:00
Michael Handschuh 6e2357db49 Properly handle null bid/ask in QuoteBar.Reader 2016-02-23 10:35:04 -05:00
Michael Handschuh 4d0c387db0 Adds tests for LeanData.GenerateLine 2016-02-19 12:18:31 -05:00
Michael Handschuh e8f6b2fab9 Adds options support to LeanData 2016-02-17 14:29:48 -05:00
Michael Handschuh 55a086f8fc Adds tests for zip naming 2016-02-17 13:30:15 -05:00