Financial Toolbox

Analyze financial data and develop financial models


Financial Toolbox™ provides functions for the mathematical modeling and statistical analysis of financial data. You can perform portfolio optimization taking into account turnover, transaction costs, semi-continuous constraints, and minimum or maximum number of assets. The toolbox enables you to estimate risk, model credit scorecards, analyze yield curves, price fixed-income instruments and European options, and measure investment performance. Time series analysis functions let you perform transformations or regressions with missing data and convert between different trading calendars and day-count conventions.

Get Started:

Financial Data Analytics

Preprocess and analyze financial data.

Data Preprocessing

Convert date and time formats, including business day conventions, day count conventions, custom trading calendars, and coupon payment dates. Use timetable capabilities in MATLAB to remove entries with missing data and outliers and to resample, aggregate, and synchronize time-associated data.

Technical Indicators and Financial Charts

Compute technical indicators (including moving averages, momentums, oscillators, volume indicators, and rate of change) and create financial charts (including candlestick, open-high-low-close, and Bollinger band charts).

Financial charts and technical indicators.

Investment Performance Metrics

Evaluate investment performance using built-in functions for calculating metrics such as Sharpe ratio, information ratio, tracking error, risk-adjusted return, sample lower partial moments, expected lower partial moments, maximum drawdown, and expected maximum drawdown.

Equity curve from backtesting with performance metrics.

Portfolio Optimization and Asset Allocation

Construct, optimize, and analyze portfolios with various objectives and constraints.

Portfolio Optimization Approaches

Use Financial Toolbox to perform mean-variance, mean absolute deviation (MAD), and conditional value at risk (CVaR) portfolio optimizations.

Portfolio optimization application built using MATLAB and Financial Toolbox.

Efficient Portfolios and Efficient Frontiers

Estimate the efficient portfolio and its weights that maximize Sharpe ratio, visualize efficient frontiers, and calculate portfolio risks (including portfolio standard deviation, MAD, VaR, and CVaR).

Efficient frontier and optimal portfolio.

Portfolio Constraints and Transaction Costs

Apply portfolio optimization constraints, including tracking error, linear inequality, linear equality, bound, budget, group, group ratio, average turnover, one-way turnover, minimum number of assets, and maximum number of assets. Incorporate proportional or fixed transaction costs on either gross or net portfolio return optimization.

Efficient frontiers plot of portfolios at various turnover thresholds.

Financial Modeling

Analyze cash flow, price basic fixed-income securities and European options, and perform Monte Carlo simulations.

Cash Flow Analysis

Use Financial Toolbox to calculate present and future values; determine nominal, effective, and modified internal rates of return; calculate amortization and depreciation; and determine the periodic interest rate paid on loans or annuities.

Cash flow diagram.

Fixed-Income Analysis and Option Pricing

Calculate price, yield-to-maturity, duration, and convexity of fixed-income securities. Compute analytics such as complete cash flow date, cash flow amounts, and time-to-cash-flow mapping for bonds. Calculate option prices and greeks using Black and Black-Scholes formulas. You can design, price, and hedge complex financial instruments with Financial Instruments Toolbox™.

Gamma (z-axis height) and delta (color) for a portfolio of call options.

Monte Carlo Simulation

Generate random variables for Monte Carlo simulations based on a variety of stochastic differential equation (SDE) models, including Brownian Motion, Geometric Brownian Motion, Constant Elasticity of Variance, Cox-Ingersoll-Ross, Hull-White/Vasicek, and Heston.

Single path of a multidimensional market model.

Latest Features

Stochastic Differential Equation Models

Perform Monte Carlo simulation for the Bates and Merton jump diffusion models.

Stochastic Differential Equation Models

Simulate Bates, Heston, CIR sample paths by Quadratic-Exponential discretization scheme.

Consumer Credit Risk

Replace a missing value in credit scorecard predictors with mean, median, mode or a custom value.

Machine Learning Examples

Series of examples on machine learning for statistical arbitrage.

See release notes for details on any of these features and corresponding functions.

Computational Finance Suite

The MATLAB Computational Finance Suite is a set of 12 essential products that enables you to develop quantitative applications for risk management, investment management, econometrics, pricing and valuation, insurance, and algorithmic trading.