Main Content

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

expand all

now Current date and time as serial date number
datefind Indices of dates in matrix
datevec Convert date and time to vector of components
datetim Arrays that represent points in time
yeardays Number of days in year
date2time Time and frequency from dates
datedisp Display date entries
datenum Convert date and time to serial date number
datestr Convert date and time to string format
time2date Dates from time and frequency
uicalendar Graphical calendar
busdate Next or previous business day
busdays Business days for given period
datemnth Date of day in future or past month
datewrkdy Date of future or past workday
days252bus Number of business days between dates
days360 Days between dates based on 360-day year
days360e Days between dates based on 360-day year (European)
days360isda Days between dates based on 360-day year (International Swap Dealer Association (ISDA) compliant)
days360psa Days between dates based on 360-day year (Public Securities Association (PSA) compliant)
days365 Days between dates based on 365-day year
daysact Actual number of days between dates
daysadd 日期从起始日期any day-count basis
daysdif Days between dates for any for any day-count basis
fbusdate First business date of month
isbusday True for dates that are business days
lbusdate Last business date of month
thirdwednesday Find third Wednesday of month
wrkdydif Number of working days between dates
yearfrac Fraction of year between dates
createholidays Create trading calendars
holidays Holidays and nontrading days
nyseclosures New York Stock Exchange closures from 1885 to 2070
addBusinessCalendar Add business calendar awareness to timetables
accrfrac Fraction of coupon period before settlement
cpncount Coupon payments remaining until maturity
cpndaten Next coupon date for fixed-income security
cpndatenq Next quasi-coupon date for fixed-income security
cpndatepq Previous quasi-coupon date for fixed-income security
cpndatep Previous coupon date for fixed-income security
cpndaysn Number of days to next coupon date
cpndaysp Number of days since previous coupon date
cpnpersz Number of days in coupon period
cur2frac Decimal currency values to fractional values
cur2str Bank-formatted text
dec2thirtytwo Decimal to thirty-second quotation
frac2cur Fractional currency value to decimal value
thirtytwo2dec Thirty-second quotation to decimal

Topics