Faithful port of the open-source FMZ Quant strategy 'Python 机器学习之 SVM 预测买卖' by Zero (https://www.fmz.com/strategy/21370; original: Bitfinex BTC_USD, 1h bars). Credit to the author. Mechanism, in our own words: on every new hourly bar, re-train a linear support-vector classifier from scratch on the recent bar history. Each training sample is one past bar i, its feature vector is the two RAW price levels [open_i, close_i] (no scaling, no returns), and its label is the direction of the NEXT bar's close change, d = close_{i+1} - close_i: class UP if d > SpreadVal, class DOWN if d < -SpreadVal, class FLAT otherwise, with SpreadVal = 2 (price units, USD) exactly as in the source. The trained model then classifies the latest bar's [open, close] into UP/DOWN/FLAT, and that prediction drives a single long/short/flat position. Adaptations (only these): venue/instrument moved from Bitfinex BTC_USD spot to BTCUSD_PERP.BINANCE_CM (the Binance COIN-M inverse perpetual). It is also quoted in USD per BTC, so SpreadVal=2 keeps its original unit meaning, and it has the lowest round-trip cost in our venue set (~0.06% vs ~0.10% USD-M), which matters for a strategy with hourly turnover. It also fills the under-quota COIN-M bucket (3.2% vs >=5% target). BTC is kept despite corpus concentration only because the source strategy is a BTC_USD strategy and the user asked for a faithful port. Sizing is translated from 'half of the initial account' to 50% of current equity notional at leverage 1.0. The classifier is implemented in numpy because sklearn is not an allowed sandbox import. It is a reimplementation of sklearn's svm.LinearSVC with defaults. The source runs on FMZ's live/in-progress bar: at new-bar detection it uses the just-opened bar's [open, close] (where close is roughly the open). On our bar-close engine the equivalent point-in-time translation uses the just-CLOSED bar t as the prediction input. The training pairs are all (features of bar i, label from close_{i+1} - close_i) where bar i+1 has already closed, so nothing looks ahead. Honest note: SpreadVal=2 USD on a ~$60k-120k BTC is ~0.002%, so the FLAT class almost never occurs and the model is effectively a binary up/down classifier on price levels. Raw [open, close] levels carry essentially no information about the sign of the next hourly change. The factory's lesson L167 predicts this faithful-port family dies at fee_edge. It is proposed because the user explicitly asked for a faithful port, and our real-fee backtest decides. The prediction below is pre-registered as near-zero edge.