-
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
Category Archives: 读书笔记
金融仿真笔记(8)-利率模型
利率模型,这东西貌似挺麻烦,利率模型可以分为均衡模型和无套利模型,顺便说一句,套利就是无风险收益,一定是无风险,才能说套利。先说均衡模型,它是以利率期限结构为输出,单因素模型: dr = m(r)dt + s(r)dw,r就是短期利率,m(r)就是说给定的r下,利率随时间的变动量,也可以叫漂移率,当然参数r说,s(r)其实随机波动率,方差率之类的量。这里面m,s不同的取值方法,又有三种模型,m(r) = mu r, s(r) = sigma r Rendleman and Batter modelm(r) = a(b-r), s(r) = sigma , Vasicek modelm(r) = a(b-r), s(r) = sigmasqrt{r}, CIR model 无套利的模型,利率期限结构为输出,HL, HW, BK, BDT, HJMHW, BK, BDT, HJM。 … Continue reading
金融仿真笔记(7)
1.fixedbyzero 用零息债券的即期利率给固定票据定价,Price = fixedbyzero(RateSpec, CouponRate, Settle, Maturity)。相应的也有floatbyzero,浮动利率票据 。但是这里的参数就不同了, Price = floatbyzero(RateSpec, Spread, Settle, Maturity),spread表示在零息债券年化收益上方多少个基点。 2.swapbyzero 给互换定价,[Price, SwapRate] = swapbyzero(RateSpec, LegRate, Settle, Maturity),LegRate是一个N*2的矩阵,形式是[CouponRate Spread] or [Spread CouponRate],第一列表示收入,第二列表示支出,swapRate当互换价格为零时,需要设定的固定的利率。 3.以上的所有函数有一个通式:intenvprice和intenvsens.Computes prices for instruments against a set of zero coupon bond rate curve(s). INTENVPRICE … Continue reading
最近脑袋锈掉,编程能力大幅下滑
最早接触编程已经是遥远的高二,但是同学的文曲星支持一个简陋的GVbasic,自己拿了同学的东西,在上面玩的不亦乐乎,也没有接触什么算法,所有计算步骤全是自己凭空摸索,当时最喜欢的语句是goto,基本上是用这个实现if,while之类的循环判断,也导致了自己现在编程总有这种坏思想。所以这东西是不能自己瞎来的。 上了大学,课上学的是C++,编程课学得一般,不好不坏,给的任务也都能完成,但也没有什么出彩的地方,毕竟和计算机专业相关度不高,对这个能力也没有更高要求,不过自己对语言的兴趣一直没减,自己也看了一些书,不过貌似现在也忘了差不多了。后来的数据结构,学得应该还算不错,编的程序自己也还挺满意,只是学了之后没有什么用途,也就忘得快了。 然后开始接触matlab,因为科学计算和画图功能很强大,一直不停用,不停学,感觉学得挺慢,主要也是钻的不够,不够重视,以为这东西就是自己的兴趣,没有当正事搞,现在觉得自己该重视起来之后,发现自己现在也就是处在运用函数的阶段,编个求质数的函数都到处出毛病,该死,当年还曾用汇编语言求质数,貌似也就是两节课上自己也就解决了,现在脑袋真的锈掉了。 %求质数 function [Primelist]=prime(n) k=0; for ii=5:n for jj=3:ii-1 if (ii/jj)==floor(ii/jj) break; end end if jj==ii-1 k=k+1; Primelist(k)=ii; end end