2010年初頭、ネットワークの拡大 シカゴとニューヨークの間の直線光ファイバー線に約30000万ドルを投入しました。当時、シカゴはファイター取引の主要なハブでしたが、ニューヨークは株式を扱っていました。定期的なルートは、数十キロを加えましたが、新しいケーブルは遅延を17ミリ秒から13ミリ秒に短縮しました。 投資 投資 高周波取引では、その3〜4 msは巨大な利点でした。データを少し前に見た人は、最初にオーダーを置き、流動性を獲得することができます。ラインへのアクセスのレンタルは毎年数百万ドルにかかりますが、それは支払われました - ミリ秒は文字通りお金に変換されました。 もし企業が、わずか3〜4ミリ秒を剃るために何百万ドルを費やす準備ができていたならば、実際に市場の動きを予測する(即座にさえ)、反応しないMLモデルの利点を想像してください。 では、なぜ私たちは金融におけるMLの公的な成功ストーリーを見ないのでしょうか? あなたは2つの方法でそれを見ることができます。 一つは、結果が存在するが共有されないということです。 時には、良い数字を含む紙を見ることができますが、それらは稀で、通常は桜が選ばれています。 もう一つは、実際の障害があるということです。 金融データは他のドメインのデータよりも作業が困難で、主に3つの理由から: 騒音多すぎ データ不足 絶えず変化する市場 この組み合わせにより、金融データは天候データとは大きく異なり、騒音は物理法則に従うため低くなり、衛星やセンサーが毎日テラバイトの観測を生成することにより、データは豊富であり、基礎的な物理学は安定しているため、古いデータさえも有用である。 財務におけるこれらの問題のそれぞれには、既知の修正があります. 私は下にそれらを検討します. 問題は、彼らは単独でしか働いていないということです. 誰もそれらをすべて一つのトレーディングマシンに組み込むことができなかった。 彼らが言うように、あなたは2つしか選べない。 Reducing noise with filters and aggregation フィルターと合併による騒音削減 金融タイムシリーズには、騒音に埋め込まれた弱い信号が登場します。 価格は毎秒変動します - ニュース、噂、大きなプレイヤーの動きです。 たとえ「良いニュース→価格が上昇する」などの単純なリンクさえ、しばしば壊れます。 騒音の主な原因は2つあります。 The first source of noise is a The core issue is not the magnitude of the noise itself, but the weakness of the signal: meaningful price movements are usually fractions of a percent, while random swings can easily reach several percent. As a result, the share of informative changes within the overall data stream is extremely small. weak signal-to-noise ratio. According to the Efficient Market Hypothesis, prices already reflect all available information from news — which is exactly what we typically aim to predict. However, markets also include whose actions generate additional noise. uninformed participants Noise filtering Noise filtering via FFT remains a staple tool. The approach decomposes a time series into frequency components: low frequencies capture the underlying trend, while high frequencies represent noise. By discarding the high-frequency parts and reconstructing only the low-frequency component, we obtain a smoothed signal that’s much easier to model. (The high-frequency remainder can still serve for volatility estimation if needed.) was able to augment classical computing workflows to better unravel hidden pricing signals in noisy market data than standard, classical-only approaches in use by HSBC, resulting in strong improvements in the bond trading process. IBM Heron Heuristics and reframing the problem Noise from market participants is handled differently. One useful trick is to reframe the question itself. Instead of asking you can ask: “What will Apple’s stock price be one second from now?” “What will it cost to buy 1 share?” “What will it cost to buy 100k shares?” In the second case we predict the average price for a large volume, and that is much more stable and better reflects market movement. def avg_price(order_book, volume): taken, cost = 0, 0 for price, avail in order_book: take = min(avail, volume - taken) cost += take * price taken += take if taken >= volume: break return cost / taken Example: the averaged price for 100k shares y = avg_price(order_book, 100_000) IBM HERON 「Appleの株価は今後1秒でどのくらいになるだろうか?」 When More Volume Means More Noise しかし、逆の効果もある:時には ボリュームは実際にはデータに騒音を加えることができます。 2 つのグラフを比較してください:彼らはBinanceの平均BTCUSDT価格を表示し、異なる取引ボリュームで重ねています。 最初のケースでは、50 万ドルのボリューム重ねられたグラフは「少なからず騒がしい」ように見えます - これは急速な価格下落の間に起こりました。 二番目のケースでは、同じ重ねられた平均値はさらに「ランダムな」ジャンプを示しています。 これは、より落ち着いた価格期間中に、参加者はより頻繁に大きな注文を注文簿に深く移動し、その結果、重ねられた平均価格に影響を与えました。 もっと 8月22日から9月22日までの期間に、これらの3つの指標のそれぞれの変化の数を単に数えると、価格を「平均」すると、実際にはデータが増加します。 P1_1_market_hits.csv: 2 374 605 データポイント P2_500k_market_hits.csv: 51,309,973 データポイント P3_50m_market_hits.csv: 133,191,896 データポイント The takeaway is this: averaging can sometimes make things worse. Still, prewarned is prearmed. 平均化は時として事態を悪化させることができる。 Smarter Targets Beat Raw Prices 「騒音を減らす」と「MLを助ける」のもう一つの方法は、時間の経過とともに騒音を平均することにより、予測目標自体を再構成することです。 より強力な1つは、 同時に2つの問題を解決する: 「今から10秒で正確な価格を予測しよう」 「次の10秒間の総量重量平均価格を予測しよう」 If a price jump occurs within those 10 seconds, the exact moment doesn’t matter as much — averaging smooths it out. The algorithm therefore has fewer ways to fail. Secondly (and here we get a bit more mathematical), averaging the target also reduces the average penalty the model receives during training for “wrong predictions.” In the simplest case of a regression model, the loss is proportional to (y^* - y)^2, where y^* is the “true answer” and y is the model output. The larger the error, the quadratically higher the penalty. Now, suppose that over the next 10 seconds the price trend is generally upward, but at some random moment there is a brief downward spike. The model would have to predict that spike, otherwise it gets penalized. But in reality, we don’t care much about that random blip — what we want the model to capture is the overall upward movement.\ たとえば、グラフでは、1秒の平均を10秒に比べ、10秒の目標は、少なくとも単純な回帰のために予測しやすくなります。 Don’t Predict Price, Predict the Crowd 時には、価格自体ではなく、群衆の反応を予測する方が賢い場合があります。「頭と肩」のような技術的なパターンは科学的な厳格さが欠けているかもしれませんが、十分なトレーダーがそれらを信じ、行動すれば、価格は実際に動きます。 言い換えれば、MLモデルを「ヒント」すると、データで探しているもの(例えば、市場参加者が特定の技術分析パターンを完了しようとしている場合)、モデルはより効率的に学習します。 Bootstrapping and augmenting limited data Bootstrapping and Augmenting Limited Data(ブートストラップと限られたデータの拡張) 第二の大きな課題は、データの欠如です。例えば、Appleの株を例にとり、毎秒1回価格をサンプルすると、60倍×60倍×8時間の取引時間×週5日×週50週(休日を除く) ≈7200000ポイント(年間1000万点未満)になるでしょう。 確かに、HFTデータは、ミリ秒ごとに何かが起こりますが、それは最初の問題を引き起こします:トンの騒音と非常に少ない実際の信号。 機械学習の核心は統計であり、統計は小さなサンプルで作業するためのトリックを持っています。 Bootstrapping アイデアは単純です:100の観測を持っているとしますが、1000を好むとします。 たとえば、ランダムなサブセット(たとえば、それぞれ50項目)を繰り返し取って、統計を計算します。 可能な「100を選択する50」の組み合わせの数は膨大です。 その結果、あなたは数百の再サンプルデータセットと、オリジナルの100にしか頼らなかったよりも、より信頼性の高い推定を得ます。 キャッチは、タイムシリーズでは、これはほとんど機能しません - あなたは単に時間を失うことなくシーケンスをパーツに切ることはできません. それは、古典的なブートストラッピングは、価格予測のために滅多に使用されません. しかし、100の取引取引を分析するようなタスクでは、それは適用することができます:あなたは、元の100を平均するか、または50のいくつかのランダムサブセットを構築し、それらの結果を平均することができます. Data augmentation 第二の戦略は、人工的にデータセットを拡張することです。画像では、これは単純です:回転、歪曲 - そしてあなたは新しい例を得ます。 テキストでも。 金融では、それはより困難ですが、いくつかのトリックはまだ働いています。 簡単な例:モデルが牛市場で訓練されている場合、それは常に「買い」を示唆します。 成長を衰退に変え、 売り上げを売り上げに変え、 良いニュースを悪いニュースに変える アルゴリズムはそのようなシナリオから学び、下落する市場で販売を開始します。 Synthetic trade generation is a that still has many open questions field フィールド フィールド このアプローチは比較的単純です:実際の取引を取って、それを分布(または分布のセット)に合わせ、その分布からサンプルを採取して追加の合成データを生成します。 最近の研究では、ますます生成モデルに依存しています:ディファッションモデル、GAN、変数自動エンコーダー。例えば、「ディファッションモデルによる合成金融タイムシリーズの生成」という論文は、オーダーブックシリーズがDDPMを通じて生成され、その後タイムシリーズに逆転される方法を説明しています。 もう一つの例は、拡散とトランスフォーマーアーキテクチャを組み合わせ、長い、高信頼性の合成タイムシリーズを生成するTransFusionです。 主な課題は、2つの要求を和解することである:一方で、市場のスタイリッシュな事実(脂肪尾、変動性のクラスターリング、自動関連等)を保存し、他方で、過剰合成のアーティファクトを避けることである。 Time shifts タイムシフトのテクニックもあります:同じデータを使用しますが、遅れがあります。問題は、偶然に「未来に目を向ける」こと(見る前に偏見)が容易です。これは古典的なエンジニアリングミスです:トレーニングセットには、モデルが予測するべきデータが含まれます。 もう一つのテクニックは、タイムシフトです:遅延で同じデータを再利用する。ここで主な問題は、見直しの偏見を導入するリスクです - トレーニングセットが偶然にモデルが予測する予定のデータを含む古典的なエンジニアリングエラーです。 役に立つ類似点は天候:今雨が降っている場合、雨が続く可能性が高いが、誰もが傘を持っているときに雨を予測すると、価値が少なくなる。 **セットとスライドウィンドウで変化する市場に適応 **第3の問題は、市場がワイルド・ウエストのように振る舞っていることです。すべてが急速に変化します。あなたは、「過去数カ月の新鮮なデータだけをトレーニングしましょう」と言えるでしょう。 Ensembles 一つの実践的なアプローチは、セットです. あなたはいくつかのモデルを訓練します: one on the most recent days or weeks, another on the entire history, a third on some mid-range horizon. and a fourth that focuses on special cases — for example, detecting noise patterns or technical-analysis formations, as discussed earlier. Then you aggregate their predictions (e.g., by averaging, or taking the min/max). This is a standard trick for dealing with heteroscedastic data — where the distribution is non-stationary and constantly shifting. Markets are exactly that kind of case. pred1 = model_recent.predict(x) pred2 = model_history.predict(x) pred3 = model_midterm.predict(x) final = np.mean([pred1, pred2, pred3]/ # final = np.max([pred1, pred2, pred3]) The idea is that the market may change tomorrow, but some of the old information is still useful. Averaging helps smooth out these distortions. Sliding windows Another technique is training on sliding windows. Take the last 7 days, predict the next one. Then shift the window: add new data, drop the old. The model keeps updating, allowing it to adapt to new market regimes. window = 7 for t in range(window, len(data)): model.fit(data[t-window:t]) pred = model.predict(data[t]) So why is there no universal ML for trading? So, each of the three problems can be solved on its own, but together they don’t add up to a universal solution. One reason is the lack of quality feedback for training models. In finance, you don’t have the usual ML metrics like accuracy or F1-score. The only metric is money made. Imagine two hedge funds. One shows average returns, the other twice as high. If someone consistently outperforms the rest, everyone immediately assumes it’s a scam. Why? First, because nothing like that shows up in the market — other participants don’t feel like someone is “skimming” them on every trade. Second, there’s the survivor bias. Classic example: take a thousand people, half go long on oil, half go short. The next day, half of them are right. From the remaining 500, split again, and repeat for several rounds. After ten days, you’ll have one “genius” who made the right call ten times in a row. But in reality, he was just lucky — the illusion comes from starting with a thousand players. This is the core problem of verification. There isn’t much data to train on, and there’s even less to validate results. Even if we could see trades from a fund that outperforms the market twofold, over a relatively short horizon we still wouldn’t be able to tell luck from real skill. A good example is the many “one-day wonders” — funds or companies that show great returns when the overall market is going up (say, during an S&P 500 rally). But as soon as conditions turn south, their performance collapses. Over the long run, there are indeed legendary cases like the Medallion Fund. They consistently beat the market, delivering returns above so-called risk-free bonds. But the edge isn’t by orders of magnitude — it’s a few percentage points. To do better than them means being ahead by fractions of a percent, sustained over a very long horizon. The reality is that few funds survive long enough to prove such stability. Over six months, almost anyone can “look like a genius” if they get lucky — that’s the classic survivor bias. And not surprisingly, it’s exactly this illusion that a lot of flashy marketing campaigns for “successful” funds are built on. The philosophical takeaway is a harsh one: an algorithm can’t be called successful until it’s been tested by time. Even if it’s profitable on average, in real life it can get wiped out in a single day with a million-dollar drawdown — simply because you don’t have an extra million lying around to survive that day.