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.

Financial Toolbox Functions

Alphabetical List By Category
abs2activeConvert constraints from absolute to active format
accrfracFraction of coupon period before settlement
acrubondAccrued interest of security with periodic interest payments
acrudiscAccrued interest of discount security paying at maturity
active2absConvert constraints from active to absolute format
addEqualityAdd linear equality constraints for portfolio weights to existing constraints
addGroupRatioAdd group ratio constraints for portfolio weights to existing group ratio constraints
addGroupsAdd group constraints for portfolio weights to existing group constraints
addInequalityAdd linear inequality constraints for portfolio weights to existing constraints
adlineAccumulation/Distribution line
adoscAccumulation/Distribution oscillator
amortizeAmortization schedule
annuratePeriodic interest rate of annuity
annutermNumber of periods to obtain value
arith2geomArithmetic to geometric moments of asset returns
ascii2ftsCreate financial time series object from ASCII file
autobinningPerform automatic binning of given predictors
bar, barhBar chart
bar3, bar3h3-D bar chart
beytbillBond equivalent yield for Treasury bill
bindataBinned predictor variables
bininfoReturn predictor’s bin information
binpriceBinomial put and call American option pricing using Cox-Ross-Rubinstein model
blkimpvImplied volatility for futures options from Black model
blkpriceBlack 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
bmBrownian motion models
bmConstruct Brownian motion models
bndconvpBond convexity given price
bndconvyBond convexity given yield
bnddurpBond duration given price
bndduryBond duration given yield
bndkrdurBond key rate duration given zero curve
bndpricePrice fixed-income security from yield to maturity
bndspreadStatic spread over spot curve
bndtotalreturnTotal return of fixed-coupon bond
bndyieldYield to maturity for fixed-income security
bollingBollinger band chart
bollingerTime series Bollinger band
bondDefaultBootstrapBootstrap default probability curve from bond prices
boxcoxBox-Cox transformation
busdateNext or previous business day
busdaysBusiness days for given period
candleCandlestick chart
candle (fts)Time series candle plot
cdaiAccrued interest on certificate of deposit
cdpricePrice of certificate of deposit
cdsbootstrapBootstrap default probability curve from credit default swap market quotes
cdspriceDetermine price for credit default swap
cdsrpv01 Compute risky present value of a basis point for credit default swap
cdsspreadDetermine spread of credit default swap
cdyieldYield on certificate of deposit (CD)
cevConstant Elasticity of Variance (CEV) models
cevConstruct Constant Elasticity of Variance (CEV) models
cfamountsCash flow and time mapping for bond portfolio
cfbyzeroPrice cash flows from set of zero curves
cfconvCash flow convexity
cfdatesCash flow dates for fixed-income security
cfdatesqQuasi-coupon dates for fixed-income security
cfdurCash-flow duration and modified duration
cfplotVisualize cash flows of financial instruments
cfportPortfolio form of cash flow amounts
cfpriceCompute price for cash flow given yield to maturity
cfspreadCompute spread over yield curve for cash flow
cftimesTime factors corresponding to bond cash flow dates
cfyieldCompute yield to maturity for cash flow given price
chaikoscChaikin oscillator
chaikvolatChaikin volatility
chartftsInteractive display
checkFeasibilityCheck feasibility of input portfolios against portfolio object
chfieldChange data series name
cirCox-Ingersoll-Ross mean-reverting square root diffusion models
cirConstruct Cox-Ingersoll-Ross mean-reverting square root diffusion models
convert2surConvert multivariate normal regression model to seemingly unrelated regression (SUR) model
converttoConvert to specified frequency
corr2covConvert standard deviation and correlation to covariance
corrcoefCorrelation coefficients
covCovariance matrix
cov2corrConvert covariance to standard deviation and correlation coefficient
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
createholidaysCreate trading calendars
creditexposuresCompute credit exposures from contract values
creditscorecardCreate creditscorecard object to build credit scorecard model
cumsumCumulative sum
cur2fracDecimal currency values to fractional values
cur2strBank-formatted text
date2timeTime and frequency from dates
dateaxisConvert serial-date axis labels to calendar-date axis labels
datedispDisplay date entries
datefindIndices of dates in matrix
datemnthDate of day in future or past month
datenumConvert date and time to serial date number
datestrConvert date and time to string format
datetimeArrays that represent points in time
datevecConvert date and time to vector of components
datewrkdyDate of future or past workday
dayDay of month
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
dec2thirtytwoDecimal to thirty-second quotation
depfixdbFixed declining-balance depreciation schedule
depgendbGeneral declining-balance depreciation schedule
deprdvRemaining depreciable value
depsoydSum of years' digits depreciation
depstlnStraight-line depreciation schedule
diffDifferencing
diffusionDiffusion-rate model component
diffusionConstruct diffusion-rate model components
disc2zeroZero curve given discount curve
discrateBank discount rate of money market security
displaypointsReturn points per predictor per bin
driftDrift-rate model component
driftConstruct drift-rate model components
ecmlsrmleLeast-squares regression with missing data
ecmmvnrfishFisher information matrix for multivariate normal regression model
ecmmvnrobjLog-likelihood function for multivariate normal regression with missing data
ecmmvnrstdEvaluate standard errors for multivariate normal regression model
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
effrrEffective rate of return
elpmCompute expected lower partial moments for normal asset returns
emaxdrawdownCompute expected maximum drawdown for Brownian motion
endLast date entry
eomdateLast date of month
eq (fts)Multiple financial times series object equality
estimateAssetMomentsEstimate mean and covariance of asset returns from data
estimateBoundsEstimate global lower and upper bounds for set of portfolios
estimateFrontierEstimate specified number of optimal portfolios on the efficient frontier
estimateFrontierByReturnEstimate optimal portfolios with targeted portfolio returns
estimateFrontierByRiskEstimate optimal portfolios with targeted portfolio risks
estimateFrontierLimitsEstimate optimal portfolios at endpoints of efficient frontier
estimateMaxSharpeRatio Estimate efficient portfolio to maximize Sharpe ratio for Portfolio object
estimatePortMoments Estimate moments of portfolio returns for Portfolio object
estimatePortReturnEstimate mean of portfolio returns
estimatePortRiskEstimate portfolio risk according to risk proxy associated with corresponding object
estimatePortStdEstimate standard deviation of portfolio returns
estimatePortVaREstimate value-at-risk for PortfolioCVaR object
estimateScenarioMomentsEstimate mean and covariance of asset return scenarios
ewstatsExpected return and covariance from return time series
expExponential values
exposureprofilesCompute exposure profiles from credit exposures
extfieldData series extraction
fanplotPlot combined historical and forecast data to visualize possible outcomes
fbusdateFirst business date of month
fetchData from financial time series object
fieldnamesGet names of fields
filltsFill missing values in time series
filterLinear filtering
fintsConstruct financial time series object
fitmodelFit logistic regression model to Weight of Evidence (WOE) data
floatdiscmarginDiscount margin for floating-rate bond
floatmarginMargin measures for floating-rate bond
formatpointsFormat scorecard points and scaling
fpctkdFast stochastics
frac2curFractional currency value to decimal value
freqnumConvert character vector frequency indicator to numeric frequency indicator
freqstrConvert numeric frequency indicator to character vector representation
frontierRolling efficient frontier
fts2asciiWrite elements of time series data into ASCII file
fts2matConvert to matrix
ftsboundStart and end dates
ftsguiFinancial time series GUI
ftsinfoFinancial time series object information
ftstoolFinancial Time Series app
ftsuniqDetermine uniqueness
fvdiscFuture value of discounted security
fvfixFuture value with fixed periodic payments
fvvarFuture value of varying cash flow
fwd2zeroZero curve given forward curve
gbmGeometric Brownian motion model
gbmConstruct GBM model
geom2arithGeometric to arithmetic moments of asset returns
getAssetMomentsObtain mean and covariance of asset returns from Portfolio object
getBoundsObtain bounds for portfolio weights from portfolio object
getBudgetObtain budget constraint bounds from portfolio object
getCostsObtain buy and sell transaction costs from portfolio object
getEqualityObtain equality constraint arrays from portfolio object
getfieldContent of specific field
getGroupRatioObtain group ratio constraint arrays from portfolio object
getGroupsObtain group constraint arrays from portfolio object
getInequalityObtain inequality constraint arrays from portfolio object
getnameidxFind name in list
getOneWayTurnoverObtain one-way turnover constraints from portfolio object
getScenariosObtain scenarios from portfolio object
hestonHeston model
hestonConstruct Heston model
hhighHighest high
highlowHigh, low, open, close chart
highlow (fts)Time series High-Low plot
histHistogram
holdings2weightsPortfolio holdings into weights
holidaysHolidays and nontrading days
horzcatConcatenate financial time series objects horizontally
hourHour of date or time
hwvHull-White/Vasicek Gaussian Diffusion model
hwvConstruct HWV model
inforatioCalculate information ratio for one or more assets
interpolateBrownian interpolation of stochastic differential equations
irrInternal rate of return
isbusdayTrue for dates that are business days
iscompatibleStructural equality
isempty True for empty financial time series objects
isequalMultiple object equality
isfieldCheck whether character vector is field name
issortedCheck whether dates and times are monotonically increasing
kagiKagi chart
lagtsLag time series object
lbusdateLast business date of month
leadtsLead time series object
lengthGet number of dates (rows)
lifetableconvConvert life table series into life tables with forced termination
lifetablefitCalibrate life table from survival data with parametric models
lifetablegenGenerate life table series from calibrated mortality model
linebreakLine break chart
llowLowest low
logNatural logarithm
log10Common logarithm
log2Base 2 logarithm
lpmCompute sample lower partial moments of data
lweekdateDate of last occurrence of weekday in month
m2xdateMATLAB date to Excel serial date number
macdMoving Average Convergence/Divergence (MACD)
maxMaximum value
maxdrawdownCompute maximum drawdown for one or more price series
meanArithmetic average
medpriceMedian price
mergeMerge multiple financial time series objects
minMinimum value
minusFinancial time series subtraction
minuteMinute of date or time
mirrModified internal rate of return
modifybinsModify predictor’s bins
modifypredictorSet properties of credit scorecard predictors
monthMonth of date
monthsNumber of whole months between dates
movavgLeading and lagging moving averages chart
mrdivideFinancial time series matrix division
mtimesFinancial time series matrix multiplication
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
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
negvolidxNegative volume index
nomrrNominal rate of return
nowCurrent date and time as serial date number
nweekdateDate of specific occurrence of weekday in month
nyseclosuresNew York Stock Exchange closures from 1885 to 2070
onbalvolOn-Balance Volume (OBV)
opprofitOption profit
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
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
peravgPeriodic average of FINTS object
periodicreturnsPeriodic total returns from total return prices
plotPlot data series
plotbinsPlot histogram counts for predictor variables
plotFrontierPlot efficient frontier
plusFinancial time series addition
pointfigPoint and figure chart
portallocOptimal capital allocation to efficient frontier portfolios
portalphaCompute risk-adjusted alphas and returns for one or more assets
portconsPortfolio constraints
PortfolioPortfolio object for mean-variance portfolio optimization and analysis
PortfolioCreate Portfolio object for mean-variance portfolio optimization
PortfolioCVaRPortfolioCVaR object for conditional value-at-risk portfolio optimization and analysis
PortfolioCVaRCreate PortfolioCVaR object for conditional value-at-risk portfolio optimization
PortfolioMADPortfolioMAD object for mean-absolute deviation portfolio optimization and analysis
PortfolioMADCreate PortfolioMAD object for mean-absolute deviation portfolio optimization
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 portfolio of assets
portvriskPortfolio value at risk (VaR)
posvolidxPositive volume index
powerFinancial time series power
prbyzeroPrice bonds in portfolio by set of zero curves
prcrocPrice rate of change
prdiscPrice of discounted security
predictorinfoSummary of credit scorecard predictor properties
priceandvolPrice and volume chart
prmatPrice with interest at maturity
probdefaultLikelihood of default for given data set
prtbillPrice of Treasury bill
pvfixPresent value with fixed periodic payments
pvtrendPrice and Volume Trend (PVT)
pvvarPresent value of varying cash flow
pyld2zeroZero curve given par yield curve
quarterReturns the quarter of given date
rdivideFinancial time series division
renkoRenko chart
resampletsDownsample data
ret2tickConvert return series to price series
ret2tick (fts)Convert return series to price series for time series object
rmfieldRemove data series
rsindexRelative Strength Index (RSI)
scoreCompute credit scores for given data
sdeStochastic Differential Equation (SDE) model
sdeConstruct SDE model from user-specified functions
sdeddoStochastic Differential Equation (SDE) model from Drift and Diffusion components
sdeddoConstruct sdeddo model from Drift and Diffusion objects
sdeldSDE with Linear Drift model
sdeldConstruct stochastic differential equation from linear drift-rate models
sdemrdSDE with Mean-Reverting Drift model
sdemrdConstruct stochastic differential equation from mean-reverting drift-rate models
secondSeconds of date or time
selectreturnPortfolio configurations from 3-D efficient frontier
setAssetListSet up list of identifiers for assets
setAssetMoments Set moments (mean and covariance) of asset returns for Portfolio object
setBoundsSet up bounds for portfolio weights
setBudgetSet up budget constraints
setCostsSet up proportional transaction costs
setDefaultConstraintsSet up portfolio constraints with nonnegative weights that sum to 1
setEqualitySet up linear equality constraints for portfolio weights
setfieldSet content of specific field
setGroupRatioSet up group ratio constraints for portfolio weights
setGroupsSet up group constraints for portfolio weights
setInequalitySet up linear inequality constraints for portfolio weights
setInitPortSet up initial or current portfolio
setmodelSet model predictors and coefficients
setOneWayTurnoverSet up one-way portfolio turnover constraints
setProbabilityLevelSet probability level for VaR and CVaR calculations
setScenariosSet asset returns scenarios by direct matrix
setSolverChoose main solver and specify associated solver options for portfolio optimization
setTrackingErrorSet up maximum portfolio tracking error constraint
setTrackingPortSet up benchmark portfolio for tracking error constraint
setTurnoverSet up maximum portfolio turnover constraint
sharpeCompute Sharpe ratio for one or more assets
simByEulerEuler simulation of stochastic differential equations (SDEs)
simBySolutionSimulate approximate solution of diagonal-drift GBM processes
simBySolutionSimulate approximate solution of diagonal-drift HWV processes
simulateSimulate multivariate stochastic differential equations (SDEs)
simulateNormalScenariosByDataSimulate multivariate normal asset return scenarios from data
simulateNormalScenariosByMomentsSimulate multivariate normal asset return scenarios from mean and covariance of asset returns
sizeNumber of dates and data series
smoothtsSmooth data
sortftsSort financial time series
spctkdSlow stochastics
stdStandard deviation
stochoscStochastic oscillator
subsasgnContent assignment
subsrefSubscripted reference
targetreturnPortfolio weight accuracy
taxedrrAfter-tax rate of return
tbilldisc2yieldConvert Treasury bill discount to equivalent yield
tbillpricePrice Treasury bill
tbillrepoBreak-even discount of repurchase agreement
tbillval01Value of one basis point
tbillyieldYield on Treasury bill
tbillyield2discConvert Treasury bill yield to equivalent discount
tbl2bondTreasury bond parameters given Treasury bill parameters
thirdwednesdayFind third Wednesday of month
thirtytwo2decThirty-second quotation to decimal
tick2retConvert price series to return series
tick2ret (fts)Convert price series to return series for time series object
time2dateDates from time and frequency
timesFinancial time series multiplication
tmfactorTime factors of arbitrary dates
toannualConvert to annual
todailyConvert to daily
todayCurrent date
todecimalFractional to decimal conversion
tomonthlyConvert to monthly
toquarterlyConvert to quarterly
toquotedDecimal to fractional conversion
tosemiConvert to semiannual
totalreturnpriceTotal return price time series
toweeklyConvert to weekly
tr2bondsTerm-structure parameters given Treasury bond parameters
transprobEstimate transition probabilities from credit ratings data
transprobbytotalsEstimate transition probabilities using totals structure input
transprobfromthresholdsConvert from credit quality thresholds to transition probabilities
transprobgrouptotalsAggregate credit ratings information into fewer rating categories
transprobprepPreprocess credit ratings data to estimate transition probabilities
transprobtothresholdsConvert from transition probabilities to credit quality thresholds
ts2funcConvert time series arrays to functions of time and state
tsaccelAcceleration between times
tsmomMomentum between times
tsmovavg Moving average
typpriceTypical price
uicalendarGraphical calendar
uminusUnary minus of financial time series object
uplusUnary plus of financial time series object
validatemodelValidate quality of credit scorecard model
varVariance
vertcatConcatenate financial time series objects vertically
volareaPrice and volume chart
volrocVolume rate of change
wcloseWeighted close
weeknumWeek in year
weights2holdingsPortfolio values and weights into holdings
willadWilliams Accumulation/Distribution line
willpctrWilliams %R
wrkdydifNumber of working days between dates
x2mdateExcel serial date number to MATLAB serial date number or datetime format
xirrInternal rate of return for nonperiodic cash flow
yearYear of date
yeardaysNumber of days in year
yearfracFraction of year between dates
ylddiscYield of discounted security
yldmatYield with interest at maturity
yldtbillYield of Treasury bill
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
Was this topic helpful?