FAISAL HABIB CSC 2228 PROJECT PRESENTATION DECEMBER 4, 2019 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES 1 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES INTRODUCTION ▸ Quick Overview of Financial Instruments ▸ Problem Description ▸ FRET ▸ Compute in Cloud vs. Compute at Edge ▸ Results ▸ Conclusion 2 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FINANCIAL INSTRUMENTS ▸ Stocks & Bonds ▸ Swaps, Options, Forwards, and Futures ▸ Combined in many ways to form Structured Products ▸ Capital Protection ▸ Income Enhancement ▸ Market Participation ▸ Hedging & Risk Management 3 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FINANCIAL INSTRUMENTS Image taken from: https://www.tdstructurednotes.com/snp/noteDetails.action?noteId=2709 4 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FINANCIAL INSTRUMENTS ▸ Options ▸ Fundamental building block for structured products ▸ Contracts that allow the holder to buy or sell an asset at a predetermined price ▸ Types: ▸ Call Option: Payoff at maturity = max(0, S - K) ▸ Put Options: Payoff at maturity = max(0, K - S) ▸ Exercise: European, American, Bermudan 5 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FINANCIAL INSTRUMENTS 20.00 Price ($) Call Options 18.00 16.00 14.00 12.00 10.00 8.00 6.00 Call (30 Days) Call (60 Days) 4.00 Call (90 Days) Call (Expiration) 2.00 0.00 80 85 90 95 100 105 110 115 120 Stock Price/Index Level 6 FRET.key - December 8, 2019
<latexit sha1_base64="JjTkS2Jbv5mw6wD/yJmt8kP+U=">ACdnicdVFdaxQxFM1M/ajr1qfRJDQpVqRLjPTgr4UFnwRfKm42xY245DJZHZDM5lpckdYQn6Cf863/g5fDSzswWtekng5Jx7OclJ3khIqugnDr1u07d7fvDe4/ePjo8fDJzqmpW834jNWy1uc5NVwKxWcgQPLzRnNa5ZKf5RfvO/3sK9dG1GoKq4anFV0oUQpGwVPZ8FuRxfjlMSalpszGzhIjFhXFxFxqsFPnMJG8hDmRatPz2dmPDr/p+X2ND/Bld1pr/fCXxNnES0WS3g9xT1IMSF+DYos6fw62wN8w2yQDUfxOFoX/j8YoU2dZMPvpKhZW3EFTFJj5nHUQGqpBsEkdwPSGt5QdkEXfO6hohU3qV3H5vCeZwpc1tpvBXjN/j5haWXMqsp9Z0VhaW5qHfkvbd5C+S61QjUtcMV6o7KVGrc/QEuhOYM5MoDyrTwd8VsSX2A4H+qCyG6fvLf4DqE02QcH46T0ejyWQTxzZ6jnbRPorRWzRBH9AJmiGfgTPgt1gFPwMX4R74au+NQw2M0/RHxVGvwC7JbtZ</latexit> <latexit sha1_base64="GXOwJ1Si3Ph/YbBMr0yDNaztokM=">ACfnicdVHbTtAEF275dKUQmgfedkSgbjIwU4rwQtSJF6QKlVBkIAUB2u9mYQV6wu7Y9TI8mfwY7z1W3hnQsCmo52pdE5c2Zmz4apFBpd969lf/i4sLi0/KnyeXL6lp1/WtHJ5ni0OaJTNRVyDRIEUMbBUq4ShWwKJRwGd6elPzlPSgtkvgCRyn0IjaMxUBwhgYKqg+dIPcR/mDOmZRFQbeP6Tlc587dReFHDG8MnP8udvqBt0sd+quk1HuqsUt935zKS7M0w0mveQJnrHDmznHKQZWgWvPq7jo/5MamUYrqD76/YRnEcTIJdO67kp9nKmUHAJRcXPNKSM37IhdE0aswh0Lx/bV9Atg/TpIFHmxkjH6GtFziKtR1FoKstN9XuBOdx3QwHR71cxMYNiPlk0CTFBNa/gXtCwUc5cgkjCthdqX8hinG0fxYaYI7e/K/ycyETqPu/ag3zn7Wms2pHctkg2ySHeKRQ9Ikp6RF2oSTJ+u7tWft28Teth37YFJqW1PN/Im7KNnCW2+Pg=</latexit> FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FINANCIAL INSTRUMENTS 20.00 Price ($) Put Options 18.00 16.00 14.00 12.00 10.00 8.00 6.00 Put (30 Days) Putl (60 Days) 4.00 Putl (90 Days) Put (Expiration) 2.00 0.00 80 85 90 95 100 105 110 115 120 Stock Price/Index Level 7 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FINANCIAL INSTRUMENTS ▸ Pricing of European Call & Puts can be determined analytically (under various assumptions) ▸ Black-Scholes-Merton (BSM) Formula: V call = Se − qT N ( d 1 ) − Ke − rT N ( d 2 ) V put = Ke − rT N ( − d 2 ) − Se − qT N ( − d 1 ) r − q + σ 2 ✓ ◆ � 1 ln S d 1 = T K + √ 2 T σ √ d 2 = d 1 − σ T 8 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES IMPLIED VOLATILITY ▸ A measure of uncertainty/fear in the market ▸ Observe prices in the market ▸ Use BSM to solve for volatility ▸ Not easy to invert the BSM formula ▸ For every K and T, solve BSM formula numerically to determine implied volatility 9 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES IMPLIED VOLATILITY 10 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES IMPLIED VOLATILITY SURFACE ▸ Required input to price options correctly ▸ Not only vanilla options but also other exotic kinds ▸ Traders constantly monitor volatility (mark their vol. surface) ▸ Frequent updates when markets are changing rapidly ▸ Rely on this volatility surface to price OTC instruments 11 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES PROBLEM DESCRIPTION ▸ Monitor the market (indices, basket of indices, stocks, etc) periodically ▸ Construct/Update (mark) the volatility surface using standard options available on the exchange ▸ Perform any post-processing of the volatility surface (institution/security dependent) ▸ Use volatility to price OTC instruments automatically ▸ Adjust bid/ask price (as appropriate based on risk capacity) 12 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FRET PROTOTYPE SETUP 13 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES FRET PROTOTYPE SETUP ▸ Google Compute Engine ▸ G1 Small (1 vCPU, 1.7 GB Memory) ▸ Ubuntu 18.04 ▸ Apache 2 & Flask ▸ Edge Server ▸ VM running on Windows 7 Host ▸ Ubuntu 18.04 ▸ Apache 2 & Flask ▸ Client Computer: MacBook Pro ▸ Network Connection: 25MBit Downstream / 10MBit Upstream 14 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES COMPUTATIONS — CLOUD ▸ Download data from data provider (Yahoo! Finance) ▸ Construct Volatility Surface ▸ Process client request ▸ Calculate option value ▸ Calculate option greeks (sensitivity) ▸ Send results back in json format 15 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES COMPUTATIONS — EDGE ▸ Cloud/Edge ▸ Cloud Server downloads data from data provider (Yahoo! Finance) ▸ Build the implied volatility surface ▸ Pushes to Edge Server periodically ▸ Client makes pricing request to Edge server ▸ Edge server process client request ▸ Calculate option value ▸ Calculate option greeks (sensitivity) ▸ Send results back in json format 16 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES REQUEST & RESPONSE http://35.226.6.170/price_options?payload=^GSPC_C3000D30 {"^GSPC_C3000D30": {"Value": 169.88138974993626, "Delta": 0.8140232196141809, "Gamma": 0.0014867304429613294, "Vega": 287.143372474178, "Theta": 216.82667049055874, "Rho": 282.02900716806903 } } 17 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES LATENCY COMPARISON (S&P 500) Average Round Trip Times for S&P 500 Options 4 Time (s) 3.5 3 2.5 2 1.5 1 0.5 0 327 533 952 1775 3459 6807 13596 27063 Cloud 2.6548 2.791 2.7091 2.6559 2.9362 3.1173 3.4135 3.5967 Edge 1.5754 2.0735 1.5624 1.6628 1.6774 1.8764 2.1527 2.7127 ▸ 25% Improvement (128 options) 18 FRET.key - December 8, 2019
FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES LATENCY COMPARISON (AAPL) Average Round Trip Time for AAPL Options 6 Time (s) 5 4 3 2 1 0 327 533 952 1775 3459 6807 13596 27063 Cloud 4.2652 4.2043 4.1631 4.1953 4.3556 4.4231 4.8221 5.1224 Edge 1.5152 1.4714 1.4796 1.4703 1.5928 1.7974 2.1032 2.737 ▸ 46% Improvement (128 options)! 19 FRET: FOG COMPUTING FOR REALTIME EXOTIC TRADES COMPARISON AT 99TH PERCENTILE RTT [S&P 500 CLOUD] RTT [S&P 500 EDGE] 1.0 1.0 0.9 0.9 0.8 0.8 0.7 0.7 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0.0 0.0 2 2.5 3 3.5 4 3 3.5 4 4.5 5 5.5 99th Percentile @ 4.61s 99th Percentile @ 3.48s 20 FRET.key - December 8, 2019
Recommend
More recommend