JECSand / yahoofinancials

A powerful financial data module used for pulling data from Yahoo Finance. This module can pull fundamental and technical data for stocks, indexes, currencies, cryptos, ETFs, Mutual Funds, U.S. Treasuries, and commodity futures.
https://pypi.python.org/pypi/yahoofinancials
MIT License
911 stars 215 forks source link

Using stock symbols with '&' characters #17

Closed pricelong closed 5 years ago

pricelong commented 5 years ago

Some of the stocks traded on NSE have '&' sign for example: GET&D.NS IL&FSTRANS.NS J&KBANK.NS L&TFH.NS M&MFIN.NS M&M.NS I have tried escaping the character using a '\' but this has not worked.

Is there a workaround for such symbols?

Thanks

JECSand commented 5 years ago

Hi pricelong,

Thank you for your submission and my apologies for the late response. Due to the holidays and a hectic work schedule, I haven't been able to investigate this yet. I plan on getting back to the module this coming weekend and I will investigate and get back to you then with more details.

pricelong commented 5 years ago

Thanks, JECSand.

pricelong commented 5 years ago

Hi JECSand, Any update or an ETA for resolution. Thanks

JECSand commented 5 years ago

pricelong,

My apologies for the delayed update. Could you post your error traceback and which version of python you are running?

Running the following:

yahoo_financials = YahooFinancials(['L&TFH.NS', 'GET&D.NS', 'IL&FSTRANS.NS', 'J&KBANK.NS']) print(yahoo_financials.get_financial_stmts('quarterly', 'balance')) print(yahoo_financials.get_historical_price_data('2015-01-15', '2017-10-15', 'weekly'))

seems to be working fine for me.

pricelong commented 5 years ago

Thanks.