# mood
Investigations in financial sentiment analysis
To install: ```pip install mood```
Note: Requires an OpenAI API Token.
[How can to get one of those?](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key)
# Examples
## current headlines and their sentiment scores
```python
>>> from mood import headlines_mood
>>> headlines_mood()
{"Yaccarino shakes up X amid Musk's pressure on costs, FT says": -3,
'Coup-hit Niger was betting on a China-backed oil pipeline as a lifeline. Then the troubles began': -7,
'A Mexico City neighborhood keeps the iconic Volkswagen Beetle alive': 1,
'Bitter political fight in Bolivia is paralyzing the government as unrest boils over economic crisis': -8,
'Credit’s Strong Run Stumbles for First Time This Year': -4,
'Former Stark Chairman in Thai Detention After Months on the Run': -5,
'2 Millionaire-Maker Technology Stocks': 5,
'Want to Earn More in the Stock Market With Less Effort? Try This Simple Strategy': 4,
'3 Reasons to Buy Nvidia Stock Before June 26': 7,
"Cathie Wood Says Software Is the Next Big AI Opportunity -- 2 Super Stocks You'll Wish You'd Bought Today if She's Right": 8,
'Companies that give money to Democrats are beating Republican donors in the stock market': 2,
'Is Buying Stocks When the S&P 500 Hits a New All-Time High a Smart Strategy? History Provides a Clear Answer.': 2,
'Q1 Design Software Earnings: Unity (NYSE:U) Earns Top Marks': 4,
'Social Networking Q1 Earnings: Snap (NYSE:SNAP) Simply the Best': 6,
"A Look Back at Footwear Stocks' Q1 Earnings: Steven Madden (NASDAQ:SHOO) Vs The Rest Of The Pack": -1,
"A Look Back at Heavy Machinery Stocks' Q1 Earnings: Oshkosh (NYSE:OSK) Vs The Rest Of The Pack": -1,
'Unpacking Q1 Earnings: Keurig Dr Pepper (NASDAQ:KDP) In The Context Of Other Beverages and Alcohol Stocks': -2,
'Q1 Earnings Outperformers: Agilysys (NASDAQ:AGYS) And The Rest Of The Vertical Software Stocks': 3,
'What do homebuilders want? Immigration reform': 0,
'Examining the steep rise in monthly auto loan payments': -2,
'Cannes Lions 2024: What marketers are saying': 1,
"Sports has to feed into a streamer's 'ecosystem': Kevin Mayer": 0,
'Taylor Swift vs. Central Banks: One Swiftie calls ‘BS’': -2,
"'There are bargains out there' as summer travel season heats up": 3,
'This week in Bidenomics: Pile on the debt': -3,
'Netflix flirts with all-time highs as investors cheer ad momentum, foray into live sports': 8,
'Existing home sales decline in May as home prices reach record high': -4,
"Regulators find weakness in 'living wills' from BofA, Citi, Goldman, and JPM": -6,
'How to watch and listen to Yahoo Finance': 0,
"Why Nvidia's 'gravy train' could come to 'screeching halt' after a volatile trading week": -7,
'Trump’s campaign now has a cash advantage over Biden': 1,
'The Anti-Altman’s Hail Mary Pitch to Investors': -3,
"Tesla's Autonomous Strategy to be Key to EV Maker Reaching $1 Trillion-Plus Valuation, Wedbush Says": 7,
'Alaska Airlines, Flight Attendants Union Reach Tentative Deal': 6,
'China’s 618 online shopping event marks first-ever sales drop': -7,
'Apple Throws Down the Gauntlet to European Regulators': -3,
'Apple’s AI Features Won’t Be Offered in European Union Because of New Laws': -5,
'Equity Markets Mostly Lower as Existing Home Sales Drop': -4,
'Oil Rig Count Falls by Three This Week, Baker Hughes Says': -2,
'Dubai Real Estate’s Resilience May Signal End of Boom-Bust Cycle': 5,
'Montana aims to remind seniors about its ‘reverse annuity mortgage’': 0,
'Desmarais-Backed Mortgage Firm Nesto Acquires Lender CMLS': 3,
'Record high prices, rising mortgage rates depress US home sales': -8,
'US home sales fall for the 3rd straight month in May amid rising mortgage rates, record-high prices': -8,
"On wealthy Martha's Vineyard, costly housing is forcing workers out and threatening public safety": -7,
"Mortgage rates decline for third consecutive week — 'bodes well for the housing market'": 4,
'Congress should adopt mortgage interest tax credit: CHLA': 3,
'Savings interest rates today, June 22, 2024 (best account provides 5.30% APY)': 4,
'How to pay off your house faster with biweekly mortgage payments': 5,
'The best credit cards for vacations for June 2024': 5,
"Climate change makes India's monsoons erratic. Can farmers still find a way to prosper?": -2,
'CDK Hackers Want Millions in Ransom to End Car Dealership Outage': -7,
'S&P 500 Trading Volume Spikes at Wall Street Close: Markets Wrap': 0,
'Bitcoin Could Hit $500,000 by October 2025, According to This Billionaire Investor': 7,
'This Is Why Altcoin Investors Struggle Despite Bitcoin, Ether Sitting Near Yearly Highs': -3,
'BitoGroup partners with Far Eastern International Bank to launch first crypto-friendly bank account': 2,
'Cathie Wood sells $13 million of a struggling tech stock': -6,
'Nvidia Stock Gets Hit With Bearish Reversal. If You Have Big Profits, This Is What You Should Do.': -5,
"Single Mom With $1.3 Million From Divorce Can't Afford $8,000 Monthly Rent, Dave Ramsey Says It's Time To Move": -6,
'Morningstar | A Weekly Summary of Stock Ideas and Developments in the Companies We Cover': 0,
'5 Little-Known Perks of a Costco Membership': 4,
'Billionaire David Tepper Goes Bargain Hunting: 6 Stocks He Just Bought': 5,
'Palantir Inks Deal With Starlab. Is the Stock Ready to Head to the Stars?': 6,
"Here's the Average Social Security Benefit at Age 62 -- and Why It's Not the Best News for Retirees": -5,
'Analyst Report: Mitsubishi UFJ Financial Group, Inc.': 0,
'Forget NextEra Energy. Buy This Magnificent Dividend King Instead': 6}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/infinvest/mood",
"name": "mood",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "finance, trading, sentiment analysis, web scraping, nlp, text analysis",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/5c/55/01494e939316712aa5be5348630d40851f66eb3ec76651955dd7a592e83e/mood-0.0.4.tar.gz",
"platform": "any",
"description": "# mood\n\nInvestigations in financial sentiment analysis\n\nTo install:\t```pip install mood```\n\nNote: Requires an OpenAI API Token. \n[How can to get one of those?](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key)\n\n\n# Examples\n\n\n## current headlines and their sentiment scores\n\n\n```python\n\n>>> from mood import headlines_mood\n>>> headlines_mood()\n{\"Yaccarino shakes up X amid Musk's pressure on costs, FT says\": -3,\n 'Coup-hit Niger was betting on a China-backed oil pipeline as a lifeline. Then the troubles began': -7,\n 'A Mexico City neighborhood keeps the iconic Volkswagen Beetle alive': 1,\n 'Bitter political fight in Bolivia is paralyzing the government as unrest boils over economic crisis': -8,\n 'Credit\u2019s Strong Run Stumbles for First Time This Year': -4,\n 'Former Stark Chairman in Thai Detention After Months on the Run': -5,\n '2 Millionaire-Maker Technology Stocks': 5,\n 'Want to Earn More in the Stock Market With Less Effort? Try This Simple Strategy': 4,\n '3 Reasons to Buy Nvidia Stock Before June 26': 7,\n \"Cathie Wood Says Software Is the Next Big AI Opportunity -- 2 Super Stocks You'll Wish You'd Bought Today if She's Right\": 8,\n 'Companies that give money to Democrats are beating Republican donors in the stock market': 2,\n 'Is Buying Stocks When the S&P 500 Hits a New All-Time High a Smart Strategy? History Provides a Clear Answer.': 2,\n 'Q1 Design Software Earnings: Unity (NYSE:U) Earns Top Marks': 4,\n 'Social Networking Q1 Earnings: Snap (NYSE:SNAP) Simply the Best': 6,\n \"A Look Back at Footwear Stocks' Q1 Earnings: Steven Madden (NASDAQ:SHOO) Vs The Rest Of The Pack\": -1,\n \"A Look Back at Heavy Machinery Stocks' Q1 Earnings: Oshkosh (NYSE:OSK) Vs The Rest Of The Pack\": -1,\n 'Unpacking Q1 Earnings: Keurig Dr Pepper (NASDAQ:KDP) In The Context Of Other Beverages and Alcohol Stocks': -2,\n 'Q1 Earnings Outperformers: Agilysys (NASDAQ:AGYS) And The Rest Of The Vertical Software Stocks': 3,\n 'What do homebuilders want? Immigration reform': 0,\n 'Examining the steep rise in monthly auto loan payments': -2,\n 'Cannes Lions 2024: What marketers are saying': 1,\n \"Sports has to feed into a streamer's 'ecosystem': Kevin Mayer\": 0,\n 'Taylor Swift vs. Central Banks: One Swiftie calls \u2018BS\u2019': -2,\n \"'There are bargains out there' as summer travel season heats up\": 3,\n 'This week in Bidenomics: Pile on the debt': -3,\n 'Netflix flirts with all-time highs as investors cheer ad momentum, foray into live sports': 8,\n 'Existing home sales decline in May as home prices reach record high': -4,\n \"Regulators find weakness in 'living wills' from BofA, Citi, Goldman, and JPM\": -6,\n 'How to watch and listen to Yahoo Finance': 0,\n \"Why Nvidia's 'gravy train' could come to 'screeching halt' after a volatile trading week\": -7,\n 'Trump\u2019s campaign now has a cash advantage over Biden': 1,\n 'The Anti-Altman\u2019s Hail Mary Pitch to Investors': -3,\n \"Tesla's Autonomous Strategy to be Key to EV Maker Reaching $1 Trillion-Plus Valuation, Wedbush Says\": 7,\n 'Alaska Airlines, Flight Attendants Union Reach Tentative Deal': 6,\n 'China\u2019s 618 online shopping event marks first-ever sales drop': -7,\n 'Apple Throws Down the Gauntlet to European Regulators': -3,\n 'Apple\u2019s AI Features Won\u2019t Be Offered in European Union Because of New Laws': -5,\n 'Equity Markets Mostly Lower as Existing Home Sales Drop': -4,\n 'Oil Rig Count Falls by Three This Week, Baker Hughes Says': -2,\n 'Dubai Real Estate\u2019s Resilience May Signal End of Boom-Bust Cycle': 5,\n 'Montana aims to remind seniors about its \u2018reverse annuity mortgage\u2019': 0,\n 'Desmarais-Backed Mortgage Firm Nesto Acquires Lender CMLS': 3,\n 'Record high prices, rising mortgage rates depress US home sales': -8,\n 'US home sales fall for the 3rd straight month in May amid rising mortgage rates, record-high prices': -8,\n \"On wealthy Martha's Vineyard, costly housing is forcing workers out and threatening public safety\": -7,\n \"Mortgage rates decline for third consecutive week \u2014 'bodes well for the housing market'\": 4,\n 'Congress should adopt mortgage interest tax credit: CHLA': 3,\n 'Savings interest rates today, June 22, 2024 (best account provides 5.30% APY)': 4,\n 'How to pay off your house faster with biweekly mortgage payments': 5,\n 'The best credit cards for vacations for June 2024': 5,\n \"Climate change makes India's monsoons erratic. Can farmers still find a way to prosper?\": -2,\n 'CDK Hackers Want Millions in Ransom to End Car Dealership Outage': -7,\n 'S&P 500 Trading Volume Spikes at Wall Street Close: Markets Wrap': 0,\n 'Bitcoin Could Hit $500,000 by October 2025, According to This Billionaire Investor': 7,\n 'This Is Why Altcoin Investors Struggle Despite Bitcoin, Ether Sitting Near Yearly Highs': -3,\n 'BitoGroup partners with Far Eastern International Bank to launch first crypto-friendly bank account': 2,\n 'Cathie Wood sells $13 million of a struggling tech stock': -6,\n 'Nvidia Stock Gets Hit With Bearish Reversal. If You Have Big Profits, This Is What You Should Do.': -5,\n \"Single Mom With $1.3 Million From Divorce Can't Afford $8,000 Monthly Rent, Dave Ramsey Says It's Time To Move\": -6,\n 'Morningstar | A Weekly Summary of Stock Ideas and Developments in the Companies We Cover': 0,\n '5 Little-Known Perks of a Costco Membership': 4,\n 'Billionaire David Tepper Goes Bargain Hunting: 6 Stocks He Just Bought': 5,\n 'Palantir Inks Deal With Starlab. Is the Stock Ready to Head to the Stars?': 6,\n \"Here's the Average Social Security Benefit at Age 62 -- and Why It's Not the Best News for Retirees\": -5,\n 'Analyst Report: Mitsubishi UFJ Financial Group, Inc.': 0,\n 'Forget NextEra Energy. Buy This Magnificent Dividend King Instead': 6}\n```\n\n",
"bugtrack_url": null,
"license": "mit",
"summary": null,
"version": "0.0.4",
"project_urls": {
"Homepage": "https://github.com/infinvest/mood"
},
"split_keywords": [
"finance",
" trading",
" sentiment analysis",
" web scraping",
" nlp",
" text analysis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fbbdc4bb3c75f853508484ccf7073d3a4f353d2d007e14c7f39f1eb186603c9f",
"md5": "05ace54f8ef83ae16557ea22a042b2c1",
"sha256": "303c4a56b105b184795e9dbe14c41f5fb62beafeaa85c7a36a2e66c80bd2358c"
},
"downloads": -1,
"filename": "mood-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "05ace54f8ef83ae16557ea22a042b2c1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7064,
"upload_time": "2024-06-23T06:19:49",
"upload_time_iso_8601": "2024-06-23T06:19:49.485929Z",
"url": "https://files.pythonhosted.org/packages/fb/bd/c4bb3c75f853508484ccf7073d3a4f353d2d007e14c7f39f1eb186603c9f/mood-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5c5501494e939316712aa5be5348630d40851f66eb3ec76651955dd7a592e83e",
"md5": "72abdb48ce3c119f8bc5f4cbcd5c72e1",
"sha256": "18bf8c5c9c151763e68d8919fe38c2967322d94b4ff80ff25a0afbe1ecbcd685"
},
"downloads": -1,
"filename": "mood-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "72abdb48ce3c119f8bc5f4cbcd5c72e1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6509,
"upload_time": "2024-06-23T06:19:50",
"upload_time_iso_8601": "2024-06-23T06:19:50.778416Z",
"url": "https://files.pythonhosted.org/packages/5c/55/01494e939316712aa5be5348630d40851f66eb3ec76651955dd7a592e83e/mood-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-23 06:19:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "infinvest",
"github_project": "mood",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mood"
}