コード例 #1
0
#inputTxt='Anglo American price target raised to 3,670 GBp from 3,500 GBp at Morgan Stanley'
#inputTxt='GMS Inc. reports Q4 adjusted EPS $1.07, consensus 82c'
##inputTxt='CalAmp reports Q1 adjusted EPS 8c, consensus 7c'
##inputTxt='Adagene initiated with a Buy at China Renaissance'
inputTxt = 'Molecular Partners indicated to open at $20, IPO priced at $21.25'
#inputTxt='WalkMe indicated to open at $33.20, IPO priced at $31'
#inputTxt='Bassett Furniture reports Q2 EPS 60c, two est. 35c'
#inputTxt='Royal Caribbean reports Q2 adjusted EPS ($5.06), consensus ($4.40)'
#inputTxt='UroGen Pharma reports Q2 EPS ($1.17), consensus ($1.27)'
inputTxt = 'Alcoa call volume heavy and directionally bullish'
is_earnings = False
#inputTxt = 'Wynn Resorts price target raised to $125 from $120 at CBRE'
#inputTxt = 'IFF upgraded to Buy from Hold at Stifel'
#s.Parse(inputTxt,'Honest Company', 'HON', sid=sid, nlp=nlp, is_earnings=False)
#inputTxt='Bank of Hawaii reports Q4 EPS $1.55, consensus $1.35'
s.Parse(inputTxt, 'Bank of Hawaii', 'BOH', sid=sid, nlp=nlp, is_earnings=False)
#if len(s.PassEarnings())>0:
#    AnaSignal.GenerateSignal(s.ticker,'out_earnings_instructions.csv',s.PassEarnings())
#if len(s.PassPriceTarget())>0:
#    AnaSignal.GenerateSignal(s.ticker,'out_target_instructions.csv',s.PassPriceTarget())
#if s.PassUpgrade():
#    AnaSignal.GenerateSignal(s.ticker,'out_upgrade_instructions.csv')
if s.message != None and s.sentiment > 0 and s.message == 'options':
    AnaSignal.GenerateSignal(s.ticker, 'out_bull_instructions.csv')

#s.Sentiment(sid=sid,nlp=nlp,is_earnings=is_earnings)
print(s)

sys.exit(0)
import pytz
import datetime
コード例 #2
0
from keras.utils import plot_model 

api = ALPACA_REST()
inputTxt='Honest Company reports Q1 EPS (13c) vs. 1c last year'
inputTxt='Lennar reports Q2 adjusted EPS $2.95, consensus $2.36'
inputTxt='Cognyte reports Q1 EPS (20c), consensus (15c)'
inputTxt='Brookdale Senior Living resumed with a Buy at Stifel'
inputTxt='Anglo American price target raised to 3,670 GBp from 3,500 GBp at Morgan Stanley'
#inputTxt='GMS Inc. reports Q4 adjusted EPS $1.07, consensus 82c'
#inputTxt='CalAmp reports Q1 adjusted EPS 8c, consensus 7c'
#inputTxt='Adagene initiated with a Buy at China Renaissance'
#inputTxt='Molecular Partners indicated to open at $20, IPO priced at $21.25'
#inputTxt='WalkMe indicated to open at $33.20, IPO priced at $31'
inputTxt='Bassett Furniture reports Q2 EPS 60c, two est. 35c'

s.Parse(inputTxt,'Honest Company', 'HON', sid=sid, nlp=nlp, is_earnings=True)
#s.Sentiment(sid=sid,nlp=nlp,is_earnings=is_earnings)
print(s)

#sys.exit(0)
import pytz
import datetime
est = pytz.timezone('US/Eastern')

# add data for new fits
def AddData(t):
    
    t['slope']=0.0
    #t['slope'] = t.close.rolling(10).apply(tValLinR) 
    #t['slope_volume'] = t.volume.rolling(10).apply(tValLinR) 
    t['signif_volume'] = (t.volume-t.volume.mean())/t.volume.std()
コード例 #3
0
            "Alcoa upgraded to Buy from Hold at Deutsche Bank",
            'Peter Thiel reports 6.6% passive stake in Palantir',
            'Senvest Management reports 5.54% passive stake in GameStop',
            'Citron shorting Palantir, sees $20 stock by end of 2020',
            'Amazon.com assumed with an Outperform at Wolfe Research',
            'Alcoa initiated with a Sell at Goldman Sachs',
            'Palantir initiated with a Market Perform at William Blair',
            'Alcoa options imply 10.0% move in share price post-earnings',
            'GameStop believes it has sufficient liquidity to fund operations',
            'GameStop says \'Reboot\' is delivering lower costs, reduced debt',
            'Palantir, Rio Tinto sign multi-year enterprise partnership',
            'PG&E begins deployment of Palantir\'s Foundry Software',
            'Citi says sell Palantir on deceleration in growth, upcoming lockup expiry',
            'Pentagon cybersecurity project slowed by flaws, Bloomberg says',
            'Palantir awarded contract from Army worth up to $250M',
            'Palantir awarded $44.4M contract from FDA',
            'Fujitsu signs $8M contract as Palantir Foundry customer',
            'Army Vantage reaffirms Palantir partnership with $114M agreement',
            'Palantir provides update on partnership with Greece to support COVID-19 response',
            'Palantir receives Army prototype contract to support network modernization',
            'Soros takes stake in Palantir, exits TransDigm position',
            "AOC flags \'material risks\' to Palantir investors in SEC letter, TechCrunch says",
            "PetIQ \'a smart way\' to play pet care boom, Barron's says",
        ]
        for i in infos:
            print('')
            print(i)
            s = Sentiment()
            s.Parse(i, sid=sid, nlp=nlp)
            print(s)