Thanks to visit codestin.com
Credit goes to github.com

Skip to content

<spam> #134796

Closed as not planned
Closed as not planned
<spam>#134796
@iraspin

Description

@iraspin

Bug report

Bug description:

import yfinance as yf

C:\Temp\StocksToTrack.txt file contains stock tickers/symbols

with open("C:/Temp/StocksToTrack.txt", 'r') as file:
content = file.read()
chunks = content.split(',')

for element in chunks:
#print(f"Element: {element}")
ticker = yf.Ticker(f"{element}")
temp = ticker.history('5y')
temp.to_csv("C:/Temp/StocksHistoricalPrices/" + f"{element}" + ".csv")

CPython versions tested on:

3.11

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions