Repository Public
1<!-- Banc d'essai de SK.viz (finance, maths) : chandeliers d'une trajectoire GBM simulée, carnet d'ordres synthétique, densité normale, surface de volatilité paramétrique. -->2<div class="scene" data-bg="theme">3 <svg class="sk-art" viewBox="0 0 1920 1080"><g id="a"></g></svg>4</div>5<script>6var gbm = SKN.gbmPaths({ S0: 100, mu: 0.06, sigma: 0.28, T: 1, steps: 240, n: 1, seed: 7 }), bars = SKN.ohlcFromPath(gbm.paths[0], 6);7SK.viz.candles({ parent: "#a", x: 130, y: 120, w: 760, h: 330, bars: bars, at: 0.3, dur: 2.2 });8var bk = SKN.orderBook({ mid: 100, levels: 10, tick: 0.05, depth: 400, seed: 3 }), ob = SK.viz.orderbook({ parent: "#a", x: 1040, y: 130, w: 740, h: 300, book: bk, at: 1.0 });9ob.consume("buy", SKN.matchMarketOrder(bk, "buy", 1500).fills, { at: 3.0 });10var P = SK.viz.plot({ parent: "#a", x: 180, y: 540, w: 640, h: 250, xRange: [-4, 4], yRange: [0, 0.45], ticks: { x: [-2, 0, 2], y: [] }, at: 1.6, xLabel: "écarts-types" });11P.fn(function (x) { return SKN.normalPdf(x); }, { at: 2.2, area: true, color: "var(--p)" }); P.vline(-1.645, { at: 3.4, label: "VaR 95 %", computed: true });12var vs = SKN.volSurface({ S: 100, strikes: SKN.linspace(70, 130, 22), maturities: SKN.linspace(0.1, 2, 18), model: "skew", params: { sigma: 0.2, skew: -0.12, smile: 0.9, term: 0.02 } });13SK.viz.surface({ x: 1420, y: 700, w: 620, grid: { xs: vs.strikes, ys: vs.maturities, z: vs.iv }, at: 2.4, keys: [{ at: 2.4, yaw: -50, pitch: 26 }, { at: 6, yaw: -15, pitch: 30 }] });14SK.provenance("Illustration — trajectoire simulée (GBM), carnet synthétique, surface paramétrique : aucune donnée de marché", { at: 0.6 });15</script>16