Initial import: XAUUSD news sentiment models, evals, and data tooling
TF-IDF baseline (news_sentiment.py, models/xauusd_sentiment.joblib) and the two-head DeBERTa-v3-small transformer (transformer/, news_transformer.py) with its Google News crawler and DeepSeek labeller (data_collect/), the golden-set and archive evals (eval/), and the 2026-09-22 and 2026-09-27 results and progress notes. Transformer weights (model.pt, model.onnx) and the crawl database are not tracked; rebuild with transformer/train.py and transformer/export_onnx.py. The DeepSeek label cache in data/ is tracked. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,273 @@
|
||||
{
|
||||
"band": 0.15,
|
||||
"band_sweep": {
|
||||
"0.05": {
|
||||
"hits": 66,
|
||||
"n": 78,
|
||||
"neutral_predicted": 11
|
||||
},
|
||||
"0.1": {
|
||||
"hits": 65,
|
||||
"n": 78,
|
||||
"neutral_predicted": 13
|
||||
},
|
||||
"0.15": {
|
||||
"hits": 65,
|
||||
"n": 78,
|
||||
"neutral_predicted": 13
|
||||
},
|
||||
"0.2": {
|
||||
"hits": 65,
|
||||
"n": 78,
|
||||
"neutral_predicted": 14
|
||||
},
|
||||
"0.3": {
|
||||
"hits": 64,
|
||||
"n": 78,
|
||||
"neutral_predicted": 16
|
||||
},
|
||||
"0.5": {
|
||||
"hits": 61,
|
||||
"n": 78,
|
||||
"neutral_predicted": 19
|
||||
}
|
||||
},
|
||||
"blocks": {
|
||||
"DeepSeek live (xau through band \u00b10.15)": {
|
||||
"accuracy": 1.0,
|
||||
"confusion": [
|
||||
[
|
||||
32,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
8,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
38
|
||||
]
|
||||
],
|
||||
"directional_accuracy": 1.0,
|
||||
"directional_hits": 70,
|
||||
"directional_n": 70,
|
||||
"hits": 78,
|
||||
"macro_f1": 1.0,
|
||||
"n": 78,
|
||||
"sign_agreement": 1.0,
|
||||
"sign_hits": 70,
|
||||
"sign_n": 70
|
||||
},
|
||||
"keyword fallback (band \u00b10.15)": {
|
||||
"accuracy": 0.3076923076923077,
|
||||
"confusion": [
|
||||
[
|
||||
6,
|
||||
15,
|
||||
11
|
||||
],
|
||||
[
|
||||
0,
|
||||
8,
|
||||
0
|
||||
],
|
||||
[
|
||||
12,
|
||||
16,
|
||||
10
|
||||
]
|
||||
],
|
||||
"directional_accuracy": 0.22857142857142856,
|
||||
"directional_hits": 16,
|
||||
"directional_n": 70,
|
||||
"hits": 24,
|
||||
"macro_f1": 0.30646952758745044,
|
||||
"n": 78,
|
||||
"sign_agreement": 0.41025641025641024,
|
||||
"sign_hits": 16,
|
||||
"sign_n": 39
|
||||
},
|
||||
"model (native argmax label)": {
|
||||
"accuracy": 0.8589743589743589,
|
||||
"confusion": [
|
||||
[
|
||||
22,
|
||||
1,
|
||||
9
|
||||
],
|
||||
[
|
||||
0,
|
||||
8,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
1,
|
||||
37
|
||||
]
|
||||
],
|
||||
"directional_accuracy": 0.8428571428571429,
|
||||
"directional_hits": 59,
|
||||
"directional_n": 70,
|
||||
"hits": 67,
|
||||
"macro_f1": 0.8615520282186949,
|
||||
"n": 78,
|
||||
"sign_agreement": 0.8676470588235294,
|
||||
"sign_hits": 59,
|
||||
"sign_n": 68
|
||||
},
|
||||
"model (score through band \u00b10.15)": {
|
||||
"accuracy": 0.8333333333333334,
|
||||
"confusion": [
|
||||
[
|
||||
21,
|
||||
3,
|
||||
8
|
||||
],
|
||||
[
|
||||
0,
|
||||
8,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
2,
|
||||
36
|
||||
]
|
||||
],
|
||||
"directional_accuracy": 0.8142857142857143,
|
||||
"directional_hits": 57,
|
||||
"directional_n": 70,
|
||||
"hits": 65,
|
||||
"macro_f1": 0.8108021241937488,
|
||||
"n": 78,
|
||||
"sign_agreement": 0.8769230769230769,
|
||||
"sign_hits": 57,
|
||||
"sign_n": 65
|
||||
}
|
||||
},
|
||||
"deepseek": {
|
||||
"batch_ms_max": null,
|
||||
"batch_ms_mean": null,
|
||||
"cache_hits": 78,
|
||||
"calls": 0,
|
||||
"failed_calls": 0,
|
||||
"headlines_sent": 0,
|
||||
"model": "deepseek-v4-flash",
|
||||
"per_headline_ms": null,
|
||||
"prompt_sha1": "d32e04c6a87d019f326f111b39c99b6dd8ce794d"
|
||||
},
|
||||
"deepseek_scored": 78,
|
||||
"generated_at": "20260927_1949_transformer",
|
||||
"mcnemar": {
|
||||
"model_vs_deepseek": {
|
||||
"deepseek_only_right": 11,
|
||||
"model_only_right": 0,
|
||||
"p": 0.0009765625
|
||||
},
|
||||
"model_vs_keyword": {
|
||||
"keyword_only_right": 1,
|
||||
"model_only_right": 44,
|
||||
"p": 2.6147972675971687e-12
|
||||
}
|
||||
},
|
||||
"model": {
|
||||
"final": true,
|
||||
"model_path": "/home/harwinder/Development/ML-NEWS/models/xau_transformer",
|
||||
"model_type": "two_head_transformer:microsoft/deberta-v3-small",
|
||||
"oos_from": "2026-09-27T19:48:40.302218+00:00",
|
||||
"relevance_threshold": 0.2,
|
||||
"trained_at": "2026-09-27T19:48:40.302218+00:00",
|
||||
"training_examples": 12270
|
||||
},
|
||||
"model_latency_ms": {
|
||||
"max": 10.19,
|
||||
"mean": 8.460384615384616,
|
||||
"median": 8.434999999999999
|
||||
},
|
||||
"n": 78,
|
||||
"per_category": {
|
||||
"distractors": {
|
||||
"deepseek": 8,
|
||||
"deepseek_n": 8,
|
||||
"keyword": 8,
|
||||
"model": 8,
|
||||
"n": 8
|
||||
},
|
||||
"dovish_fed": {
|
||||
"deepseek": 8,
|
||||
"deepseek_n": 8,
|
||||
"keyword": 7,
|
||||
"model": 8,
|
||||
"n": 8
|
||||
},
|
||||
"gold_direct": {
|
||||
"deepseek": 8,
|
||||
"deepseek_n": 8,
|
||||
"keyword": 4,
|
||||
"model": 7,
|
||||
"n": 8
|
||||
},
|
||||
"hawkish_fed": {
|
||||
"deepseek": 8,
|
||||
"deepseek_n": 8,
|
||||
"keyword": 2,
|
||||
"model": 8,
|
||||
"n": 8
|
||||
},
|
||||
"inverted_metrics": {
|
||||
"deepseek": 6,
|
||||
"deepseek_n": 6,
|
||||
"keyword": 0,
|
||||
"model": 6,
|
||||
"n": 6
|
||||
},
|
||||
"negation_traps": {
|
||||
"deepseek": 8,
|
||||
"deepseek_n": 8,
|
||||
"keyword": 2,
|
||||
"model": 7,
|
||||
"n": 8
|
||||
},
|
||||
"real_yields": {
|
||||
"deepseek": 6,
|
||||
"deepseek_n": 6,
|
||||
"keyword": 1,
|
||||
"model": 5,
|
||||
"n": 6
|
||||
},
|
||||
"risk_on": {
|
||||
"deepseek": 4,
|
||||
"deepseek_n": 4,
|
||||
"keyword": 0,
|
||||
"model": 1,
|
||||
"n": 4
|
||||
},
|
||||
"safe_haven": {
|
||||
"deepseek": 8,
|
||||
"deepseek_n": 8,
|
||||
"keyword": 0,
|
||||
"model": 8,
|
||||
"n": 8
|
||||
},
|
||||
"strong_usd": {
|
||||
"deepseek": 7,
|
||||
"deepseek_n": 7,
|
||||
"keyword": 0,
|
||||
"model": 3,
|
||||
"n": 7
|
||||
},
|
||||
"weak_usd": {
|
||||
"deepseek": 7,
|
||||
"deepseek_n": 7,
|
||||
"keyword": 0,
|
||||
"model": 6,
|
||||
"n": 7
|
||||
}
|
||||
},
|
||||
"spearman_model_vs_deepseek": 0.7654087984855202
|
||||
}
|
||||
Reference in New Issue
Block a user