Skip to content

ICT-FinD-Lab/EFSA

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EFSA

English | 简体中文

The PyTorch open source implementation for the ACL 2024 paper "EFSA: Towards Event-Level Financial Sentiment Analysis".

ACL Anthology link arXiv link PDF link DOI link

Please reach us via emails or via GitHub issues for any enquiries.

Citation

Please cite our work if you find it useful for your research and work.

@inproceedings{chen2024efsa,
  title={EFSA: Towards event-level financial sentiment analysis},
  author={Chen, Tianyu and Zhang, Yiming and Yu, Guoxin and Zhang, Dapeng and Zeng, Li and He, Qing and Ao, Xiang},
  booktitle={Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  pages={7455--7467},
  year={2024}
}

Abstract

In this paper, we extend financial sentiment analysis (FSA) to event-level since events usually serve as the subject of the sentiment in financial text. Though extracting events from the financial text may be conducive to accurate sentiment predictions, it has specialized challenges due to the lengthy and discontinuity of events in a financial text. To this end, we reconceptualize the event extraction as a classification task by designing a categorization comprising coarse-grained and fine-grained event categories. Under this setting, we formulate the Event-Level Financial Sentiment Analysis (EFSA for short) task that outputs quintuples consisting of (company, industry, coarse-grained event, fine-grained event, sentiment) from financial text. A large-scale Chinese dataset is publicized as a brand new testbed for our task. A four-hop Chain-of-Thought LLM-based approach is devised for this task. Systematic investigations are conducted on our dataset, and the empirical results demonstrate the benchmarking scores of existing methods and our proposed method can reach the current state-of-the-art.

Dataset

The bundled data/data.json file contains 12,160 news articles and 13,724 company-level event-sentiment annotations.

The correspondence between companies and industries can be found in knowledge/company2industry.xlsx.

4-hop CoT Framework

See code/direct_prompt.py and code/reasoning_prompt.py for details.

Requirements

Install the required dependencies before running the code:

pip install torch transformers

The prompt scripts currently call .half().cuda(), so running them as-is requires an NVIDIA GPU with CUDA. CPU-only execution requires changing the model loading code accordingly.

The prompt scripts load a local or Hugging Face-compatible model through transformers. Replace model-name in the scripts with the actual model path or model identifier before running. The selected model must provide a model.chat(tokenizer, prompt, history=...) interface; a generic AutoModel without this chat API is not sufficient.

Update

[2026-07-01] We updated the repository README with ACL Anthology metadata, citation information, and clearer dataset/code instructions.

[2024-08] EFSA was published in the Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%