Functions in Financial Toolbox

By Category | Alphabetical List

abs2active Convert constraints from absolute to active format
accrfrac Fraction of coupon period before settlement
acrubond Accrued interest of security with periodic interest payments
acrudisc Accrued interest of discount security paying at maturity
active2abs Convert constraints from active to absolute format
addEquality Add linear equality constraints for portfolio weights to existing constraints
addEquality Add linear equality constraints for portfolio weights to existing constraints in PortfolioCVaR object
addEquality Add linear equality constraints for portfolio weights to existing constraints in PortfolioMAD object
addGroupRatio Add group ratio constraints for portfolio weights to existing group ratio constraints
addGroupRatio Add group ratio constraints for portfolio weights to existing group ratio constraints for PortfolioCVaR object
addGroupRatio Add group ratio constraints for portfolio weights to existing group ratio constraints for PortfolioMAD object
addGroups Add group constraints for portfolio weights to existing group constraints
addGroups Add group constraints for portfolio weights to existing group constraints for PortfolioCVaR object
addGroups Add group constraints for portfolio weights to existing group constraints for PortfolioMAD object
addInequality Add linear inequality constraints for portfolio weights to existing constraints
addInequality Add linear inequality constraints for portfolio weights to existing constraints for PortfolioCVaR object
addInequality Add linear inequality constraints for portfolio weights to existing constraints for PortfolioMAD object
adline Accumulation/Distribution line
adosc Accumulation/Distribution oscillator
amortize Amortization schedule
annurate Periodic interest rate of annuity
annuterm Number of periods to obtain value
arith2geom Arithmetic to geometric moments of asset returns
ascii2fts Create financial time series object from ASCII file
autobinning Perform automatic binning of given predictors
bar, barh Bar chart
bar3, bar3h 3-D bar chart
beytbill Bond equivalent yield for Treasury bill
bindata Binned predictor variables
bininfo Return predictor's bin information
binprice Binomial put and call pricing
blkimpv Implied volatility for futures options from Black model
blkprice Black model for pricing futures options
blsdelta Black-Scholes sensitivity to underlying price change
blsgamma Black-Scholes sensitivity to underlying delta change
blsimpv Black-Scholes implied volatility
blslambda Black-Scholes elasticity
blsprice Black-Scholes put and call option pricing
blsrho Black-Scholes sensitivity to interest rate change
blstheta Black-Scholes sensitivity to time-until-maturity change
blsvega Black-Scholes sensitivity to underlying price volatility
bm Brownian motion models
bndconvp Bond convexity given price
bndconvy Bond convexity given yield
bnddurp Bond duration given price
bnddury Bond duration given yield
bndkrdur Bond key rate duration given zero curve
bndprice Price fixed-income security from yield to maturity
bndspread Static spread over spot curve
bndtotalreturn Total return of fixed-coupon bond
bndyield Yield to maturity for fixed-income security
bolling Bollinger band chart
bollinger Time series Bollinger band
boxcox Box-Cox transformation
busdate Next or previous business day
busdays Business days in serial date format
candle (fts) Time series candle plot
candle Candlestick chart
cdai Accrued interest on certificate of deposit
cdprice Price of certificate of deposit
cdyield Yield on certificate of deposit (CD)
cev Construct constant elasticity of variance models (objects of class CEV)
cfamounts Cash flow and time mapping for bond portfolio
cfbyzero Price cash flows from set of zero curves
cfconv Cash flow convexity
cfdates Cash flow dates for fixed-income security
cfdur Cash-flow duration and modified duration
cfplot Visualize cash flows of financial instruments
cfport Portfolio form of cash flow amounts
cfprice Compute price for cash flow given yield to maturity
cfspread Compute spread over yield curve for cash flow
cftimes Time factors corresponding to bond cash flow dates
cfyield Compute yield to maturity for cash flow given price
chaikosc Chaikin oscillator
chaikvolat Chaikin volatility
chartfts Interactive display
checkFeasibility Check feasibility of input portfolios against Portfolio object
checkFeasibility Check feasibility of input portfolios against PortfolioCVaR object
checkFeasibility Check feasibility of input portfolios against PortfolioMAD object
chfield Change data series name
cir Cox-Ingersoll-Ross mean-reverting square root diffusion models
convert2sur Convert multivariate normal regression model to seemingly unrelated regression (SUR) model
convertto Convert to specified frequency
corr2cov Convert standard deviation and correlation to covariance
corrcoef Correlation coefficients
cov Covariance matrix
cov2corr Convert covariance to standard deviation and correlation coefficient
cpncount Coupon payments remaining until maturity
cpndaten Next coupon date for fixed-income security
cpndatenq Next quasi-coupon date for fixed-income security
cpndatep Previous coupon date for fixed-income security
cpndaysp Number of days since previous coupon date
cpnpersz Number of days in coupon period
createholidays Create trading calendars
creditscorecard Build credit scorecard model
creditscorecard Create creditscorecard object
cumsum Cumulative sum
cur2frac Decimal currency values to fractional values
cur2str Bank-formatted text
date2time Time and frequency from dates
dateaxis Convert serial-date axis labels to calendar-date axis labels
datedisp Display date entries
datefind Indices of date numbers in matrix
datemnth Date of day in future or past month
datenum Convert date and time to serial date number
datestr Convert date and time to string format
datevec Convert date and time to vector of components
datewrkdy Date of future or past workday
day Day of month
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 Date away from starting date for any day-count basis
daysdif Days between dates for any day-count basis
dec2thirtytwo Decimal to thirty-second quotation
depfixdb Fixed declining-balance depreciation schedule
depgendb General declining-balance depreciation schedule
deprdv Remaining depreciable value
depsoyd Sum of years' digits depreciation
depstln Straight-line depreciation schedule
diff Differencing
diffusion Construct diffusion-rate model components
disc2zero Zero curve given discount curve
discrate Bank discount rate of money market security
displaypoints Return points per predictor per bin
drift Construct drift-rate model components
ecmmvnrfish Fisher information matrix for multivariate normal regression model
ecmmvnrmle Multivariate normal regression with missing data
ecmmvnrobj Log-likelihood function for multivariate normal regression with missing data
ecmmvnrstd Evaluate standard errors for multivariate normal regression model
ecmnfish Fisher information matrix
ecmnhess Hessian of negative log-likelihood function
ecmninit Initial mean and covariance
ecmnmle Mean and covariance of incomplete multivariate normal data
ecmnobj Multivariate normal negative log-likelihood function
ecmnstd Standard errors for mean and covariance of incomplete data
effrr Effective rate of return
elpm Compute expected lower partial moments for normal asset returns
emaxdrawdown Compute expected maximum drawdown for Brownian motion
end Last date entry
eomdate Last date of month
eq (fts) Multiple financial times series object equality
estimateAssetMoments Estimate mean and covariance of asset returns from data
estimateBounds Estimate global lower and upper bounds for set of portfolios
estimateBounds Estimate global lower and upper bounds for portfolio set in PortfolioCVaR object
estimateBounds Estimate global lower and upper bounds for portfolio set in PortfolioMAD object
estimateFrontier Estimate specified number of optimal portfolios on the efficient frontier
estimateFrontier Estimate specified number of optimal portfolios on efficient frontier for PortfolioCVaR object
estimateFrontier Estimate specified number of optimal portfolios on efficient frontier for PortfolioMAD object
estimateFrontierByReturn Estimate optimal portfolios with targeted portfolio returns
estimateFrontierByReturn Estimate optimal portfolios with targeted portfolio returns for PortfolioCVaR object
estimateFrontierByReturn Estimate optimal portfolios with targeted portfolio returns for PortfolioMAD object
estimateFrontierByRisk Estimate optimal portfolios with targeted portfolio risks
estimateFrontierByRisk Estimate optimal portfolios with targeted portfolio risks for PortfolioCVaR object
estimateFrontierByRisk Estimate optimal portfolios with targeted portfolio risks for PortfolioMAD object
estimateFrontierLimits Estimate optimal portfolios at endpoints of efficient frontier
estimateFrontierLimits Estimate optimal portfolios at endpoints of efficient frontier for PortfolioCVaR object
estimateFrontierLimits Estimate optimal portfolios at endpoints of efficient frontier for PortfolioMAD object
estimateMaxSharpeRatio Estimate efficient portfolio to maximize Sharpe ratio
estimatePortMoments Estimate moments of portfolio returns
estimatePortReturn Estimate mean of portfolio returns
estimatePortReturn Estimate mean of portfolio returns for PortfolioCVaR object
estimatePortReturn Estimate mean of portfolio returns for PortfolioMAD object
estimatePortRisk Estimate standard deviation of portfolio returns (portfolio risk)
estimatePortRisk Estimate conditional value-at-risk (CVaR) portfolio risk proxy
estimatePortRisk Estimate mean-absolute deviation (MAD) for portfolio risk proxy
estimatePortStd Estimate standard deviation of portfolio returns for PortfolioCVaR object
estimatePortStd Estimate standard deviation of portfolio returns for PortfolioMAD object
estimatePortVaR Estimate value-at-risk for PortfolioCVaR object
estimateScenarioMoments Estimate mean and covariance of asset return scenarios in PortfolioCVaR object
estimateScenarioMoments Estimate mean and covariance of asset return scenarios in PortfolioMAD object
ewstats Expected return and covariance from return time series
exp Exponential values
extfield Data series extraction
fanplot Plot combined historical and forecast data to visualize possible outcomes
fbusdate First business date of month
fetch Data from financial time series object
fieldnames Get names of fields
fillts Fill missing values in time series
filter Linear filtering
fints Construct financial time series object
fitmodel Fit logistic regression model to Weight of Evidence (WOE) data
floatdiscmargin Discount margin for floating-rate bond
floatmargin Margin measures for floating-rate bond
formatpoints Format scorecard points and scaling
fpctkd Fast stochastics
frac2cur Fractional currency value to decimal value
freqnum Convert string frequency indicator to numeric frequency indicator
freqstr Convert numeric frequency indicator to string representation
frontcon Mean-variance efficient frontier
frontier Rolling efficient frontier
fts2ascii Write elements of time series data into ASCII file
fts2mat Convert to matrix
ftsbound Start and end dates
ftsgui Financial time series GUI
ftsinfo Financial time series object information
ftstool Financial Time Series app
ftsuniq Determine uniqueness
fvdisc Future value of discounted security
fvfix Future value with fixed periodic payments
fvvar Future value of varying cash flow
fwd2zero Zero curve given forward curve
gbm Create GBM model
geom2arith Geometric to arithmetic moments of asset returns
getAssetMoments Obtain mean and covariance of asset returns from Portfolio object
getBounds Obtain bounds for portfolio weights from Portfolio object
getBounds Obtain bounds for portfolio weights from PortfolioCVaR object
getBounds Obtain bounds for portfolio weights from PortfolioMAD object
getBudget Obtain budget constraint bounds from Portfolio object
getBudget Obtain budget constraint bounds from PortfolioCVaR object
getBudget Obtain budget constraint bounds from PortfolioMAD object
getCosts Obtain buy and sell transaction costs from Portfolio object
getCosts Obtain buy and sell transaction costs from PortfolioCVaR object
getCosts Obtain buy and sell transaction costs from PortfolioMAD object
getEquality Obtain equality constraint arrays from Portfolio object
getEquality Obtain equality constraint arrays from PortfolioCVaR object
getEquality Obtain equality constraint arrays from PortfolioMAD object
getfield Content of specific field
getGroupRatio Obtain group ratio constraint arrays from Portfolio object
getGroupRatio Obtain group ratio constraint arrays from PortfolioCVaR object
getGroupRatio Obtain group ratio constraint arrays from PortfolioMAD object
getGroups Obtain group constraint arrays from Portfolio object
getGroups Obtain group constraint arrays from PortfolioCVaR object
getGroups Obtain group constraint arrays from PortfolioMAD object
getInequality Obtain inequality constraint arrays from Portfolio object
getInequality Obtain inequality constraint arrays from PortfolioCVaR object
getInequality Obtain inequality constraint arrays from PortfolioMAD object
getnameidx Find name in list
getOneWayTurnover Obtain one-way turnover constraints from Portfolio object
getOneWayTurnover Obtain one-way turnover constraints from PortfolioCVaR object
getOneWayTurnover Obtain one-way turnover constraints from PortfolioMAD object
getScenarios Obtain scenarios from PortfolioCVaR object
getScenarios Obtain scenarios from PortfolioMAD object
heston Create Heston model
hhigh Highest high
highlow (fts) Time series High-Low plot
highlow High, low, open, close chart
hist Histogram
holdings2weights Portfolio holdings into weights
holidays Holidays and nontrading days
horzcat Concatenate financial time series objects horizontally
hour Hour of date or time
hwv Create HWV model
inforatio Calculate information ratio for one or more assets
interpolate Brownian interpolation of stochastic differential equations
irr Internal rate of return
isbusday True for dates that are business days
iscompatible Structural equality
isempty True for empty financial time series objects
isequal Multiple object equality
isfield Check whether string is field name
issorted Check whether dates and times are monotonically increasing
kagi Kagi chart
lagts Lag time series object
lbusdate Last business date of month
leadts Lead time series object
length Get number of dates (rows)
linebreak Line break chart
llow Lowest low
log Natural logarithm
log10 Common logarithm
log2 Base 2 logarithm
lpm Compute sample lower partial moments of data
lweekdate Date of last occurrence of weekday in month
m2xdate MATLAB serial date number to Excel serial date number
macd Moving Average Convergence/Divergence (MACD)
max Maximum value
maxdrawdown Compute maximum drawdown for one or more price series
mean Arithmetic average
medprice Median price
merge Merge multiple financial time series objects
min Minimum value
minus Financial time series subtraction
minute Minute of date or time
mirr Modified internal rate of return
modifybins Modify predictor's bins
month Month of date
months Number of whole months between dates
movavg Leading and lagging moving averages chart
mrdivide Financial time series matrix division
mtimes Financial time series matrix multiplication
mvnrfish Fisher information matrix for multivariate normal or least-squares regression
mvnrmle Multivariate normal regression (ignore missing data)
mvnrobj Log-likelihood function for multivariate normal regression without missing data
mvnrstd Evaluate standard errors for multivariate normal regression model
nancov Covariance ignoring NaNs
nanmax Maximum ignoring NaNs
nanmean Mean ignoring NaNs
nanmedian Median ignoring NaNs
nanmin Minimum ignoring NaNs
nanstd Standard deviation ignoring NaNs
nansum Sum ignoring NaNs
nanvar Variance ignoring NaNs
negvolidx Negative volume index
nomrr Nominal rate of return
now Current date and time as serial date number
nweekdate Date of specific occurrence of weekday in month
nyseclosures New York Stock Exchange closures from 1885 to 2050
onbalvol On-Balance Volume (OBV)
opprofit Option profit
payadv Periodic payment given number of advance payments
payodd Payment of loan or annuity with odd first period
payper Periodic payment of loan or annuity
payuni Uniform payment equal to varying cash flow
pcalims Linear inequalities for individual asset allocation
pcgcomp Linear inequalities for asset group comparison constraints
pcglims Linear inequalities for asset group minimum and maximum allocation
pcpval Linear inequalities for fixing total portfolio value
peravg Periodic average of FINTS object
periodicreturns Periodic total returns from total return prices
plot Plot data series
plotbins Plot histogram counts for predictor variables
plotFrontier Plot efficient frontier
plotFrontier Plot single efficient frontier for PortfolioCVaR object
plotFrontier Plot single efficient frontier for PortfolioMAD object
plus Financial time series addition
pointfig Point and figure chart
portalloc Optimal capital allocation to efficient frontier portfolios
portalpha Compute risk-adjusted alphas and returns for one or more assets
portcons Portfolio constraints
Portfolio Portfolio object for mean-variance portfolio optimization and analysis
PortfolioCVaR PortfolioCVaR object for conditional value-at-risk portfolio optimization and analysis
PortfolioMAD PortfolioMAD object for mean-absolute deviation portfolio optimization and analysis
portopt Portfolios on constrained efficient frontier
portrand Randomized portfolio risks, returns, and weights
portror Portfolio expected rate of return
portsim Monte Carlo simulation of correlated asset returns
portstats Portfolio expected return and risk
portvar Variance for portfolio of assets
portvrisk Portfolio value at risk (VaR)
posvolidx Positive volume index
power Financial time series power
prbyzero Price bonds in portfolio by set of zero curves
prcroc Price rate of change
prdisc Price of discounted security
priceandvol Price and volume chart
prmat Price with interest at maturity
prtbill Price of Treasury bill
pvfix Present value with fixed periodic payments
pvtrend Price and Volume Trend (PVT)
pvvar Present value of varying cash flow
pyld2zero Zero curve given par yield curve
rdivide Financial time series division
renko Renko chart
resamplets Downsample data
ret2tick (fts) Convert return series to price series for time series object
ret2tick Convert return series to price series
rmfield Remove data series
rsindex Relative Strength Index (RSI)
score Compute credit scores for given data
sde Create SDE model from user-specified functions
sdeddo Create sdeddo model from Drift and Diffusion objects
sdeld Construct stochastic differential equation from linear drift-rate models
sdemrd Construct stochastic differential equation from mean-reverting drift-rate models
selectreturn Portfolio configurations from 3-D efficient frontier
setAssetList Set up list of identifiers for assets
setAssetList Set up list of identifiers for assets for PortfolioCVaR object
setAssetList Set up list of identifiers for assets for PortfolioMAD object
setAssetMoments Set moments (mean and covariance) of asset returns
setBounds Set up bounds for portfolio weights
setBounds Set up bounds for portfolio weights in PortfolioCVaR object
setBounds Set up bounds for portfolio weights in PortfolioMAD object
setBudget Set up budget constraints
setBudget Set up budget constraints for PortfolioCVaR object
setBudget Set up budget constraints for PortfolioMAD object
setCosts Set up proportional transaction costs
setCosts Set up proportional transaction costs for PortfolioCVaR object
setCosts Set up proportional transaction costs for PortfolioMAD object
setDefaultConstraints Set up portfolio constraints with nonnegative weights that sum to 1
setDefaultConstraints Set up portfolio constraints with nonnegative weights that sum to 1 for PortfolioCVaR object
setDefaultConstraints Set up portfolio constraints with nonnegative weights that sum to 1 for PortfolioMAD object
setEquality Set up linear equality constraints for portfolio weights
setEquality Set up linear equality constraints for portfolio weights in PortfolioCVaR object
setEquality Set up linear equality constraints for portfolio weights in PortfolioMAD object
setfield Set content of specific field
setGroupRatio Set up group ratio constraints for portfolio weights
setGroupRatio Set up group ratio constraints for portfolio weights in PortfolioCVaR object
setGroupRatio Set up group ratio constraints for portfolio weights in PortfolioMAD object
setGroups Set up group constraints for portfolio weights
setGroups Set up group constraints for portfolio weights in PortfolioCVaR object
setGroups Set up group constraints for portfolio weights in PortfolioMAD object
setInequality Set up linear inequality constraints for portfolio weights
setInequality Set up linear inequality constraints for portfolio weights in PortfolioCVaR object
setInequality Set up linear inequality constraints for portfolio weights in PortfolioMAD object
setInitPort Set up initial or current portfolio
setInitPort Set up initial or current portfolio for PortfolioCVaR object
setInitPort Set up initial or current portfolio for PortfolioMAD object
setmodel Set model predictors and coefficients
setOneWayTurnover Set up one-way portfolio turnover constraints
setOneWayTurnover Set up one-way portfolio turnover constraints for PortfolioCVaR object
setOneWayTurnover Set up one-way portfolio turnover constraints for PortfolioMAD object
setProbabilityLevel Set probability level for VaR and CVaR calculations
setScenarios Set asset returns scenarios by direct matrix for PortfolioCVaR object
setScenarios Set asset returns scenarios by direct matrix for PortfolioMAD object
setSolver Choose main solver and specify associated solver options for portfolio optimization
setSolver Choose main solver and solver options for CVaR portfolio optimization
setSolver Choose main solver and solver options for MAD portfolio optimization
setTurnover Set up maximum portfolio turnover constraint
setTurnover Set up maximum turnover constraint in PortfolioCVaR object
setTurnover Set up maximum turnover constraint in PortfolioMAD object
sharpe Compute Sharpe ratio for one or more assets
simByEuler Euler simulation of stochastic differential equations (SDEs)
simBySolution Simulate approximate solution of diagonal-drift HWV and GBM processes
simulate Simulate multivariate stochastic differential equations (SDEs)
simulateNormalScenariosByData Simulate multivariate normal asset return scenarios from data for PortfolioCVaR object
simulateNormalScenariosByData Estimate mean and covariance of asset returns from data for PortfolioMAD object
simulateNormalScenariosByMoments Simulate multivariate normal asset return scenarios from mean and covariance of asset returns for PortfolioCVaR object
simulateNormalScenariosByMoments Simulate multivariate normal asset return scenarios from mean and covariance of asset returns for PortfolioMAD object
size Number of dates and data series
smoothts Smooth data
sortfts Sort financial time series
spctkd Slow stochastics
std Standard deviation
stochosc Stochastic oscillator
subsasgn Content assignment
subsref Subscripted reference
targetreturn Portfolio weight accuracy
taxedrr After-tax rate of return
tbilldisc2yield Convert Treasury bill discount to equivalent yield
tbillprice Price Treasury bill
tbillrepo Break-even discount of repurchase agreement
tbillval01 Value of one basis point
tbillyield Yield on Treasury bill
tbillyield2disc Convert Treasury bill yield to equivalent discount
tbl2bond Treasury bond parameters given Treasury bill parameters
thirdwednesday Find third Wednesday of month
thirtytwo2dec Thirty-second quotation to decimal
tick2ret (fts) Convert price series to return series for time series object
tick2ret Convert price series to return series
time2date Dates from time and frequency
times Financial time series multiplication
toannual Convert to annual
todaily Convert to daily
today Current date
todecimal Fractional to decimal conversion
tomonthly Convert to monthly
toquarterly Convert to quarterly
toquoted Decimal to fractional conversion
tosemi Convert to semiannual
totalreturnprice Total return price time series
toweekly Convert to weekly
tr2bonds Term-structure parameters given Treasury bond parameters
transprob Estimate transition probabilities from credit ratings data
transprobbytotals Estimate transition probabilities using totals structure input
transprobfromthresholds Convert from credit quality thresholds to transition probabilities
transprobgrouptotals Aggregate credit ratings information into fewer rating categories
transprobprep Preprocess credit ratings data to estimate transition probabilities
transprobtothresholds Convert from transition probabilities to credit quality thresholds
ts2func Convert time series arrays to functions of time and state
tsaccel Acceleration between times
tsmom Momentum between times
tsmovavg Moving average
typprice Typical price
ugarch Univariate GARCH(P,Q) parameter estimation with Gaussian innovations
ugarchllf Log-likelihood objective function of univariate GARCH(P,Q) processes with Gaussian innovations
ugarchpred Forecast conditional variance of univariate GARCH(P,Q) processes
ugarchsim Simulate univariate GARCH(P,Q) process with Gaussian innovations
uicalendar Graphical calendar
uminus Unary minus of financial time series object
uplus Unary plus of financial time series object
var Variance
vertcat Concatenate financial time series objects vertically
volarea Price and volume chart
volroc Volume rate of change
wclose Weighted close
weeknum Week in year
weights2holdings Portfolio values and weights into holdings
willad Williams Accumulation/Distribution line
willpctr Williams %R
wrkdydif Number of working days between dates
x2mdate Excel serial date number to MATLAB serial date number
xirr Internal rate of return for nonperiodic cash flow
year Year of date
yeardays Number of days in year
yearfrac Fraction of year between dates
ylddisc Yield of discounted security
yldmat Yield with interest at maturity
yldtbill Yield of Treasury bill
zbtprice Zero curve bootstrapping from coupon bond data given price
zbtyield Zero curve bootstrapping from coupon bond data given yield
zero2disc Discount curve given zero curve
zero2fwd Forward curve given zero curve
zero2pyld Par yield curve given zero curve
Was this topic helpful?