使用Fable进行金融市场策略可视化
ludoonchart
Fable 5.2 is f*cking insane… i asked it to run 1,000 versions of one strategy on each of 4 markets, pick the best one on the first half of the data, and then run it on the half it had never seen. the winners looked great on the data they were picked on. Then I ran them on the half they had never seen what's on the screen: 1. two heatmaps of all 1,000 SMA pairs: one for the training half, one for the unseen half 2. a price chart with the train | unseen split, the pair's entries and exits, and its equity against buy & hold 3. a scatter of train return vs unseen return for every pair 4. a menu of the 4 markets with each train winner, its unseen return and its rank among the 1,000 5. a log of every command how it works: 1. one rule: long when the fast SMA is above the slow SMA, otherwise flat 2. fast SMA 2–21 × slow SMA 22–71 = 1,000 pairs per market, 4,000 backtests in total 3. each market's data is split in two halves of about 4 months. The sweep only sees the first half 4. the best pair on the first half is then run on the second half, with no refit 5. signal at the close, position from the next bar, 2 bps fees per side, no look-ahead honest numbers (paper, winner on train → same pair on unseen data, buy & hold in brackets): → MSFT: +4.7% → +17.8% (+35.9%) → AAPL: +17.1% → +9.6% (+10.9%) → NVDA: +11.2% → −16.1% (−4.2%) → SPX: +9.7% → −4.4% (−1.4%) → 0 of 4 beat buy & hold, 2 of 4 lost money → on average the winners made +10.7% on the half they were picked on, and +1.7% on the unseen half. Buy & hold made +10.3% what I keep thinking about is how good the first half looks. Every winner has a green number next to it, and if I had stopped there, I would have posted a strategy that "works" a lot of backtests you see online stop right at that point. The second half is the only part that tells you anything, and it's the part that's easy to skip. I'd rather show the version where it falls apart the cool part for me is that Fable 5.2 built the whole thing, the sweep, the split, the animation and the log, from one prompt. The numbers are not flattering, but the terminal is exactly what I asked for the prompt is in the comments below i pulled the full guide on how to build a 24/7 trading terminal with Fable 5.2 in this guide you will learn how to build your OWN trading terminal for FREE read it before everyone else starts using it:查看原帖