-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
57 lines (46 loc) · 1.54 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import logging
from pathlib import Path
import os
import yfinance as yf
import pandas as pd
import datetime
# === General Configs ===
LOGGING_LEVEL = logging.INFO
ENVIRONMENT_PATH = "/Users/jjespinoza/Documents/repos/NewsWaveMetrics/.env"
# === Data Configs ===
CWD_PATH = Path(os.getcwd())
RAW_DATA_PATH = Path(f"{CWD_PATH}/temp/data/raw").resolve()
PROCESSED_DATA_PATH = Path(f"{CWD_PATH}/temp/data/processed").resolve()
# === Database Configs ===
DATABASE = "news_wave_metrics.db"
TABLE_STOCK_DATA = "stock_data"
TABLE_NEWS_DATA = "ai_safety_news"
TABLE_FRED_DATA = "fred"
# === Stock Data Required Columns ===
SELECTED_COLUMNS = ["Open", "High", "Low", "Close", "Volume"]
# === API Configs ===
News_SEARCH_URL = "https://newsnow.p.rapidapi.com/newsv2"
News_SEARCH_X_RAPIDAPI_HOST = "newsnow.p.rapidapi.com"
TWILIO_PHONE_NUMBER = "+18559673680"
ALERT_PHONE_NUMBER = "+13233330336"
# Pagination for API calls
PAGES = 10
YEARS_OF_NEWS = 10
# ECONOMIC_METRICS_IDS = [ Exchange Rates, Treasury Yields, Fed Funds Rate, CPI (Consumer Price Index), GDP (Gross Domestic Product), Industrial Production, Unemployment Rate, Consumer Sentiment, PPI (Producer Price Index)]
ECONOMIC_METRICS_IDS = [
"DTWEXBGS",
"T10Y2Y",
"DFF",
"CPIAUCSL",
"GDP",
"INDPRO",
"UNRATE",
"UMCSENT",
"PPIACO",
]
OBSERVATION_START = "2014-01-01"
OBSERVATION_END = datetime.date.today().strftime("%Y-%m-%d")
# Get the list of S&P 500 tickers
tickers_df = pd.read_csv("tickers.csv")
TICKERS = tickers_df["Symbol"].tolist()
# List of News Topics to Search For