Spaces:
Runtime error
Runtime error
Commit ·
9b5de9a
1
Parent(s): 8221867
Upload 3 files
Browse filesFiles changed (3)
12345678910111213141516class Trend_Downloader:
def __init__(self, args = {}): pass
def download(self, start_date, end_date, stock = "all"): pass
def clean_data(self): pass
def gather_one_day(self,date,stock = "all",delay = 0.1): pass
def transfer_standard_date_to_nonstandard(self,date): pass12345678910111213141516from pytrends.request import TrendReqimport pandas as pd
class Google_Trends: def __init__(self,args = {}): # https://github.com/GeneralMills/pytrends self.pytrends = TrendReq(hl='en-US', tz=360) def download(self, start_date, end_date, stock = 'apple' ): self.date_list = pd.date_range(start_date,end_date) timeframe = [f"{start_date} {end_date}"] kw_list = [stock] self.pytrends.build_payload(kw_list=kw_list, timeframe=timeframe) res = self.pytrends.interest_over_time() # res.columns = ["date","value"] return resfinnlp/data_sources/trends/_base.pyAdded+16
finnlp/data_sources/trends/baidu.pyAdded
finnlp/data_sources/trends/google.pyAdded+16