Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Data Preprocessing

Financial market data for dates and currencies

The representation and quality of data is essential before running an analysis. Financial data is often in formats that require conversion to standard formats. This toolbox provides a suite of tools to organize and transform financial data for analysis.

Functions

nowCurrent date and time as serial date number
todayCurrent date
datefindIndices of dates in matrix
datevecConvert date and time to vector of components
datetimeArrays that represent points in time
dayDay of month
eomdateLast date of month
hourHour of date or time
lweekdateDate of last occurrence of weekday in month
secondSeconds of date or time
minuteMinute of date or time
monthMonth of date
monthsNumber of whole months between dates
nweekdateDate of specific occurrence of weekday in month
weeknumWeek in year
yearYear of date
yeardaysNumber of days in year
date2timeTime and frequency from dates
datedispDisplay date entries
datenumConvert date and time to serial date number
datestrConvert date and time to string format
m2xdateMATLAB date to Excel serial date number
time2dateDates from time and frequency
uicalendarGraphical calendar
x2mdateExcel serial date number to MATLAB serial date number or datetime format
busdateNext or previous business day
busdaysBusiness days for given period
datemnthDate of day in future or past month
datewrkdyDate of future or past workday
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)
days365Days between dates based on 365-day year
daysactActual number of days between dates
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
quarterReturns the quarter of given date
thirdwednesdayFind third Wednesday of month
wrkdydifNumber of working days between dates
yearfracFraction of year between dates
createholidaysCreate trading calendars
holidaysHolidays and nontrading days
nyseclosuresNew York Stock Exchange closures from 1885 to 2070
accrfracFraction of coupon period before settlement
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
cur2strBank-formatted text
dec2thirtytwoDecimal to thirty-second quotation
frac2curFractional currency value to decimal value
thirtytwo2decThirty-second quotation to decimal

Topics

Handle and Convert Dates

Handle and convert date character vectors and serial date numbers, holidays, and cash-flow dates.

Was this topic helpful?