Data Preprocessing
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
Date and Time Component Formats
Date Conversion
Business Days
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 |
Trading Calendar
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 |
Coupon Bond Dates
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 |
Currency and Price Conversion
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
- Handle and Convert Dates
Handle and convert date character vectors and serial date numbers, holidays, and cash-flow dates.
- Trading Calendars User Interface
Using the Trading Calendars user interface to manage holidays.
- UICalendar User Interface
Using
uicalendar
管理日期。
Related Information
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina(Español)
- Canada(English)
- United States(English)
Europe
- Belgium(English)
- Denmark(English)
- Deutschland(Deutsch)
- España(Español)
- Finland(English)
- France(Français)
- Ireland(English)
- Italia(Italiano)
- Luxembourg(English)
- Netherlands(English)
- Norway(English)
- Österreich(Deutsch)
- Portugal(English)
- Sweden(English)
- Switzerland
- United Kingdom(English)