Skip to main content

A Python library for sentiment analysis of various tickers from the latest news from trusted sources and tools to plot results.

Project description

Stocksent

logo

Stocksent is a Python library for sentiment analysis of various tickers from the latest news from trusted sources. It also has options for plotting results.

Installation

Use the package manager pip to install stocksent.

pip install stocksent


Usage


Get Sentiment of single stock

from stocksent import StockSent
stock = StockSent('AAPL')
sentiment_score = stock.get_sentiment()
print(sentiment_score)  # Returns a float with the sentiment score.
0.189

Get Sentiment of multiple stocks

from stocksent import StockSent
stocks = StockSent(['AAPL','TSLA','GOOG'])
sentiment_score = stocks.get_sentiment(days=4) # Get the sentiment for the past 4 days.
print(sentiment_score)  # Returns a float with the sentiment score.
0.237

Get plot of sentiment scores

from stocksent import StockSent
stocks = StockSent(['AAPL','TSLA','GOOG'])
sentiment_score = stocks.plot()
plot

Get word cloud of headlines

from stocksent import StockSent
stocks = StockSent(['AAPL','AMZN','GOOG','TSLA'])
sentiment_score = stocks.word_cloud(days=5) #Create a word cloud from news from the past 5 days.
word cloud

Contributing

Pull requests are welcome on GitHub !


License

Mozilla Public License Version 2.0


Author

Arya Manjaramkar

   

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stocksent-0.1.5.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

stocksent-0.1.5-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file stocksent-0.1.5.tar.gz.

File metadata

  • Download URL: stocksent-0.1.5.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.8

File hashes

Hashes for stocksent-0.1.5.tar.gz
Algorithm Hash digest
SHA256 15d03ffa5d861e6baf1c77b4bf801ea1aed2a289762fed6d8b35ca0f29be5b29
MD5 dc66c6a008437621deecf6ecd5353a4f
BLAKE2b-256 0c392c4d47b5dd2994dd2ff88a6b6bf505a901b0105610a78dc28066b66f34aa

See more details on using hashes here.

File details

Details for the file stocksent-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: stocksent-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.8

File hashes

Hashes for stocksent-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5d5d003342ad22d13e80e558cdd7630967646256ee471b1ddfcba54fd14aae1c
MD5 54ca9d0e56249be815e59b708e99f35b
BLAKE2b-256 8d9234d20c005e663eba8a9e29d4d32cd5390b57ff393152d53a8b145eb5795d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page