Git Product home page Git Product logo

stockeye's Introduction

                PyPI version Build Status Dependencies GitHub Issues Contributions welcome License

Install

pip install stockeye

Download Corpus

stockeye-corpus
or
python -m nltk.downloader stopwords
python -m nltk.downloader punkt

Code Examples

Watch News

from stockeye import watch

# This gives your script access to your gmail account, may want to use a throwaway
# Make sure "Allow Access To Less Secure Apps" is turned on in gmail settings
# If using a throwaway, adjust email_to to your real email!

email_self = '[email protected]'
email_password = 'yourpassword'    
email_from = email_self     
email_to = email_self
credentials = [email_self, email_password, email_from, email_to]


# Stocks to monitor (add up to 100 with each run)

ticks = ['MSFT', 'PFE', 'BOX', 'MNST', 'LLY', 'AAPL',
         'BBY', 'TSLA', 'WFG', 'AMZN', 'JNJ', 'NFLX', 
         'BIIB', 'GE', 'GILD', 'SHAK', 'VRTX', 'CMG']


# Properties included in statistics report (see below for more)

properties = ['Open',
              'DaysLow', 
              'DaysHigh', 
              'Ask', 
              'PercentChange', 
              'Volume', 
              'ShortRatio', 
              'DividendYield', 
              'PERatio']


threshold = 3      # Number of recent articles published before an email is sent (default = 3)
hourspast = 18     # Define....recent (default = 18)
sentences = 3      # Length of summary generated for each article (deafult = 3)
firstlast = False  # Include first/last sentence of the artice in its summary (default = False)


watch(credentials, ticks, properties, threshold, hourspast, sentences, firstlast)
This run will take approximately 9 minutes
Finding news for MSFT
Finding news for PFE
Finding news for BOX
Finding news for MNST
Finding news for LLY
Finding news for AAPL
Finding news for BBY
Finding news for TSLA
Finding news for WFG
Finding news for AMZN
Finding news for JNJ
Finding news for NFLX
Finding news for BIIB
Finding news for GE
Finding news for GILD
Finding news for SHAK
Finding news for VRTX
Finding news for CMG

Email Example

More Properties

- AfterHoursChangeRealtime                       - HoldingsValueRealtime                                
- AnnualizedGain                                 - LastTradeDate                                        
- Ask                                            - LastTradePriceOnly                                   
- AskRealtime                                    - LastTradeRealtimeWithTime                            
- AverageDailyVolume                             - LastTradeTime                                        
- Bid                                            - LastTradeWithTime                                    
- BidRealtime                                    - LowLimit                                             
- BookValue                                      - MarketCapRealtime                                    
- Change                                         - MarketCapitalization                                 
- ChangeFromFiftydayMovingAverage                - MoreInfo                                             
- ChangeFromTwoHundreddayMovingAverage           - Name                                                 
- ChangeFromYearHigh                             - Notes                                                
- ChangeFromYearLow                              - OneyrTargetPrice                                     
- ChangePercentRealtime                          - Open                                                 
- ChangeRealtime                                 - OrderBookRealtime                                    
- ChangeinPercent                                - PEGRatio                                             
- Commission                                     - PERatio                                              
- Currency                                       - PERatioRealtime                                      
- DaysHigh                                       - PercentChangeFromYearHigh                            
- DaysLow                                        - PercentChange                                        
- DaysRange                                      - PercentChangeFromFiftydayMovingAverage               
- DaysRangeRealtime                              - PercentChangeFromTwoHundreddayMovingAverage          
- DaysValueChange                                - PercentChangeFromYearLow                             
- DaysValueChangeRealtime                        - PreviousClose                                        
- DividendPayDate                                - PriceBook                                            
- DividendShare                                  - PriceEPSEstimateCurrentYear                          
- DividendYield                                  - PriceEPSEstimateNextYear                             
- EBITDA                                         - PricePaid                                            
- EPSEstimateCurrentYear                         - PriceSales                                           
- EPSEstimateNextQuarter                         - SharesOwned                                          
- EPSEstimateNextYear                            - ShortRatio                                           
- EarningsShare                                  - StockExchange                                        
- ExDividendDate                                 - Symbol                                               
- FiftydayMovingAverage                          - TickerTrend                                          
- HighLimit                                      - TradeDate                                            
- HoldingsGain                                   - TwoHundreddayMovingAverage                           
- HoldingsGainPercent                            - Volume                                               
- HoldingsGainPercentRealtime                    - YearHigh                                             
- HoldingsGainRealtime                           - YearLow                                              
- HoldingsValue                                  - YearRange  

stockeye's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.