LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
You can now import Quandl data with a single line of code! Just tell us what Quandl-Code you'd like and we'll connect to the Quandl API, and import the data into your algorithm! The example below imports the Yahoo S&P index!
With this feature you can now import tens of thousands of different datasets from Quandl's library: //Import desired data in Initialize()
AddData("YAHOO/INDEX_SPY", Resolution.Minute); //Event handler for Quandl data
public void OnData(Quandl data) { ... }
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nik milev
103.9k Pro
,
Great addition!
Is there any document listing QuandlCodes for different securities/ETFs/futures/etc. ?
0
Jared Broad
Pro
,
Its virtually everything here: https://www.quandl.com - there are millions of datasets. The quandl codes are in the top-right corner of the page.
We look at the headers on the file - so as long as the data starts with a header you'll be able to access it under the Quandl object.
0
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Valery T
10.6k Pro
,
The AddData/OnData(Quandl) does not seem to work if I want to download and analyze multiple fundamental characteristics of the same or multiple stocks. For example:
does not seem to make sense, since AddData expects stock symbol as first parameter.
0
Jared Broad
Pro
,
The "DMDRN/AAPL_FCFF" doesn't exist on Quandl. But I've made an example of importing two SEC types here.
I think the issue you might have been seeing is because those non-trade-bar data types need a special type to tell QC what the value column is -- in this case its "Value". See my example below.
1
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Mikael Lindgren
69 Pro
,
I was trying out this example, just changed the quandl code to "NASDAQOMX/OMXS30" (index of top 30 euquities on the Swedish market) and the . But it gave me a runtime error with the following error message:
Error invoking NASDAQOMX/OMXS30 data reader. Line: 2011-05-03,1153.87,1162.0,1146.72,2915165471708.0,0.0 Error: Property with name 'close' does not exist. Properties: Time, Symbol, Value index value, high, low, total market value, dividend market value
And this Stacktrace:
at QuantConnect.Data.DynamicData.GetProperty (System.String name) [0x000c5] in <3b12344d871e4a1380e99c39d4cddf0b>:0
at QuantConnect.Data.Custom.Quandl.Reader (QuantConnect.Data.SubscriptionDataConfig config, System.String line, System.DateTime date, System.Boolean isLiveMode) [0x000ff] in <3b12344d871e4a1380e99c39d4cddf0b>:0
at QuantConnect.Lean.Engine.DataFeeds.TextSubscriptionDataSourceReader+<Read>c__Iterator0.MoveNext () [0x000a7] in Lean.Engine.DataFeeds.TextSubscriptionDataSourceReader+<Read>c__Iterator0.MoveNext () [0x000a7] in <2824cfe7150d4525ab66e90816c767c3>:0
Seems strange to me, 2011-05-03 is not even i the period of the sample code?
The error massage, as always, gives you the clue to find the solution.
The default Quandl constructor uses ‘close’ as its value column, but this data hasn’t a close column, instead the value column name is 'Index Value'.
Check the line 42 in the attached backtest.
1
Anton Esterhuyse
78 Pro
,
Hi Jared, is there an easy way to import the Quandl data into a python algorithm, without writing a custom class, similar to the code that you demonstrated:
Without writing a custom class is only possible when there is a Close column
0
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Anton Esterhuyse
78 Pro
,
Thank you. Could you please post an example of writing a custom class. The data I am requesting has a "close" column instead of a "Close" column so the standard Quandl import does not work. I have also looked at the documentation on importing custom data, but it did not help me to solve the problem. For example, I am trying to import WIKI/NVDA.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
AttributeError: type object 'Quandl' has no attribute 'SetValueColumn'
0
Alexandre Catarino
Pro
,
SetValueColumn is not an attribute/member of the Quandl class.
We have received this email last year: "On June 30, 2017, we will remove two databases from Quandl: GOOG and YAHOO. Unfortunately, the source data will no longer be available to us, so we cannot continue to offer it on the site." So we are not able to get YAHOO/INDEX_SPY in Research nor Algorithm Lab.
That said, we are working on getting custom data into Research Environment at QuantConnect.com since Research Environment doesn't have access to the internet for security reasons.
0
Apollos Hill
9.9k Pro
,
hi everyone am i doing somehting wrong? Trying to get DXY data from www.quandl.com/data/BCIW/_DXY-US-Dollar-Index-DXY
Backtest Handled Error: Error downloading custom data source file, skipped: RemoteFile: Csv https://www.quantconnect.com/api/v2/proxy/quandl/api/v3/datasets/BCIW/_DXY.csv?order=asc&api_key=JjAt5_5Ggmmoe5zUKipm Error: The remote server returned an error: (403) Forbidden. (Open Stacktrace)
class Quandl1moRate(PythonQuandl):
    def __init__(self):
      self.ValueColumnName = "1 mo"
class Quandl1yrRate(PythonQuandl):
    def __init__(self):
      self.ValueColumnName = "1 yr"
This doesn't seem to work for me. (I get "Trying to dynamically access a method that does not exist throws a TypeError exception.")
0
Stefan d'heedene
89 Pro
,
Hi Benjamin, I was able to add two columns of the same table before in my code (similar to what you wrote above), without getting any exceptions. The problem though is distinguishing what they are when the data comes in, because they both would have the same symbol "USTREASURY/YIELD"...
0
Link Liang
6.1k Pro
,
Hi Stefan,
I believe you can find some help here. Please start a new post if you have further questions. Thanks for your support!
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Loading...
To unlock posting to the community forums please complete at least 30% of Boot Camp. You can
continue your Boot Camp training progress from the terminal. We
hope to see you in the community soon!