shiyu-coder/Kronos
Kronos: A Foundation Model for the Language of Financial Markets
Python★ 41,825+363 that day#8 on trending
C55.2/100
Duplication40
12.6% in python, bash, perlDead code93
0.4%Complexity47
59.4% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
6.87%duplicated code · 372 of 5,414 lines
27clones in code
25code files of 87 scanned
35.16%duplicated over all files · 108 clones
Most complex files
- examples/prediction_new_GUI.py172 cx
- examples/prediction_new.py138 cx
- webui/app.py103 cx
- examples/get_date_new.py80 cx
- examples/get_akshare_date_2024-2025_x.py76 cx
- model/module.py69 cx
- finetune_csv/finetune_base_model.py59 cx
- finetune_csv/train_sequential.py59 cx
- examples/run_backtest_kronos.py51 cx
- finetune_csv/finetune_tokenizer.py50 cx
Dead code 0.38% unused · 24 findings
- finetune/utils/training_utils.py:reduce_tensorunused-export
- finetune/config.py:osunused-import
- finetune/train_tokenizer.py:argparseunused-import
- finetune/train_tokenizer.py:datetimeunused-import
- finetune_csv/finetune_base_model.py:pickleunused-import
- finetune_csv/finetune_base_model.py:nnunused-import
- finetune_csv/finetune_base_model.py:gmtimeunused-import
- finetune_csv/finetune_base_model.py:strftimeunused-import
- finetune_csv/finetune_base_model.py:KronosPredictorunused-import
- finetune_csv/finetune_tokenizer.py:gmtimeunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 41 lines in 2 placespython236 tokens
199 data_type='val', 200 lookback_window=config.lookback_window, 201 predict_window=config.predict_window, 202 clip=config.clip, 203 seed=config.seed + 1, 204 train_ratio=config.train_ratio, 205 val_ratio=config.val_ratio, 206 test_ratio=config.test_ratio 207) 208First 10 of 41 lines.
- 24 lines in 2 placespython227 tokens
88 print("pre_trained_tokenizer=False, randomly initializing Tokenizer architecture") 89import json 90cfg_path = os.path.join(self.config.pretrained_tokenizer_path, 'config.json') 91with open(cfg_path, 'r') as f: 92 arch = json.load(f) 93tokenizer = KronosTokenizer( 94 d_in=arch.get('d_in', 6), 95 d_model=arch.get('d_model', 256), 96 n_heads=arch.get('n_heads', 4), 97 ff_dim=arch.get('ff_dim', 512),First 10 of 24 lines.
- 22 lines in 2 placespython210 tokens
311cfg_path = os.path.join(config.pretrained_tokenizer_path, 'config.json') 312with open(cfg_path, 'r') as f: 313 arch = json.load(f) 314tokenizer = KronosTokenizer( 315 d_in=arch.get('d_in', 6), 316 d_model=arch.get('d_model', 256), 317 n_heads=arch.get('n_heads', 4), 318 ff_dim=arch.get('ff_dim', 512), 319 n_enc_layers=arch.get('n_enc_layers', 4), 320 n_dec_layers=arch.get('n_dec_layers', 4),First 10 of 22 lines.
7 more
- 23 lines in 2 placespython135 tokens
- 14 lines in 2 placespython126 tokens
- 12 lines in 2 placespython116 tokens
- 27 lines in 2 placespython108 tokens
- 13 lines in 2 placespython100 tokens
- 22 lines in 2 placespython98 tokens
- 11 lines in 2 placespython96 tokens
Largest clones over all files, tests and data included
- 1088 lines in 7 placesjsondata files3,618 tokenswebui/prediction_results/prediction_20250826_175135.json:1127–2214webui/prediction_results/prediction_20250826_175909.json:1127–2214webui/prediction_results/prediction_20250826_180632.json:1127–2214webui/prediction_results/prediction_20250826_180745.json:1127–2214webui/prediction_results/prediction_20250826_180806.json:1127–2214and 2 more
1127 } 1128], 1129"actual_data": [ 1130 { 1131 "timestamp": "2025-08-14T10:35:00", 1132 "open": 123397.21, 1133 "high": 123588.0, 1134 "low": 123397.2, 1135 "close": 123479.47, 1136 "volume": 47.38644,First 10 of 1088 lines.
- 1088 lines in 6 placesjsondata files3,618 tokenswebui/prediction_results/prediction_20250826_181240.json:1127–2214webui/prediction_results/prediction_20250826_181434.json:1127–2214webui/prediction_results/prediction_20250826_181513.json:1127–2214webui/prediction_results/prediction_20250826_181612.json:1127–2214webui/prediction_results/prediction_20250826_181648.json:1127–2214and 1 more
1127 } 1128], 1129"actual_data": [ 1130 { 1131 "timestamp": "2025-08-15T15:45:00", 1132 "open": 118810.01, 1133 "high": 118842.0, 1134 "low": 118770.0, 1135 "close": 118807.72, 1136 "volume": 27.15622,First 10 of 1088 lines.
- 2207 lines in 3 placesjsondata files7,455 tokenswebui/prediction_results/prediction_20250826_170831.json:33–2239webui/prediction_results/prediction_20250826_171720.json:33–2239webui/prediction_results/prediction_20250826_171913.json:33–2239
33 "max": 357.3 34 }, 35 "close": { 36 "min": 342.2, 37 "max": 357.7 38 } 39}, 40"last_values": { 41 "open": 347.2, 42 "high": 347.4,First 10 of 2207 lines.
- 2207 lines in 2 placesjsondata files7,335 tokens
- 2207 lines in 2 placesjsondata files7,335 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 14 | 4,512 | 27 | 372 | 8.24% |
| bash | 10 | 734 | 0 | 0 | 0% |
| perl | 1 | 168 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 29 | 11,209 | 64 | 1,521 | 13.57% |
| json | 34 | 65,258 | 43 | 27,285 | 41.81% |
| markdown | 4 | 694 | 1 | 7 | 1.01% |
| csv | 3 | 2,519 | 0 | 0 | 0% |
| markup | 1 | 1,238 | 0 | 0 | 0% |
| bash | 13 | 772 | 0 | 0 | 0% |
| perl | 1 | 168 | 0 | 0 | 0% |
| yaml | 1 | 71 | 0 | 0 | 0% |
| text | 1 | 9 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 20, 2026 | #8 | 41,825 (+363) | 87 | 81,938 | 108 | 35.16% | 6.87% | C 55.2 | 67b630e |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.