File size: 3,815 Bytes
8812ade
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d197b31
 
8812ade
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
license: mit
tags:
  - nifty
  - stock-movement
  - news-and-events
  - RLMF
task_categories:
  - multiple-choice
  - time-series-forecasting
  - document-question-answering
task_ids:
  - topic-classification
  - semantic-similarity-classification
  - multiple-choice-qa
  - univariate-time-series-forecasting
  - document-question-answering
language:
  - en
pretty_name: nifty-rl
size_categories:
  - 1K<n<100k
configs:
- config_name: nifty-rl
  data_files:
    - split: train
      path: "train.jsonl"
    - split: test
      path: "test.jsonl"
    - split: valid
      path: "valid.jsonl"
  default: true
  
---

<h1>
  <img alt="RH" src="./nifty-icon.png" style="display:inline-block; vertical-align:middle; width:120px; height:120px; object-fit:contain" />
    The News-Informed Financial Trend Yield (NIFTY) Dataset. 
</h1>

The News-Informed Financial Trend Yield (NIFTY) Dataset. Details of the dataset, including data procurement and filtering can be found in the paper here: https://arxiv.org/abs/2405.09747.


## πŸ“‹ Table of Contents

- [🧩 NIFTY Dataset](#nifty-dataset)
  - [πŸ“‹ Table of Contents](#table-of-contents)
  - [πŸ“– Usage](#usage)
    - [Downloading the dataset](#downloading-the-dataset)
    - [Dataset structure](#dataset-structure)
  - [Large Language Models](#large-language-models) 
  - [✍️ Contributing](#contributing)
  - [πŸ“ Citing](#citing)
  - [πŸ™ Acknowledgements](#acknowledgements)

## πŸ“– [Usage](#usage)

Downloading and using this dataset should be straight-forward following the Huggingface datasets framework. 

### [Downloading the dataset](#downloading-the-dataset)

The NIFTY dataset is available on huggingface [here](https://huggingface.co/datasets/raeidsaqur/NIFTY) and can be downloaded with the following python snipped:

```python

from datasets import load_dataset

# If the dataset is gated/private, make sure you have run huggingface-cli login
dataset = load_dataset("raeidsaqur/nifty-rl")

```

### [Dataset structure](#dataset-structure)

The dataset is split into 3 partition, train, valid and test and each partition is a jsonl file where a single row has the following keys.

```python
['prompt', 'chosen', 'rejected', 'chosen_label', 'chosen_value']
```

Currently, the dataset has 2111 examples in total, the dates randing from 2010-01-06 to 2020-09-21. 
<!-- The number of examples for each split is given below.
| Split | Num Examples | Date range |
|-------|--------------|------------|
|Train |1477 |2010-01-06 - 2017-06-27 |
|Valid|317 | 2017-06-28- 2019-02-12|
|Test |317|2019-02-13 - 2020-09-21|
 -->
<!--
<img alt="St" src="./imgs/visualize_nifty_1794_2019-02-13.png" 
  style="display:inline-block; vertical-align:middle; width:640px; 
  height:640px; object-fit:contain" />

-->

 

## ✍️  [Contributing](#contributing)

We welcome contributions to this repository (noticed a typo? a bug?). To propose a change:

```
git clone https://huggingface.co/datasets/raeidsaqur/nifty-rl
cd nifty-rl
git checkout -b my-branch
pip install -r requirements.txt
pip install -e .
```

Once your changes are made, make sure to lint and format the code (addressing any warnings or errors):

```
isort .
black .
flake8 .
``` 

Then, submit your change as a pull request. 

## πŸ“  [Citing](#citing)

If you use the NIFTY Financial dataset in your work, please consider citing our paper:

```
@article{raeidsaqur2024NiftyRL,
    title        = {NIFTY-RL: Financial News Headlines Dataset for LLM Alignment using Reinforcement Learning.},
    author       = {Raeid Saqur},
    year         = 2024,
    journal      = {ArXiv},
    url          = {https://arxiv.org/abs/2024.5599314}
}
```

## πŸ™ [Acknowledgements](#acknowledgements)

The authors acknowledge and thank the generous computing provided by the Vector Institute, Toronto.