A LoRA fine-tune of google/gemma-3-4b-it trained by Ramailo Technologies to perform structured financial market analysis across crypto, stocks, forex, and commodities.
The model reads raw OHLCV candle data, technical indicators, options flow, and sentiment signals, then produces condition-based market analysis — without giving hard price targets.
What it does
Given structured market data (candles, RSI, MACD, Bollinger Bands, EMA stack, funding rates, put/call ratios, open interest, volume ratios), the model produces analysis across 7 task types:
Task
Description
setup_evaluation
Evaluates whether a trade setup is valid or a trap
technical_analysis
Full multi-timeframe technical read with directional bias
risk_reading
Identifies risk signals from volume, options flow, and price action
market_regime
Classifies current market regime (trending, ranging, distribution, etc.)
asset_comparison
Compares two assets and identifies relative strength
concept_explain
Explains a market concept grounded in the current data
api_parse
Parses and interprets raw options/derivatives API output
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3import torch
45base_model_id ="google/gemma-3-4b-it"6adapter_id ="Ramailo-Technologies/gemma3-4b-market-analyst"78tokenizer = AutoTokenizer.from_pretrained(base_model_id)910base = AutoModelForCausalLM.from_pretrained(11 base_model_id,12 torch_dtype=torch.bfloat16,13 device_map="auto",14)15model = PeftModel.from_pretrained(base, adapter_id)16model.eval()1718messages =[19{20"role":"system",21"content":"You are an expert market analyst. Analyse the provided market data and give a structured, condition-based assessment. Never give hard price targets. Always state what would change your bias."22},23{24"role":"user",25"content":"Market data:\n<your JSON market data here>\n\nIs this a valid long setup or a trap?"26}27]2829inputs = tokenizer.apply_chat_template(30 messages, return_tensors="pt", add_generation_prompt=True31).to(model.device)3233with torch.no_grad():34 output = model.generate(inputs, max_new_tokens=512, do_sample=False)3536response = tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True)37print(response)
This is a textbook 'falling knife' scenario. While the price of 2635.74 is
aggressively oversold — sitting well below the lower Bollinger Band (2684.93)
and hitting an RSI of 30 — the sentiment data suggests a dangerous trap.
The Long/Short ratio of 2.09 is the critical signal here; it indicates that
retail traders are heavily positioned for a bounce. In a downtrend, a high
L/S ratio provides the exact liquidity needed for further declines via long
liquidations. The negative funding rate (-0.0469) confirms that shorts are
paying longs, which often precedes a bounce — but not when the long-side is
this overcrowded.
Bias change condition: A valid long setup would require the L/S ratio to drop
below 1.2 and price to reclaim the lower Bollinger Band (2684.93) on a
closing basis.
The spike in volume ratio to 3.67 while price remains stagnant at 669.81 is
a classic signal of 'churning' or distribution. When volume surges but price
fails to move, it indicates a massive battle between buyers and sellers where
supply is exactly meeting demand. The Put/Call ratio of 1.5 is the deciding
factor — it reveals that the volume spike is driven largely by bearish bets
and hedging. NFLX is in a precarious position, trading below its EMA_20
(688.22).
Bias change condition: Bias turns neutral if price closes above EMA_20
(688.22) with a volume ratio below 2.0, signalling distribution pressure
is exhausting.
Evaluation
Evaluated on 84 held-out samples across all task types and asset classes. GPT-4o was used as judge, scoring each response 1–5 on five criteria.
Overall — before vs after fine-tuning
Metric
Base model
Fine-tuned
Delta
Factual grounding
3.08
4.07
+0.99
No price targets
4.83
4.96
+0.13
Directional clarity
3.10
4.37
+1.27
Bias change condition
1.73
4.40
+2.68
Hallucination penalty
4.39
4.61
+0.21
Overall
3.43
4.48
+1.06
The biggest gain is bias change condition (+2.68) — the base model almost never stated what would change its view. The fine-tuned model does this consistently on every response.
By task type
Task
Before
After
Delta
api_parse
3.25
4.73
+1.48
market_regime
3.73
4.68
+0.95
risk_reading
3.33
4.55
+1.22
setup_evaluation
3.62
4.42
+0.80
concept_explain
3.43
4.42
+0.98
technical_analysis
3.43
4.35
+0.92
asset_comparison
3.18
4.23
+1.05
By asset class
Asset class
Before
After
Delta
Crypto
3.38
4.70
+1.32
Forex
3.29
4.45
+1.16
Commodities
3.58
4.43
+0.85
Stocks
3.46
4.35
+0.90
Before vs after — response comparison
NFLX — Asset Comparison (overall delta: +2.2)
Base model (score: 2.8/5)
Okay, let's break down this NFLX data and assess whether this presents a
genuine short setup or a potential "fake-out."
1. Immediate Price Action & Volatility:
- Range: The stock has traded between 241.21 and 264.48.
- Volatility: The ATR of 4.15 indicates moderate volatility.
[Generic bullets with no directional conviction and no bias change condition]
Fine-tuned model (score: 5.0/5)
This is a valid short setup, not a fake-out. The conflict between the
put/call ratio (0.44) and the RSI (67.3) is a classic divergence. A put/call
ratio of 0.44 indicates extreme bullish sentiment, while the RSI of 67.3
shows the asset is overbought. When the options market is this aggressively
bullish while price is consolidating and the MACD histogram is negative
(-5.988), it suggests that 'smart money' is positioning for a reversal.
Price is trading below all major EMAs: EMA_20 (259.78), EMA_50 (277.25).
Bias change condition: Short bias invalidated if price closes above EMA_20
(259.78) with a put/call ratio rising above 0.6.
META — API Parse (overall delta: +2.2)
Base model (score: 2.2/5)
Based on the provided data, the options flow indicates "mixed" unusual
activity. The put-call ratio is 0.71, suggesting a slight preference for
puts. A cautious approach is advised...
[No specific data references, no bias change condition stated]
Fine-tuned model (score: 4.4/5)
I cannot provide a directional call on the 1H chart because the data is
contradictory. The Put/Call ratio is 0.71 (bullish), yet the IV Rank is
extremely high at 86.6. An IV Rank this high indicates the market expects a
massive volatility move, but the Put/Call ratio suggests no conviction in a
specific direction.
Bias change condition: A directional call becomes possible if IV Rank drops
below 60 while the Put/Call ratio holds above 0.8, or if a clear break
occurs above/below the consolidation range with a volume ratio above 2.0.
Trained primarily on crypto data — crypto task scores are highest (+1.32 delta). Stock/forex/commodities performance, while improved, may be less consistent on edge cases.
The model analyses data it is given — it has no live market access.
Not financial advice. All outputs are for research and educational purposes only.
Performance depends on the quality and completeness of the market data JSON provided as input.