portfolio-performance / portfolio

Track and evaluate the performance of your investment portfolio across stocks, cryptocurrencies, and other assets.
http://www.portfolio-performance.info
Eclipse Public License 1.0
2.95k stars 605 forks source link

Fail with loading quotes for BF/B ticker #1584

Open mshavliuk opened 4 years ago

mshavliuk commented 4 years ago

Description

Loading quotes fail. It looks like the PortfolioPerformance has some troubles with loading the quotes that includes / character in its ticker while trying to load the data from YahooFinance (at leat with that).

For the stock with ticker BF/B it requests the data from https://query1.finance.yahoo.com/v7/finance/spark?symbols=BF%2FB&range=10y&interval=1d (link), while actual data is available here: https://query1.finance.yahoo.com/v7/finance/spark?symbols=BFB&range=10y&interval=1d (link)

🤔 So it tries to substitute the ticker in a request url as is (with encoding special chars), but it looks like they should be removed. Just an assumption❗️

Steps to reproduce

  1. Open the "All securities" page
  2. Click "+" -> "Search for instruments..."
  3. Input the following ISIN: US1156372096.
  4. Chose the company with ticker BF/B (BROWN-FORMAN CORP B DL-15)
  5. Click "Apply"
  6. Go to the "Historical Quotes" tab and select Provider:"Yahoo finance", Exchange: "BF/B (New York)"
  7. Press OK

Expected behaviour

It loads the quotes successfully, display graph etc.

Actual behaviour

The quotes loading fails. I have attached the load debug data below

Additional context

The Debug response:

  Error on attempt 1 for ticker BF/B: https://query1.finance.yahoo.com/v7/finance/spark?symbols=BF%2FB&range=10y&interval=1d --> 404

screencast 2020-06-01 21-22-51

ghost commented 4 years ago

@mshavliuk Just for your reference at Yahoo Finance the symbol is BF-B (or BFB) as Yahoo does not support special characters at symbols:

https://finance.yahoo.com/quote/BF-B/ https://finance.yahoo.com/quote/BFB/