Function Reference


DatesWork with dates
Currency and PriceWork with currency and price data
Financial Data ChartsCreate charts
Cash FlowsWork with cash flows
Fixed-Income SecuritiesWork with fixed-income securities
PortfoliosAnalyze and measure performance for portfolios
Financial StatisticsPerform statistical analysis of financial data
DerivativesPrice and analyze derivatives
GARCH ProcessesIntroduce GARCH analysis
Financial Time Series Object and File ConstructionFunctions for creating financial time series
Financial Time Series ArithmeticArithmetic in financial time series
Financial Time Series MathMathematical calculations in financial time series
Financial Time Series Descriptive StatisticsStatistics in financial time series
Financial Time Series UtilityUtility work with financial time series
Financial Time Series Data TransformationData transformations of financial time series
Financial Time Series IndicatorWork with indicators for financial time series
Financial Time Series GUIWork with Financial Time Series GUI
Financial Time Series ToolWork with Financial Time Series Tool

Dates

Current Time and DateWork with current date and time
Date and Time ComponentsCompute dates and times
Date ConversionConvert dates
Financial DatesCompute financial dates
Coupon Bond DatesCompute coupon bond dates

Current Time and Date

nowCurrent date and time
todayCurrent date

Date and Time Components

datefindIndices of date numbers in matrix
datevecDate components
dayDay of month
eomdateLast date of month
eomdayLast day of month
hourHour of date or time
lweekdateDate of last occurrence of weekday in month
minuteMinute of date or time
monthMonth of date
monthsNumber of whole months between dates
nweekdateDate of specific occurrence of weekday in month
secondSeconds of date or time
weekdayDay of week
yearYear of date
yeardaysNumber of days in year

Date Conversion

date2timeTime and frequency from dates
datedispDisplay date entries
datenumCreate date number
datestrCreate date string
dec2thirtytwoDecimal to thirty-second quotation
m2xdateMATLAB serial date number to Excel serial date number
thirtytwo2decThirty-second quotation to decimal
time2dateDates from time and frequency
uicalendarGraphical calendar
x2mdateExcel serial date number to MATLAB serial date number

Financial Dates

busdateNext or previous business day
busdaysBusiness days in serial date format
createholidaysCreate trading calendars
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 day-count basis
fbusdateFirst business date of month
holidaysHolidays and nontrading days
isbusdayTrue for dates that are business days
lbusdateLast business date of month
thirdwednesdayFind third Wednesday of month
wrkdydifNumber of working days between dates
yearfracFraction of year between dates

Coupon Bond Dates

accrfracFraction of coupon period before settlement
cfamountsCash flow and time mapping for bond portfolio
cfdatesCash flow dates for fixed-income security
cfportPortfolio form of cash flow amounts
cftimesTime factors corresponding to bond cash flow dates
cpncountCoupon payments remaining until maturity
cpndatenNext coupon date for fixed-income security
cpndatenqNext quasi coupon date for fixed income security
cpndatepPrevious coupon date for fixed-income security
cpndatepqPrevious quasi 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

Currency and Price

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

Financial Data Charts

bar, barhBar chart
bar3, bar3h3-D bar chart
bollingBollinger band chart
candleCandlestick chart
candle (fts)Time series candle plot
chartftsInteractive display
dateaxisConvert serial-date axis labels to calendar-date axis labels
highlowHigh, low, open, close chart
highlow (fts)Time series High-Low plot
kagiKagi chart
linebreakLine break chart
movavgLeading and lagging moving averages chart
plotPlot data series
pointfigPoint and figure chart
priceandvolPrice and volume chart
renkoRenko chart
volareaPrice and volume chart

Cash Flows

AnnuitiesWork with annuities
Amortization and DepreciationWork with amortization and depreciation
Present ValueWork with present values
Future ValueWork with future values
Payment CalculationsWork with payment calculations
Rates of ReturnWork with rates of return
Cash Flow SensitivitiesWork with cash flow sensitivities

