ashesh8500 commited on
Commit
997ba0f
Β·
verified Β·
1 Parent(s): b00c47d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +54 -16
README.md CHANGED
@@ -1,26 +1,64 @@
1
- ---
2
- tags:
3
- - ml-intern
4
- ---
5
 
6
- # ashesh8500/finjepa
 
 
 
7
 
8
- <!-- ml-intern-provenance -->
9
- ## Generated by ML Intern
10
 
11
- This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub.
 
 
 
 
 
 
 
12
 
13
- - Try ML Intern: https://smolagents-ml-intern.hf.space
14
- - Source code: https://github.com/huggingface/ml-intern
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  ## Usage
17
 
18
- ```python
19
- from transformers import AutoModelForCausalLM, AutoTokenizer
 
20
 
21
- model_id = "ashesh8500/finjepa"
22
- tokenizer = AutoTokenizer.from_pretrained(model_id)
23
- model = AutoModelForCausalLM.from_pretrained(model_id)
 
 
24
  ```
25
 
26
- For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.
 
 
 
 
 
 
 
1
+ # FinJEPA: Financial Joint-Embedding Predictive Architecture
 
 
 
2
 
3
+ FinJEPA is a JEPA-based world model for portfolio optimization over a **separated action space** consisting of:
4
+ - **Portfolio weights** (continuous, simplex-constrained)
5
+ - **Trading signals** (discrete: long/short/flat per asset)
6
+ - **Hedging signal** (binary: on/off)
7
 
8
+ ## Architecture (SOTA Blend)
 
9
 
10
+ | Component | Source | Key Innovation |
11
+ |-----------|--------|----------------|
12
+ | Time Series Encoder | TS-JEPA (Sennadir 2025) | 1D-CNN patch tokenizer + Transformer |
13
+ | Action Conditioning | JEPA-WMs (Terver 2025) | AdaLN + RoPE in predictor |
14
+ | Collapse Prevention | EB-JEPA (Terver 2026) | SIGReg + Inverse Dynamics Model |
15
+ | Multi-step Rollout | EB-JEPA | K-step autoregressive training |
16
+ | Planner | JEPA-WMs + EB-JEPA | CEM L2 cost / MPPI cumulative cost in latent space |
17
+ | TD Branch | TD-JEPA (Bagatella 2025) | Optional separate task encoder for zero-shot RL |
18
 
19
+ ## Model
20
+
21
+ ```
22
+ Financial Time Series (T, F)
23
+ β”‚
24
+ β–Ό
25
+ [TimeSeriesTokenizer] ── 1D-CNN patches + position encoding
26
+ β”‚
27
+ β”œβ”€β”€β”€β–Ί [Context Encoder] (student)
28
+ β”‚ β”‚
29
+ β”‚ β–Ό
30
+ β”‚ [Predictor] ◄─── Action embedding (weights + signals)
31
+ β”‚ (AdaLN + RoPE) β”‚
32
+ β”‚ β”‚ β”‚
33
+ β”‚ β–Ό β–Ό
34
+ β”‚ Predicted target [ActionEmbedder]
35
+ β”‚ embeddings β”œβ”€β”€ weights (continuous)
36
+ β”‚ β”œβ”€β”€ signals (discrete)
37
+ β”‚ └── hedge (binary)
38
+ β”‚
39
+ └───► [Target Encoder] (teacher, EMA frozen)
40
+ β”‚
41
+ β–Ό
42
+ Ground truth target embeddings
43
+ ```
44
 
45
  ## Usage
46
 
47
+ ```bash
48
+ python finjepa/run_training_fast.py
49
+ ```
50
 
51
+ Full training on real data:
52
+ ```bash
53
+ python finjepa/train.py --data_source hf \
54
+ --dataset_name paperswithbacktest/Stocks-Daily-Price \
55
+ --n_assets 5 --batch_size 128 --epochs 50 --push_to_hub
56
  ```
57
 
58
+ ## References
59
+
60
+ 1. TS-JEPA β€” Sennadir et al. (2025). arxiv:2509.25449
61
+ 2. JEPA-WMs β€” Terver et al. (2025). arxiv:2512.24497
62
+ 3. EB-JEPA β€” Terver et al. (2026). arxiv:2602.03604
63
+ 4. V-JEPA 2 β€” Assran et al. (2025). arxiv:2506.09985
64
+ 5. TD-JEPA β€” Bagatella et al. (2025). arxiv:2510.00739