Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

数据预处理

金融市场的日期和货币数据

在运行分析之前,数据的表示形式和质量至关重要。通常需要将金融数据的格式转换为标准格式。此工具箱提供了一组工具来整理和转换金融数据以进行分析。

函数

全部展开

now当前日期和时间作为日期序列值
today当前日期
datefindIndices of dates in matrix
datevec将日期和时间转换为分量向量
datetime表示时间点的数组
day月中第几天
eomdate(Not recommended; use dateshift) Last date of month
hour
lweekdateDate of last occurrence of weekday in month
second日期或时间的秒数
minute
month日期的月份
months(Not recommended; use between) Number of whole months between dates
nweekdateDate of specific occurrence of weekday in month
weeknum(Not recommended; use week) Week in year
year日期年份
yeardaysNumber of days in year
date2timeTime and frequency from dates
datedispDisplay date entries
datenum将日期和时间转换为日期序列值
datestr将日期和时间转换为字符串格式
m2xdate(Not recommended; use exceltime) MATLAB date to Excel serial date number
time2dateDates from time and frequency
uicalendarGraphical calendar
x2mdateExcel 日期序列值转 MATLAB 日期序列值或日期时间格式
busdateNext or previous business day
busdaysBusiness days for given period
datemnthDate of day in future or past month
datewrkdyDate of future or past workday
days252busNumber of business days between dates
days360Days between dates based on 360-day year
days360eDays between dates based on 360-day year (European)
days360isdaDays between dates based on 360-day year (International Swap Dealer Association (ISDA) compliant)
days360psaDays between dates based on 360-day year (Public Securities Association (PSA) compliant)
days365基于一年 365 天的日期之间的天数
daysact日期之间的实际天数
daysaddDate away from starting date for any day-count basis
daysdifDays between dates for any for any day-count basis
fbusdateFirst business date of month
isbusdayTrue for dates that are business days
lbusdateLast business date of month
quarter
thirdwednesdayFind third Wednesday of month
wrkdydifNumber of working days between dates
yearfrac计算日期之间的天数占全年的比例
createholidaysCreate trading calendars
holidaysHolidays and nontrading days
nyseclosuresNew York Stock Exchange closures from 1885 to 2070
addBusinessCalendarAdd business calendar awareness to timetables
accrfrac应计天数占付息周期的比例
cpncountCoupon payments remaining until maturity
cpndatenNext coupon date for fixed-income security
cpndatenqNext quasi-coupon date for fixed-income security
cpndatepqPrevious quasi-coupon date for fixed-income security
cpndatepPrevious coupon date for fixed-income security
cpndaysnNumber of days to next coupon date
cpndayspNumber of days since previous coupon date
cpnperszNumber of days in coupon period
cur2fracDecimal currency values to fractional values
cur2str银行格式文本
dec2thirtytwoDecimal to thirty-second quotation
frac2curFractional currency value to decimal value
thirtytwo2decThirty-second quotation to decimal

主题