Views
No views yet
ZiweiChen/FinBERT-FOMC on FOMC_sentences_expanded_zeroshot_labeled.xlsx.ZiweiChen/FinBERT-FOMCall283773123Negative (0)Neutral (1)Positive (2)text = modetext_pair = FOMC sentencemode values:growthemploymentinflation1from transformers import BertForSequenceClassification, BertTokenizer, pipeline
2
3model_id = "Wonseong/FinBERT-FOMC-aspects"
4tokenizer = BertTokenizer.from_pretrained(model_id)
5model = BertForSequenceClassification.from_pretrained(model_id)
6clf = pipeline("text-classification", model=model, tokenizer=tokenizer)
7
8sentence = "Spending on cars and light trucks increased somewhat in July."
9mode = "growth" # growth | employment | inflation
10
11result = clf({"text": mode, "text_pair": sentence})
12print(result)1from predict_aspect import FinBERTFOMCModeClassifier
2
3clf = FinBERTFOMCModeClassifier("Wonseong/FinBERT-FOMC-aspects")
4print(clf.predict("Spending on cars and light trucks increased somewhat in July.", mode="growth"))0.87896253602305470.57313722372055050.79806148744051570.77085342133830980.83219414983028320.13992955491514570.17771373679154668.090511260540080.93488888888888890.89772823499784990.86210192676179390.94246423368529360.068476190476190480.075206349206349213.6275132275132274expanded_10500:sentencegrowth_sentiment_finalemployment_sentiment_finalinflation_sentiment_finalnegative, neutral, and positive.FOMC_sentences_expanded_zeroshot_labeled.xlsx contains sentence-level labels for the expanded_10500 sheet. These aspect labels were generated through zero-shot annotation with oss-20b using the prompt template stored in zeroshot_fomc_sentiment_prompt.txt.growth_sentiment_finalemployment_sentiment_finalinflation_sentiment_finalpositiveneutralnegativemode and the sentence through text_pair.Negative, Neutral, Positive.Tesla T4truetruefalsetraining_metadata.jsonmetric_history.csvmae_mse_curve.png1@article{kim2023analyzing,
2 title={Analyzing FOMC minutes: Accuracy and constraints of language models},
3 author={Kim, Wonseong and Sp{\~A}{\c{k}}rer, Jan Frederic and Handschuh, Siegfried},
4 journal={arXiv preprint arXiv:2304.10164},
5 year={2023}
6}
7
8@inproceedings{kim2024small,
9 author = {Kim, W. and Sporer, J. and Lee, C. L. and Handschuh, S.},
10 title = {Is small really beautiful for central Bank communication? Evaluating language models for finance: Llama-3-70B, GPT-4, FinBERT-FOMC, FinBERT, and VADER},
11 booktitle = {Proceedings of the 5th ACM International Conference on AI in Finance},
12 pages = {626--633},
13 year = {2024}
14}