=======================================================================================================================
  HEADLINE SENTIMENT
  Didactic Python code · Kardex Tauro · kardex-tauro.muisca.co
=======================================================================================================================
NOTICE: educational material. It is not a recommendation to buy or to sell.
The sample headlines and prices are INVENTED; historical data is quoted only for practice.
A past result guarantees nothing: ask a licensed professional.
-----------------------------------------------------------------------------------------------------------------------
Headlines read: 30
The 30 headlines in datos/headlines.csv are INVENTED for practice: they are not real news.
Positive words (20): rises, record, optimism, solid, boosts, recovers, grows, gain, gains, better, confidence, improves, approves, soars, rebound, opportunity, buying, best, highs, accelerates
Negative words (20): falls, fear, fears, crisis, recession, risk, concern, uncertainty, drop, slump, plunge, losses, weak, weakens, warning, fine, panic, lows, cut, sanction
Our own lexicon: two hand-written lists (no artificial intelligence), but it fails on irony and on the words that are not in the list.

-----------------------------------------------------------------------------------------------------------------------
Date        Headline                                                    Pos  Neg    Score    Lexicon     Manual   Match
-----------------------------------------------------------------------------------------------------------------------
2026-04-06  The index rises sharply and marks a new record close          2    0     1.00   POSITIVE   positivo     YES
2026-04-09  The price falls on fear of a rate hike                        0    2    -1.00   NEGATIVE   negativo     YES
2026-04-13  Analysts see optimism after the jobs data                     1    0     1.00   POSITIVE   positivo     YES
2026-04-16  The price drops and touches monthly lows                      0    1    -1.00   NEGATIVE   negativo     YES
2026-04-20  Solid demand boosts buying across the sector                  3    0     1.00   POSITIVE   positivo     YES
2026-04-23  Uncertainty in the market ahead of the policy meeting         0    1    -1.00   NEGATIVE   negativo     YES
2026-04-27  The stock recovers and rises after earnings                   2    0     1.00   POSITIVE   positivo     YES
2026-04-30  Concern over the risk of a recession in the region            0    3    -1.00   NEGATIVE   negativo     YES
2026-05-04  The value grows with a quarterly gain better than expected    3    0     1.00   POSITIVE   positivo     YES
2026-05-07  Sharp drop in oil and a slump in energy shares                0    2    -1.00   NEGATIVE   negativo     YES
2026-05-11  Consumer confidence improves for a third month                2    0     1.00   POSITIVE   positivo     YES
2026-05-14  Fears of a crisis drive heavy selling                         0    2    -1.00   NEGATIVE   negativo     YES
2026-05-18  The central bank keeps rates unchanged and the market d...    0    0     0.00    NEUTRAL     neutro     YES
2026-05-21  Strong rebound: the market posts its best week of the year    2    0     1.00   POSITIVE   positivo     YES
2026-05-25  Widespread losses: the index erases the month's gains         1    1     0.00    NEUTRAL   negativo      NO
2026-05-28  The company raises its guidance and buying accelerates        2    0     1.00   POSITIVE   positivo     YES
2026-06-01  A fund is under investigation for alleged insider trading     0    0     0.00    NEUTRAL   negativo      NO
2026-06-04  Record highs in the technology sector                         2    0     1.00   POSITIVE   positivo     YES
2026-06-08  The bitcoin plunge drags the rest of the market down          0    1    -1.00   NEGATIVE   negativo     YES
2026-06-11  Mixed data: the economy grows but demand stays weak           1    1     0.00    NEUTRAL     neutro     YES
2026-06-15  The local currency weakens and country risk rises             1    2    -0.33   NEGATIVE   negativo     YES
2026-06-18  Moderate optimism: industry rises and confidence recovers     4    0     1.00   POSITIVE   positivo     YES
2026-06-22  Warning over a record fine for the largest platform in ...    1    2    -0.33   NEGATIVE   negativo     YES
2026-06-25  The price falls but analysts see a buying opportunity         2    1     0.33   POSITIVE     neutro      NO
2026-06-29  The company approves a solid buyback plan and the stock...    3    0     1.00   POSITIVE   positivo     YES
2026-07-02  The market opens flat ahead of the inflation data             0    0     0.00    NEUTRAL     neutro     YES
2026-07-06  Unexpected gain in the quarter and the price soars            2    0     1.00   POSITIVE   positivo     YES
2026-07-09  Seller panic: the fall breaks the March lows                  0    2    -1.00   NEGATIVE   negativo     YES
2026-07-13  Demand grows and the industrial sector recovers highs         3    0     1.00   POSITIVE   positivo     YES
2026-07-16  Growth forecast cut and fear grows among investors            1    2    -0.33   NEGATIVE   negativo     YES
-----------------------------------------------------------------------------------------------------------------------

=======================================================================================================================
SUMMARY
=======================================================================================================================
Hits (the lexicon matches the manual label): 27
Misses: 3
Hit rate: 90.00 %
hits + misses = headlines read (30): TIES
a headline with no lexicon words scores 0.00: TIES
  Probe headline: The market opens unchanged and the index stays stable -> 0.00

THE 3 MOST POSITIVE HEADLINES
  2026-04-06    1.00  The index rises sharply and marks a new record close
  2026-04-13    1.00  Analysts see optimism after the jobs data
  2026-04-20    1.00  Solid demand boosts buying across the sector
THE 3 MOST NEGATIVE HEADLINES
  2026-07-09   -1.00  Seller panic: the fall breaks the March lows
  2026-06-08   -1.00  The bitcoin plunge drags the rest of the market down
  2026-05-14   -1.00  Fears of a crisis drive heavy selling

=======================================================================================================================
WHERE THE LEXICON FAILS (ON PURPOSE)
=======================================================================================================================
This lexicon is NOT artificial intelligence: it is two hand-written word lists.
It fails on IRONY: the same adjective can sound positive inside a headline that is
actually bad, and it also fails on the words that are not in the list.
The workshop left 3 trap headlines on purpose so that the failure shows:
Headlines where the lexicon and the manual label disagree: 3
  2026-05-25  manual label negativo / lexicon says NEUTRAL  Widespread losses: the index erases the month's g...
  2026-06-01  manual label negativo / lexicon says NEUTRAL  A fund is under investigation for alleged insider...
  2026-06-25  manual label neutro / lexicon says POSITIVE  The price falls but analysts see a buying opportu...

File written: salida/sentimiento.csv
-----------------------------------------------------------------------------------------------------------------------
NOTICE: educational material. It is not a recommendation to buy or to sell.
The sample headlines and prices are INVENTED; historical data is quoted only for practice.
A past result guarantees nothing: ask a licensed professional.
