Instructions to use mstrasser/jeff-adapter-trading-desk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mstrasser/jeff-adapter-trading-desk with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download example.json from mstrasser/jeff-adapter-trading-desk: direct link, hf CLI and curl.
- Browser
- Download file 3.64 kB
-
https://huggingface.co/mstrasser/jeff-adapter-trading-desk/resolve/main/example.json
- Command line
-
hf download hf://mstrasser/jeff-adapter-trading-desk/example.json
-
curl -L -o example.json https://huggingface.co/mstrasser/jeff-adapter-trading-desk/resolve/main/example.json
3.64 kB
| { | |
| "model": "trading-desk", | |
| "state": { | |
| "desk": "Desk Crest Vol Target trades Outokumpu shares (OUT1V), strategy: volatility-targeted position holding.\nDesk rulebook:\n* Instrument: Finnish stainless-steel producer, listed on Nasdaq OMX Helsinki, traded in euros; tick size EUR 0.01; continuous trading from 10:00 to 18:25 Helsinki time; typical spread 2 ticks; typical displayed size at the best price about 1,226 shares.\n* Standard order size (one clip): 300 shares. Position limit: the absolute position (long or short) may not exceed 3,300 shares.\n* Volatility is the realised volatility over the long window (200 updates). Cut the position by one clip (decrease) when the unrealised loss on the position is EUR 500 or more, or when volatility is 38.5 bps or more. Otherwise add one clip (increase) when volatility is below 34 bps and the absolute position after adding stays within the position limit. Otherwise keep the size.\n* Go risk-off when any of these holds: realised volatility over the long window (200 updates) is 47 bps or more; the day's P&L is a loss of EUR 3,000 or more; the absolute position is above the position limit; or news of the chief executive leaving, a takeover offer or a trading halt arrives.\n* Venues: Tapio Dark: fee 0.35 bps of the traded value, latency 0.3 ms; Helmi Cross: fee 0.3 bps of the traded value, latency 0.5 ms; Kallio Pool: fee 0.2 bps of the traded value, latency 2.5 ms.\n* Routing: send a new order to the cheapest venue (lowest fee) whose displayed size at the best price can fill the whole order. If the order is marked urgent, use the fastest venue (lowest latency) that can fill the whole order instead. If no venue can fill the whole order, use the venue with the largest displayed size.", | |
| "market_context": "Market context for Outokumpu on 14 June 2010: the session opened with a mid price of 13.415. Up to 11:15:45 the price drifted higher between 13.380 and 13.555, with a typical spread of 1 ticks. Trading conditions this morning: normal.", | |
| "market_state": "[11:18:30] BOOK bids 13.51 x 3,114; 13.50 x 1,020; 13.49 x 1,249; 13.48 x 6,500; 13.47 x 4,609 | asks 13.54 x 3,040; 13.55 x 2,120; 13.56 x 3,241; 13.57 x 3,200; 13.58 x 6,178\nspread 3 ticks | mid 13.525 | avg mid (100 updates) 13.508 | deviation +1.7 ticks\nimbalance: best 1 level +0.01 | best 3 levels -0.22 | best 5 levels -0.04\nrealised vol: short (50 upd) 15.7 bps | long (200 upd) 35.1 bps | signal flat\nmid path (every 50 upd): 13.505 / 13.550 / 13.505 / 13.505 / 13.525\ntrades: 11:17:02 seller took 140 at 13.50; 11:17:07 buyer took 6,290 at 13.52; 11:17:13 buyer took 3,030 at 13.52\nvenues at best (bid / ask): Tapio Dark 176 / 267; Helmi Cross 424 / 309; Kallio Pool 2,514 / 2,464\nposition: short 2,400 shares, average entry 13.681 | unrealised P&L +EUR 374; day P&L +EUR 3,226\nopen orders: none\nnews: (11:17) Economic data: US weekly jobless claims at 44.0\nREQUEST: position size review" | |
| }, | |
| "questions": { | |
| "size": { | |
| "type": "choice", | |
| "instructions": "You are the decision step of an automated trading desk. A volatility-target desk sizes its position from realised volatility and the unrealised loss on its position; an execution desk paces a client parent order against its schedule and its limit price. Apply the sizing or pacing rule in the desk definition to the live market state.", | |
| "criteria": { | |
| "increase": "Increase: add one clip to the position, or speed up the parent order.", | |
| "decrease": "Decrease: cut the position by one clip, or slow down the parent order.", | |
| "keep": "Keep the current size or pace." | |
| } | |
| } | |
| } | |
| } | |