Annuities

annuratePeriodic interest rate of annuity
annutermNumber of periods to obtain value

Amortization and Depreciation

amortizeAmortization schedule
depfixdbFixed declining-balance depreciation schedule
depgendbGeneral declining-balance depreciation schedule
deprdvRemaining depreciable value
depsoydSum of years' digits depreciation
depstlnStraight-line depreciation schedule

Present Value

pvfixPresent value with fixed periodic payments
pvvarPresent value of varying cash flow

Future Value

fvdiscFuture value of discounted security
fvfixFuture value with fixed periodic payments
fvvarFuture value of varying cash flow

Payment Calculations

payadvPeriodic payment given number of advance payments
payoddPayment of loan or annuity with odd first period
payperPeriodic payment of loan or annuity
payuniUniform payment equal to varying cash flow

Rates of Return

effrrEffective rate of return
elpmCompute expected lower partial moments for normal asset returns
irrInternal rate of return
mirrModified internal rate of return
nomrrNominal rate of return
taxedrrAfter-tax rate of return
xirrInternal rate of return for nonperiodic cash flow

Cash Flow Sensitivities

cfconvCash flow convexity
cfdurCash-flow duration and modified duration

Fixed-Income Securities

Accrued InterestWork with accrued interest
PricesWork with prices
Term Structure of Interest RatesWork with term structure of interest rates
YieldsWork with yields
SpreadsWork with spreads
Interest Rate SensitivitiesWork with interest rate sensitivities

Accrued Interest

acrubondAccrued interest of security with periodic interest payments
acrudiscAccrued interest of discount security paying at maturity

Prices

bndpricePrice fixed income security from yield to maturity
prdiscPrice of discounted security
prmatPrice with interest at maturity
prtbillPrice of Treasury bill

Term Structure of Interest Rates

disc2zeroZero curve given discount curve
fwd2zeroZero curve given forward curve
prbyzeroPrice bonds in portfolio by set of zero curves
pyld2zeroZero curve given par yield curve
tbl2bondTreasury bond parameters given Treasury bill parameters
tr2bondsTerm-structure parameters given Treasury bond parameters
zbtpriceZero curve bootstrapping from coupon bond data given price
zbtyieldZero curve bootstrapping from coupon bond data given yield
zero2discDiscount curve given zero curve
zero2fwdForward curve given zero curve
zero2pyldPar yield curve given zero curve

Yields

beytbillBond equivalent yield for Treasury bill
bndyieldYield to maturity for fixed income security
discrateBank discount rate of money market security
ylddiscYield of discounted security
yldmatYield with interest at maturity
yldtbillYield of Treasury bill

Spreads

bndspreadStatic spread over spot curve

Interest Rate Sensitivities

bndconvpBond convexity given price
bndconvyBond convexity given yield
bnddurpBond duration given price
bndduryBond duration given yield

Portfolios

Portfolio AnalysisPerform portfolio analysis
Performance MetricsCalculate performance metrics

Portfolio Analysis

abs2activeConvert constraints from absolute to active format
active2absConvert constraints from active to absolute format
arith2geomArithmetic to geometric moments of asset returns
corr2covConvert standard deviation and correlation to covariance
cov2corrConvert covariance to standard deviation and correlation coefficient
ewstatsExpected return and covariance from return time series
frontconMean-variance efficient frontier
frontierRolling efficient frontier
geom2arithGeometric to arithmetic moments of asset returns
holdings2weightsPortfolio holdings into weights
pcalimsLinear inequalities for individual asset allocation
pcgcompLinear inequalities for asset group comparison constraints
pcglimsLinear inequalities for asset group minimum and maximum allocation
pcpvalLinear inequalities for fixing total portfolio value
periodicreturnsPeriodic total returns from total return prices
portallocOptimal capital allocation to efficient frontier portfolios
portconsPortfolio constraints
portoptPortfolios on constrained efficient frontier
portrandRandomized portfolio risks, returns, and weights
portrorPortfolio expected rate of return
portsimMonte Carlo simulation of correlated asset returns
portstatsPortfolio expected return and risk
portvarVariance for a portfolio of assets
portvriskPortfolio value at risk
ret2tickConvert return series to price series
ret2tick (fts)Convert return series to price series for time series object
selectreturnPortfolio configurations from 3-D efficient frontier
targetreturnPortfolio weight accuracy
tick2retConvert price series to return series
tick2ret (fts)Convert price series to return series for time series object
totalreturnpriceTotal return price time series
weights2holdingsPortfolio values and weights into holdings

