Gaussian curve for a given stock price and IV with d3.js

时间:2016-04-04 06:01:34

标签: d3.js statistics data-visualization gaussian quantitative-finance

I would like to create an options trading tool that first requires a gaussian curve ( implemented with d3.js ), that displays a probability of the stock being above or below a given price ( [In-the-Money] ) ITM price.

If a stock has a price of 100 dollars, and has a 1 year implied volatility ( IV ) of 20%, then the stock is said to have a 68% chance of being between $80 and $120 at the end of the year (100 +/- 20)... Basically, IV ( implied volatility ) tells the 1 standard deviation ( StDEV ) move to either side of the stock price.

If I understand correctly, variance = ( StDEV )^2

So, if a stock has an actual price of $100 and a 1 StDEV ( standard deviation ) expected move of 20 dollars in either direction, the variance would be .04 ( .2 ^2 ).

Q1: Is this correct?

Q2: And would the mean of the model be 100 dollars ( gaussian curves like the one below generally require a variance and mean )?

Generally, Gaussian bell curves display the mean as the peak of the curve, and I know that the stock price should be in the middle of the curve, as gaussian random walk states that a stock has a 50% chance of ending up above or below the current price after a given time period.

So, if a stock costs $100 dollars and has an IV of 20, the stock has a 50% chance of ending up above $100 in a year, and a 50% percent chance of ending up below $100 in a year and there is an 82% chance ( 1 of the standard deviation ) that it will end up below $120 with only an 18% chance of ending up above $120.

My question is:

Q3: How would I modulate a d3-graph like the one in the example below以插入股票价格和隐含波动率(1 SD移动)来绘制股票价格高于或低于某个特定股票的可能性价格?

我尝试用高斯函数中的mean替换股票价格,IV代替sigma,但它不起作用。

Q4: 如何更改高斯函数以适应股票价格和IV

我知道这些主题会变得复杂,但请尽量保持简单。

http://bl.ocks.org/phil-pedruco/88cb8a51cdce45f13c7e

1 个答案:

答案 0 :(得分:0)

https://media.licdn.com/mpr/mpr/jc/AAEAAQAAAAAAAAbcAAAAJDE0ZWE1NDAwLTE0YTctNGM4Ni05ZmZiLTNhYWQyMmU4MTNiNQ.png

A1: ,Drew,微积分是正确的

A2: 是和否ITM是由非固定多代理进程外部开发的概念值(市场规则z),而分布的mean是与这种分布的相当静态定义的组成相关的固定值(无论是高斯还是其他)。

A3: 在很大程度上取决于您希望撰写的具体功能。集成到3d.js "Controller-part"智能域特定的可视化工具(而MVC - 术语在许多情况下被重复使用,它来自Xerox&# 39; PARCplace系统和Smalltalk上世纪80年代后期,直到现在很好地描绘了GUI演示框架的内部专业化层面,所以请原谅我的回忆和我对那些勇敢的人的尊重帕洛阿尔托研究中心Smalltalk Nest)。那个(Controller-part)设计将引入更多的重新工作,而不是特定于域的Model-part(对UI输入进行实际处理)。(

A4: 只需提供您自己的特定于域名的DataSET,根据选项定价的定量模型计算,而不是合成高斯。

Options Pricing Models ZOO

nota-bene: 您可能会对彻底的争论感兴趣,为什么市场绝不是随意散步,由Stuart Gordon REID详细阐述和呈现。
- Random walk hypothesis and it's importance to quantitative finance
- Random walks down Wall Street ( also for derivatives )
一个人根本不相信所有的推文。

享受Quant-worlds,Drew。