Skip to content

Commit

Permalink
Added a main
Browse files Browse the repository at this point in the history
  • Loading branch information
astro30 committed Mar 30, 2020
1 parent f961873 commit 93b5c47
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion valinvest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import logging.config
from .config import logging_config
from .config import *
from .fundamentals import *
from .main import *
from .sentiments import *
from .storage import *
from .technicals import *

logging.config.dictConfig(logging_config)
14 changes: 14 additions & 0 deletions valinvest/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from .fundamentals import *
from .config import SP_500_TICKERS, NASDAQ_100_TICKERS

def get_tickers_scores(ticker_list=SP_500_TICKERS):
res = []
for ticker in ticker_list:
try:
score = get_scores(ticker).iloc[:,-5:].mean(axis=1).sum()
res.append([ticker, score])
print(ticker, score)
except Exception as e:
print(ticker, e)
return res

0 comments on commit 93b5c47

Please sign in to comment.