Performance Metrics

emaxdrawdownCompute expected maximum drawdown for Brownian motion
inforatioCalculate information ratio for one or more assets
lpmCompute sample lower partial moments of data
maxdrawdownCompute maximum drawdown for one or more price series
portalphaCompute risk-adjusted alphas and returns for one or more assets
sharpeCompute Sharpe ratio for one or more assets

Financial Statistics

Expectation Conditional MaximizationWork with expectation conditional maximization
Multivariate Normal RegressionWork with multivariate normal regression
Expectation Conditional Maximization – Multivariate Normal RegressionWork with expectation conditional maximization and multivariate normal regression
Expectation Conditional Maximization – Least-Squares RegressionWork with least-squares regression
Seemingly Unrelated RegressionWork with unrelated regression

Expectation Conditional Maximization

ecmnfishFisher information matrix
ecmnhessHessian of negative log-likelihood function
ecmninitInitial mean and covariance
ecmnmleMean and covariance of incomplete multivariate normal data
ecmnobjMultivariate normal negative log-likelihood function
ecmnstdStandard errors for mean and covariance of incomplete data

Multivariate Normal Regression

mvnrfishFisher information matrix for multivariate normal or least-squares regression
mvnrmleMultivariate normal regression (ignore missing data)
mvnrobjLog-likelihood function for multivariate normal regression without missing data
mvnrstdEvaluate standard errors for multivariate normal regression model

Expectation Conditional Maximization – Multivariate Normal Regression

ecmmvnrfishFisher information matrix for multivariate normal regression model
ecmmvnrmleMultivariate normal regression with missing data
ecmmvnrobjLog-likelihood function for multivariate normal regression with missing data
ecmmvnrstdEvaluate standard errors for multivariate normal regression model

Expectation Conditional Maximization – Least-Squares Regression

ecmlsrmleLeast-squares regression with missing data
ecmlsrobjLog-likelihood function for least-squares regression with missing data

Seemingly Unrelated Regression

convert2surConvert multivariate normal regression model to seemingly unrelated regression (SUR) model

Derivatives

Option Valuation and SensitivityWork with option valuation and sensitivity

Option Valuation and Sensitivity

binpriceBinomial put and call pricing
blkimpvImplied volatility for futures options from Black's model
blkpriceBlack's model for pricing futures options
blsdeltaBlack-Scholes sensitivity to underlying price change
blsgammaBlack-Scholes sensitivity to underlying delta change
blsimpvBlack-Scholes implied volatility
blslambdaBlack-Scholes elasticity
blspriceBlack-Scholes put and call option pricing
blsrhoBlack-Scholes sensitivity to interest rate change
blsthetaBlack-Scholes sensitivity to time-until-maturity change
blsvegaBlack-Scholes sensitivity to underlying price volatility
opprofitOption profit

GARCH Processes

Univariate GARCH ProcessesWork with univariate GARCH processes

Univariate GARCH Processes

ugarchUnivariate GARCH(P,Q) parameter estimation with Gaussian innovations
ugarchllfLog-likelihood objective function of univariate GARCH(P,Q) processes with Gaussian innovations
ugarchpredForecast conditional variance of univariate GARCH(P,Q) processes
ugarchsimSimulate univariate GARCH(P,Q) process with Gaussian innovations

Financial Time Series Object and File Construction

