feat(phase-3): paper-trading runner BTC+ETH
Modulo paper_trading per forward-test virtuale Phase 3: - Portfolio multi-asset equal-weight sleeve, fees bp su round-trip - PaperExecutor compila strategia JSON e applica segnale a bar close - PaperRepository persiste runs/ticks/trades/equity in runs.db - CLI scripts/run_paper_trading.py: loop polling Cerbero, exec su nuovo bar Strategie deployate: - BTC fb63e851 (Sharpe OOS +0.50, mean rev RSI+ATR+hour gate) - ETH facd6af85d5d (Sharpe OOS +0.19, trend vol regime + SMA50/200) Capitale virtuale $1000 (sleeve $500 ciascuno), 2 settimane smoke. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"rules": [
|
||||
{
|
||||
"condition": {
|
||||
"op": "and",
|
||||
"args": [
|
||||
{
|
||||
"op": "gt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "rsi",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 70.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "gt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "atr",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "sma",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "gt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "feature",
|
||||
"name": "hour"
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 9
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "lt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "feature",
|
||||
"name": "hour"
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 17
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"action": "entry-short"
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"op": "and",
|
||||
"args": [
|
||||
{
|
||||
"op": "lt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "rsi",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 30.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "lt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "atr",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "sma",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "gt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "feature",
|
||||
"name": "hour"
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 9
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "lt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "feature",
|
||||
"name": "hour"
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 17
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"action": "entry-long"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
{
|
||||
"rules": [
|
||||
{
|
||||
"condition": {
|
||||
"op": "and",
|
||||
"args": [
|
||||
{
|
||||
"op": "gt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "atr",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 0.02
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "gt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "realized_vol",
|
||||
"params": [
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 0.03
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "gt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "sma",
|
||||
"params": [
|
||||
50
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "sma",
|
||||
"params": [
|
||||
200
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"action": "entry-long"
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"op": "and",
|
||||
"args": [
|
||||
{
|
||||
"op": "lt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "atr",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 0.01
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "lt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "realized_vol",
|
||||
"params": [
|
||||
20
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 0.02
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "lt",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "sma",
|
||||
"params": [
|
||||
50
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "sma",
|
||||
"params": [
|
||||
200
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"action": "entry-short"
|
||||
},
|
||||
{
|
||||
"condition": {
|
||||
"op": "or",
|
||||
"args": [
|
||||
{
|
||||
"op": "crossover",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "rsi",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 70.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"op": "crossunder",
|
||||
"args": [
|
||||
{
|
||||
"kind": "indicator",
|
||||
"name": "rsi",
|
||||
"params": [
|
||||
14
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "literal",
|
||||
"value": 30.0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"action": "exit"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user