Fund Manager
PORTFOLIO MANAGEMENT SOFTWARE
Contact Us

Certain ticker prices not downloading from Yahoo Historical

Questions about updating prices or transactions in Fund Manager

Postby mfau » Tue Jan 28, 2025 3:25 pm

Hi Mark,

I have certain tickers that used to be fine for downloading prices from Yahoo-historical. All my other tickers are downloaded from Yahoo-Historical but these have an error messages.

Extracts from logs:
Retrieve Started at 1/28/2025 22:09 UTC
Program Version = 2024.18.7
Quote Module Version = 620
Retrieving from server: (YAHOO-HISTORICAL)
Requested Historical Retrieve Dates: 1/21/2025 - 1/28/2025
Requesting: "PKI.TO" 1/21/2025 - 1/28/2025
WARNING - Unable to update: "PKI.TO" (PARKLAND CORP in [Portfolio path])
WARNING: Server used but did not update any prices: (YAHOO-HISTORICAL)
Could not update any investments

Retrieve Started at 1/28/2025 22:11 UTC
Program Version = 2024.18.7
Quote Module Version = 620
Retrieving from server: (YAHOO-HISTORICAL)
Requested Historical Retrieve Dates: 1/21/2025 - 1/28/2025
Requesting: "NWC.TO" 1/21/2025 - 1/28/2025
WARNING - Unable to update: "NWC.TO" (NORTH WEST VR VTG&COM VTG in [Portfolio path])
WARNING: Server used but did not update any prices: (YAHOO-HISTORICAL)
Could not update any investments
mfau
 
Posts: 3
Joined: Tue Oct 16, 2018 7:16 pm

Postby Mark » Tue Jan 28, 2025 4:20 pm

Hi mfau,

I see the same problem. It seems to happen on only certain symbols, but Yahoo is returning a 404 error to Fund Manager for some reason that isn't obvious at the moment. For now, you may prefer to use "Canada Stockwatch (3M Historical)". For the 2 items in question the symbols are just NWC and PKI, instead of NWC.TO and PKI.TO.

We'll have to see if we can't figure out what is going on with Yahoo (Historical) on these certain tickers.
Thanks,
Mark
Fund Manager - Portfolio Management Software
Mark
Site Admin
 
Posts: 11722
Joined: Thu Oct 25, 2007 2:24 pm
Location: Chandler, AZ

Postby mfau » Thu Feb 06, 2025 6:38 pm

Hi Mark,

The download error seems to be random. Each day when I update the historical prices, the error message is for a different ticker or two. Might be a throttling issue by IP address.

FYI, I stumbled upon this Python library: https://ranaroussi.github.io/yfinance/

It is very fast. Below is a sample code you can test in a Python environment (I use Google Colab). I might use it and use the Generic price import. Sharing it with you in case this can be an avenue to speed up the Retrieve Selected Historical Prices with Yahoo Historical.

Code generated with this prompt in ChatGPT:
Use the yfinance library in python. Code to extract these values in a csv format. Code will run in Google Colab.
SCHD 39.1863 1/2/2025 17005200 39.5887 39.0281 39.4881
SCHD 39.5218 1/3/2025 11448800 39.5794 39.1762 39.3922
...
(quote data is a copy paste from FundManager Export/Prices/Comma separated)

# Install required libraries (if not already installed)
!pip install yfinance pandas --quiet

# Import necessary libraries
import yfinance as yf
import pandas as pd
from google.colab import files

# Define the tickers and the date range.
tickers = ['SCHD', 'VUN.TO', 'SOBO.TO']
start_date = '2025-01-02'
# Set end_date one day after the last desired date to include 2025-02-06.
end_date = '2025-02-07'

# List to hold each ticker's data.
dataframes = []

# Loop over each ticker, download its historical data, and reformat the columns.
for ticker in tickers:
____# Download historical data for the ticker.
____df = yf.Ticker(ticker).history(start=start_date, end=end_date)

____# Reset the index so that 'Date' becomes a column.
____df.reset_index(inplace=True)

____# Add a column with the ticker symbol.
____df['Ticker'] = ticker

____# Re-order the columns to match the desired output:
____# Ticker, Open, Date, Volume, High, Low, Close.
____df = df[['Ticker', 'Open', 'Date', 'Volume', 'High', 'Low', 'Close']]

____dataframes.append(df)

# Concatenate the data from all tickers into one DataFrame.
result = pd.concat(dataframes, ignore_index=True)

# Save the resulting DataFrame to a CSV file.
csv_filename = 'historical_data.csv'
result.to_csv(csv_filename, index=False)

print(f"CSV file saved as '{csv_filename}'")

# Download the CSV file (automatic download in browser download folder).
files.download(csv_filename)
mfau
 
Posts: 3
Joined: Tue Oct 16, 2018 7:16 pm

Postby Mark » Fri Feb 07, 2025 12:18 am

Hi mfau,

Thanks for sharing. I'm surprised that still works for historical prices.
Thanks,
Mark
Fund Manager - Portfolio Management Software
Mark
Site Admin
 
Posts: 11722
Joined: Thu Oct 25, 2007 2:24 pm
Location: Chandler, AZ


Return to Prices and Transactions

Who is online

Users browsing this forum: No registered users and 6 guests

FundManagerSoftware.com | Search | Site Map | About Us | Privacy Policy
Copyright © 1993-2025 Beiley Software, Inc. All rights reserved.