Posts

Showing posts from April, 2026
餘宣媞蒙地卡羅模擬資產價格 <style>H1{BACKGROUND-COLOR: DarkOrchid;COLOR:WHITE;TEXT- ALIGN:CENTER;PADDING:1PX; BORDER:SOLID BLUE 10PX;} SELECT{FONT-SIZE: 1.5EM; BACKGROROd- COLOR:LINE; BACKGROUND-COLOR: YELLOW; WIDTH: 100PX;} P{FONT-SIZE: 1.5EM; BACKGROUND-COLOR: pink;} </style> <script> function MY(n){ const step = 600.0 / n; const std = 100.0 let x. = 200; const canvas = document.getElementById(" Canvas"); const Brownian = canvas.getContext("2d"); Brownian.beginPath(); Brownian.moveTo(x, y); for (let i=0; i<n ; i++){ xdian Gm ; Brownian.strokeStyle = "blue"; Brownian.lineWidth = 3; Brownian.stroke();} function Gaussian() {// Box-Muller 法   const a = 1 - Math.random(); //區間[0,1)改成(0,1]   const b = Math.random();   //區間[0,1)改成(0,1] const b = Math.random(); Math.cos( 2.0*Math.PI*b);   return z;} </script> <h1>餘宣媞蒙地卡羅模擬資產價格</h1> <p>切割期數<select onchange="MY(this.value)">   <   選項   >   0   < /選項> ...