AI4Finance-Foundation/FinRL-Tutorials

YahooFinanceProcessor failure to download the market data

randheerDas opened this issue · 6 comments

I am facing an issue while executing the code to download market data.

Following is the error:

1 Failed download:
['AXP']: Exception('%ticker%: No price data found, symbol may be delisted (1d 2008-01-01 00:00:00 -> 2008-01-02 00:00:00)')

And this keeps repeating and it never ends.

I feel there is a bug here either in finrl or in yfinance. My old tutorial runs well.

Following is my current configuration:

Python 3.10 , Finrl = finrl-0.3.6 and yfinance-0.2.38

Screenshot

[
FinRlTutorialLatest-Error
]

This is not an issue. The error is because you are trying to download the data for Sat, Sun and public holiday which does not exist. If you check the dates, they are moving forward regardless.

I have a similar problem. My software is the same version. I have a while loop that repeatedly pulls stock values until a condition is met. The loop works for several minutes then gives the data not found message. I can restart the program and it again works for several minutes than fails. The sleep function at the end is so that the data request is executed only 1 per minute. Any ideas on how to prevent this from failing are appreciated.

while MO == 0:

print("ctrl c will close a program from an infinite loop. Voice of experience.")

Count1 += 1

HL = current_price("HL")
now = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M")
minuteValue = datetime.datetime.now().strftime("%M")
print ("Counter = ",Count1, "Time is ",now)

I am commenting out the next 2 print lines to see if that fixes the program terminating

print("Time ", now)

print ("Hecla Mining ", HL)

AIM evaluation goes here.

SV = Num_Shr * HL #(assumes ProShres UltraPro)  Can add more SV1, SV2, etc. for the other stocks

print("SV = ",SV)

BR = SV*.1  # BR stands for Buy Resistance
SR = SV*.12  # Sell Resistance (SR), the multipliers are different to encourage a little more selling that buying so that you don't run out of cash.
if PC > (SV + BR):   # Has the stock dropped in value, if yes, time to look at buying some more.
		Advice = PC - (SV+BR)
		Buy = Advice 
		print ("Buy this many dollars ", Buy)  # with 5000, 50, 5000, this results in Buy roughly 500
		MO = Buy
		#  Program terminates if Buy condition is satisfied
elif SV> (PC + SR):
		Sell = (SV - SR)-PC
		if Sell > 0.2 * SR:
			MO = Sell
			print ("Sell this many dollars ", Sell)
			#  Program terminates if Sell condition is satisfied
		else:
			 MO = 0

print("made it to MO = 0")

else:
	dosleep = 1
	while dosleep == 1:

What is your error message?

similar problem,can't download the data

This is the error message I get after the program runs through the while loop for awhile.
image

Any and all help is appreciated

Data is missing for that bar. Open the csv file and check if data is present for 13:38 or 13:39. You need to handle missing data.