-
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
Tag Archives: matlab
金融仿真笔记(2)
1.要点,需要把下载下来的数据,日期栏的单元格的格式都改为常规。 2.highlow,竹节图: 3.candle,k形图 老师说日期要提前一天,但这里我没提前,貌似也没有问题,而她提前了的,好像也是对的,我也没有进一步深究。但我看函数说明,按道理没有提前的必要啊。要不问一下?
金融仿真笔记(1)
虽然matlab我运用的次数相对而言已经不少,对其编程也有一点经验,但是关于matlab在金融方面的运用却非常少,很对针对金融上面的应用我都不算熟悉,今天课上算是比较有收获,记了一点笔记,整理一下。 1.如果不写输出变量,ans默认值是第一个输出变量,因为function运算的结果存在了临时空间,在向工作空间转化的时候,只取了第一个数 2.prod表示连乘,matlab函数有一个特点是对行进行运算,比如一个2*3的矩阵,prod后的结果就是1*3,在行上进行运算,结果是一个行向量。 3.x(:)是把矩阵的所有元素串成一串,应该是变成一个行向量然后进行处理的,行向量的顺序时先第一列,然后是第二列。。。 4.min(x,3)将向量x的每一个元素与3比较,min(x,[],1)最后一个1是维度控制符 5.randi(imax,n)范围0-imax内,随机分布的一个整数,randn正态分布,random(‘name’,A,B,C,m,n)通用分布 6.与excel的接口函数由xlsread和xlswrite,还是比较好用的吧。[num,txt,raw]=xlsread可以把字符和数字剥离开来 7.datenum(‘’)把日期转化为数字,7XX的一个数,datestr把7XX搞成可以识别的日期。m2xdate,是matlab格式的日期就是7XX的日期搞成excel的4XX的,两个日期的起点,我百度了一下,In the PC world, this date is January 1, 1900.x2mdate就是相反的操作了。 8.holidays是美国日期函数,可以自己设定自己的日期函数。BD = busdate(D, DIREC, HOL, WEEKEND).判断下一个交易日。 9.datexis画图时的坐标轴搞成时间,而不是数字。datexis(‘x’,13,’2010/08/31’)中间那个是选择日期格式好像。 10.以上都不是凶的,最凶的是我发现一个语句,直接可以获得网络上的估价数据。 fetch:c=yahoo; jpm=fetch(c,’jpm’,’close’,’2010/08/01’,’2010/08/31’)