-
Recent Posts
Recent Comments
- 店小二 on 论三座大山
- L on SVI模型拟合
- acnkid on 俄乌战争的回顾及其他
- acnkid on 外卖小哥的收入以及其他
- acnkid on 外卖小哥的收入以及其他
Archives
- June 2024
- April 2024
- January 2024
- October 2023
- September 2023
- August 2023
- June 2023
- May 2023
- February 2023
- January 2023
- October 2022
- September 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- December 2021
- October 2021
- September 2021
- August 2021
- June 2021
- May 2021
- April 2021
- January 2021
- December 2020
- September 2020
- August 2020
- May 2020
- April 2020
- May 2019
- March 2019
- February 2019
- January 2019
- September 2018
- July 2018
- May 2018
- April 2018
- December 2017
- November 2017
- August 2017
- July 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- September 2016
- August 2016
- July 2016
- June 2016
- March 2016
- January 2016
- October 2015
- July 2015
- May 2015
- November 2014
- August 2014
- July 2014
- March 2014
- February 2014
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- March 2013
- January 2013
- December 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- June 2010
- May 2010
- October 2009
- July 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- April 2008
- November 2007
- April 2007
Categories
Meta
Monthly Archives: September 2018
SVI模型拟合
波动率模型是学界搞期权的重点,BS模型中,使用的是固定的波动率。现在提的较多的是局部波动率模型和随机波动率模型。局部波动率模型是随机波动率模型的一种简化,将波动率定义为标的价格S和时间t的函数sigma(S,t),随机波动率模型中,对波动率描述存在随机项(独立于价格中的随机项)。 局部波动率模型中,常用的是SVI模型(stochastic volatility inspired),SVI模型本质上是描述了波动率微笑曲线,并且增加了一些期权性质上的约束。 我前面研究过一次SVI模型,但由于对python里面最优化函数理解的不透,对外层使用了是穷举法,这个方法显然是不好的,只是让我初次了解这个模型的性质。最近部门一个实习生用matlab实现了一下这个模型,虽然拟合的结果并不是很好,但让我发现原来matlab里面的几个函数,如lsqlin就是二次非线性最优化,而fminsearch的函数,使用的就是Nelder-Mead Simplex方法。 实际上我以前虽然也用matlab做最优化,但是对里面的求解算法实在是没研究,反正直接用就好了。但前面自己用python摸索求解函数的时候,突然觉得自己根本不知道在python里面用什么函数去求解自己要解的最优化方程。 最初以为scipy里面应该有对应的最优化函数,后来发现matlab里面基本的lsqlin在scipy里面就没有实现,scipy最接近的是lsq_liner,但这个函数只能接受上下限,无法接受不等式方程约束,后来发现用凸优化报cvxopt才有希望。但是这个包里面也没有lsqlin函数,不过知识点到这里,搜索一下lsqlin+python关键词就能找到一个俄罗斯人贡献的用python实现的lsqlin代码了。 在这些知识点的基础上,我重新将自己的svi模型实现了一下。 首先是数据源格式 合约编码 行权日 行权日 剩余到期时间(日历日) 期权类型 标的收盘价 期权行权价 收盘中间价 10000887 20171227 2017-12-27 0.052082192 C 2.865 2.209 0.6624 10000888 20171227 2017-12-27 0.052082192 C 2.865 2.258 0.6135 10000889 20171227 2017-12-27 0.052082192 C 2.865 … Continue reading