ascii2ftsCreate financial time series object from ASCII data file
fintsConstruct financial time series object
fts2asciiWrite elements of time-series data into ASCII file
fts2matConvert to matrix
mergeMerge multiple financial time series objects

Financial Time Series Arithmetic

endLast date entry
horzcatConcatenate financial time series objects horizontally
lengthGet number of dates (rows)
minusFinancial time series subtraction
mrdivideFinancial time series matrix division
mtimesFinancial time series matrix multiplication
plusFinancial time series addition
powerFinancial time series power
rdivideFinancial time series division
sizeNumber of dates and data series
subsasgnContent assignment
subsrefSubscripted reference
timesFinancial time series multiplication
uminusUnary minus of financial time series object
uplusUnary plus of financial time series object
vertcatConcatenate financial time series objects vertically

Financial Time Series Math

cumsumCumulative sum
expExponential values
histHistogram
logNatural logarithm
log10Common logarithm
log2Base 2 logarithm
maxMaximum value
meanArithmetic average
minMinimum value
stdStandard deviation

Financial Time Series Descriptive Statistics

corrcoefCorrelation coefficients
covCovariance matrix
isempty True for empty financial time series objects
nancovCovariance ignoring NaNs
nanmaxMaximum ignoring NaNs
nanmeanMean ignoring NaNs
nanmedianMedian ignoring NaNs
nanminMinimum ignoring NaNs
nanstdStandard deviation ignoring NaNs
nansumSum ignoring NaNs
nanvarVariance ignoring NaNs
varVariance

Financial Time Series Utility

chfieldChange data series name
eq (fts)Multiple financial times series object equality
extfieldData series extraction
fetchData from financial time series object
fieldnamesGet names of fields
freqnumConvert string frequency indicator to numeric frequency indicator
freqstrConvert numeric frequency indicator to string representation
ftsboundStart and end dates
ftsinfoFinancial time series object information
ftsuniqDetermine uniqueness
getfieldContent of specific field
getnameidxFind name in list
iscompatibleStructural equality
isequalMultiple object equality
isfieldCheck whether string is field name
issortedCheck whether dates and times are monotonically increasing
rmfieldRemove data series
setfieldSet content of specific field
sortftsSort financial time series

Financial Time Series Data Transformation

boxcoxBox-Cox transformation
convert2surConvert multivariate normal regression model to seemingly unrelated regression (SUR) model
converttoConvert to specified frequency
diffDifferencing
filltsFill missing values in time series
filterLinear filtering
lagtsLag time series object
leadtsLead time series object
peravgPeriodic average of FINTS object
resampletsDownsample data
smoothtsSmooth data
toannualConvert to annual
todailyConvert to daily
todecimalFractional to decimal conversion
tomonthlyConvert to monthly
toquarterlyConvert to quarterly
toquotedDecimal to fractional conversion
tosemiConvert to semiannual
toweeklyConvert to weekly
tsmovavgMoving average

Financial Time Series Indicator

adlineAccumulation/Distribution line
adoscAccumulation/Distribution oscillator
bollingerTime series Bollinger band
chaikoscChaikin oscillator
chaikvolatChaikin volatility
fpctkdFast stochastics
hhighHighest high
llowLowest low
macdMoving Average Convergence/Divergence (MACD)
medpriceMedian price
negvolidxNegative volume index
onbalvolOn-Balance Volume (OBV)
posvolidxPositive volume index
prcrocPrice rate of change
pvtrendPrice and Volume Trend (PVT)
rsindexRelative Strength Index (RSI)
spctkdSlow stochastics
stochoscStochastic oscillator
tsaccelAcceleration between periods
tsmomMomentum between periods
typpriceTypical price
volrocVolume rate of change
wcloseWeighted close
willadWilliams Accumulation/Distribution line
willpctrWilliams %R

Financial Time Series GUI

ftsguiFinancial time series GUI

Financial Time Series Tool

ftstoolFinancial time series tool
  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS