Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quandl returns NaN data #15

Open
touringkg opened this issue Nov 1, 2017 · 1 comment
Open

Quandl returns NaN data #15

touringkg opened this issue Nov 1, 2017 · 1 comment

Comments

@touringkg
Copy link

Hi,

I've no trouble pulling in OHLC fields from quandl's WIKI and CHRIS databases while CFTC or YALE databases return the field names and date range but NaN data?

Following this ticket , I've added the new field names to the time_series_fields_list.csv but no dice...

This code works:

import datetime
from findatapy.util import SwimPool; SwimPool()
from findatapy.market import Market, MarketDataGenerator, MarketDataRequest
from findatapy.util.loggermanager import LoggerManager

logger = LoggerManager().getLogger(__name__)
market = Market(market_data_generator=MarketDataGenerator())

md_request = MarketDataRequest(
                start_date = "01 Jan 2000",
                data_source = 'quandl',
                category= 'fx',
                tickers = ['EC1'],
                fields = ['close', 'open', 'high', 'low'],
                vendor_tickers = ['CHRIS/CME_EC1'],
                vendor_fields = ['last', 'open', 'high', 'low']) 

df = market.fetch_market(md_request)
print(df.tail(n=5))

But this returns NaN

import datetime
from findatapy.util import SwimPool; SwimPool()
from findatapy.market import Market, MarketDataGenerator, MarketDataRequest
from findatapy.util.loggermanager import LoggerManager

logger = LoggerManager().getLogger(__name__)
market = Market(market_data_generator=MarketDataGenerator())

md_request = MarketDataRequest(
                start_date = "01 Jan 1970",
                data_source = 'quandl',
                tickers = ['US_CONF_INDEX_VAL_INST'],
                fields = ['index value', 'standard error'],
                vendor_fields= ['index value', 'standard error'],
                vendor_tickers= ['YALE/US_CONF_INDEX_VAL_INST'])

df = market.fetch_market(md_request)
print(df.tail(n=5))

Thanks in advance

@saeedamen
Copy link
Contributor

From memory, it doesn't allow field names with spaces (findatapy, will convert spaces in field names to underscore returned by Quandl?). However, let me double check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants