minicpm5-gguf-stock-analyst
收藏资源简介:
# Stock Analyst Financial Trading Signals Dataset A specialized dataset for fine-tuning Large Language Models (LLMs) to act as quantitative financial analysts. This dataset contains structured technical indicator data for stocks paired with their resulting directional trading signals (**BUY**, **SELL**, **HOLD**). It is formatted specifically for Direct Preference Optimization (DPO) and Supervised Fine-Tuning (SFT), utilizing a hard-negative rejection strategy to force the model to learn fine-grained decision boundaries. --- ## Dataset Structure The dataset is provided in `.jsonl` format. Each line is a JSON object containing a `text` field, which contains the full prompt and target response. ### Example Entry ```json { "text": "<|im_start|>system\nYou are a financial analyst. Output ONLY ONE WORD: BUY, SELL, or HOLD.<|im_end|>\n<|im_start|>user\nAnalyze AMZN as of 2019-11-12 and predict the stock direction.\nPrice history: $88.37 -> $89.37 -> $89.28 -> $88.11 -> $88.90\nCurrent price: $88.90\nTechnical indicators:\n- RSI(14): 55.1\n- Volume Multiplier: 0.69x\n- Volatility Multiplier: 0.88x<|im_end|>\n<|im_start|>assistant\nBUY<|im_end|>" } ``` ### Features Included The prompts contain the following technical data injected programmatically: - **Ticker Symbol** and **Date** - **5-Day Price History** - **Current Price** - **RSI(14)** (Relative Strength Index) - **Volume Multiplier** (relative to 20-day moving average) - **Volatility Multiplier** (relative to 20-day moving average) --- ## Dataset Creation and Curation ### Data Leakage Prevention To ensure robust evaluation, this dataset underwent a strict **ticker-level leakage audit**. Stocks appearing in the `validation` split do not appear in the `train` split. If overlap exceeded 30% during generation, a deterministic ticker-hash-based splitting strategy was enforced to guarantee absolute separation. ### Class Balancing Financial data is often heavily skewed. This dataset has been class-balanced to ensure an equal distribution of `BUY`, `SELL`, and `HOLD` signals during the training phase, preventing the model from collapsing into a majority-class prediction. ### Hard-Negative Generation for DPO For preference optimization pipelines, negative examples are generated using a hard-confusable strategy rather than trivial opposites: - `BUY` is paired against `HOLD` - `SELL` is paired against `HOLD` - `HOLD` is paired against `BUY` This forces the model to learn the subtle boundaries of market momentum rather than obvious extremes. --- ## Usage You can load this dataset directly using the Hugging Face `datasets` library: ```python from datasets import load_dataset # Load the entire dataset dataset = load_dataset("ewinregirgojr/minicpm5-gguf-stock-analyst") # Access train and validation splits train_data = dataset["train"] val_data = dataset["validation"] ``` ## Linked Models This dataset was used to train [ewinregirgojr/LFM2.5-Stock-Analyst-Final](https://huggingface.co/ewinregirgojr/LFM2.5-Stock-Analyst-Final), an ensemble meta-learner achieving a 2x improvement in macro F1 score over the base `LiquidAI/LFM2.5-1.2B-Instruct` model. ## Disclaimer This dataset is intended for educational, machine learning, and quantitative research purposes only. It does not constitute financial advice. The technical indicators and signals provided are historical and synthetic for the purpose of language model alignment.



